Skip to content

Commit 015fcfe

Browse files
committed
Fix pondo bot with new program names
1 parent 204973d commit 015fcfe

File tree

6 files changed

+21
-16
lines changed

6 files changed

+21
-16
lines changed

pondo-bot/src/aleo/deploy.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -278,22 +278,22 @@ export const resolveImports = async (imports: string[]) => {
278278
export const deploymentCost = (program: string) => {
279279
let fee = 1;
280280

281-
if (program.indexOf('multi_token_support') !== -1) {
282-
fee = 76.51; // At time of writing, the fee for deploying the multi-token support program is 76501550 microcredits
281+
if (program.indexOf('token_registry') !== -1) {
282+
fee = 75.798350; // At time of writing, the fee for deploying the multi-token support program is 75798350 microcredits
283283
} else if (program.indexOf('wrapped_credits') !== -1) {
284-
fee = 15.88; // At time of writing, the fee for deploying the mtsp credits program is 15845775 microcredits
284+
fee = 15.630250; // At time of writing, the fee for deploying the mtsp credits program is 15630250 microcredits
285285
} else if (program.indexOf('validator_oracle') !== -1) {
286-
fee = 97.168650; // At time of writing, the fee for deploying the pondo oracle program is 97158650 microcredits
286+
fee = 97.375450; // At time of writing, the fee for deploying the pondo oracle program is 97375450 microcredits
287287
} else if (program.indexOf('paleo_token') !== -1) {
288-
fee = 3.999275; // At time of writing, the fee for deploying the pondo token program is 3998275 microcredits
288+
fee = 3.822825; // At time of writing, the fee for deploying the pondo token program is 3822825 microcredits
289289
} else if (program.indexOf('pondo_protocol_token') !== -1) {
290-
fee = 8.886275; // At time of writing, the fee for deploying the pondo token program is 8876275 microcredits
290+
fee = 8.766525; // At time of writing, the fee for deploying the pondo token program is 8766525 microcredits
291+
} else if (program.indexOf('reference_delegator') !== -1) {
292+
fee = 1; // At time of writing, the fee for deploying a reference delegator program is 7872425 microcredits
291293
} else if (program.indexOf('delegator') !== -1) {
292-
fee = 17.982675; // At time of writing, the fee for deploying the pondo delegator program is 17972675 microcredits
294+
fee = 17.780250; // At time of writing, the fee for deploying the pondo delegator program is 17780250 microcredits
293295
} else if (program.indexOf('pondo_protocol') !== -1) {
294-
fee = 63.669475; // At time of writing, the fee for deploying the pondo vault program is 63659475 microcredits
295-
} else if (program.indexOf('reference_delegator') !== -1) {
296-
fee = 7.882425; // At time of writing, the fee for deploying a reference delegator program is 7872425 microcredits
296+
fee = 61.892425; // At time of writing, the fee for deploying the pondo vault program is 61892425 microcredits
297297
} else if (program.indexOf('grant_disbursement') !== -1) {
298298
fee = 1;
299299
} else if (program.indexOf('test_program') !== -1) {

pondo-bot/src/protocol/calculatedFees.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export const calculatedFees: CalculatedFees = {
5959
initialize: "238840",
6060
add_delegator: "169508",
6161
update_data: "1222149",
62-
boost_validator: "85601"
62+
boost_validator: "85609"
6363
},
6464
"paleo_token.aleo": {},
6565
"pondo_protocol_token.aleo": {},

pondo-bot/src/protocol/initializePrograms.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export const initializeProgramsIfNecessary = async (): Promise<any> => {
7575
programCode,
7676
initializationFunction!,
7777
inputs,
78-
75,
78+
0.75,
7979
undefined,
8080
resolvedImports
8181
)

pondo-bot/src/protocol/runProtocol.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const PONDO_ORACLE_PROGRAM = pondoPrograms.find((program) =>
4141
program.includes('validator_oracle')
4242
);
4343
const CORE_PROTOCOL_PROGRAM = pondoPrograms.find((program) =>
44-
program.includes('pondo_protocol')
44+
program.includes('pondo_protocol.aleo')
4545
);
4646
const CORE_PROTOCOL_PROGRAM_CODE = pondoProgramToCode[CORE_PROTOCOL_PROGRAM!];
4747
const MIN_LIQUIDITY_PERCENT = BigInt('250');

pondo-bot/src/tests/scripts/compareProgramChanges.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,12 @@ const oldPondoPrograms = [
3030
"pondo_delegator4.aleo",
3131
"pondo_delegator5.aleo",
3232
"pondo_core_protocol.aleo",
33-
"reference_delegatornkpuru.aleo"
33+
"reference_delegatornkpuru.aleo",
34+
"reference_delegatorcmaxtm.aleo",
35+
"reference_delegatorbdywey.aleo",
36+
"reference_delegatorimgbph.aleo",
37+
"reference_delegatordgndht.aleo",
38+
"reference_delegatorzuhnsy.aleo"
3439
];
3540

3641
const newProgramToOldProgramMap = {
@@ -91,7 +96,7 @@ const generateAndSaveDiff = (oldFileName: string, newFileName: string, oldProgra
9196
newProgramContent, // New file content
9297
'', // Optional old header (not used)
9398
'', // Optional new header (not used)
94-
{ context: 3 } // Optional options for context lines
99+
{ context: 3, ignoreWhitespace: true, newlineIsToken: false } // Optional options for context lines
95100
);
96101

97102
// Write the diff output to a file

pondo-bot/webpack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ const testConfig = {
159159
buildLedger:
160160
path.resolve(__dirname, "src") + "/tests/scripts/buildLedger.ts",
161161
compareProgramChanges:
162-
path.resolve(__dirname, "src") + "/tests/scripts/compareProgramChanges.ts",
162+
path.resolve(__dirname, "src") + "/tests/scripts/compareProgramChanges.ts"
163163
},
164164

165165
// Output configuration

0 commit comments

Comments
 (0)