Skip to content

Commit

Permalink
add params size to quote
Browse files Browse the repository at this point in the history
  • Loading branch information
modship authored and peterjah committed Jan 15, 2025
1 parent dc622f8 commit 4ecea9c
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 6 deletions.
5 changes: 3 additions & 2 deletions deferred-call-manager/assembly/internals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,11 @@ export function registerCall(period: u64): void {
generateEvent('Current contract balance: ' + initBal.toString());

const maxGas = 20_000_000;
const params_size = 0;
const bookingPeriod = Context.currentPeriod() + period;
const slot = findCheapestSlot(bookingPeriod, bookingPeriod, maxGas);
const slot = findCheapestSlot(bookingPeriod, bookingPeriod, maxGas, params_size);

const cost = deferredCallQuote(slot, maxGas);
const cost = deferredCallQuote(slot, maxGas, params_size);
const callId = deferredCallRegister(
Context.callee().toString(),
'processTask',
Expand Down
25 changes: 22 additions & 3 deletions deferred-call-manager/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion deferred-call-manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"@assemblyscript/loader": "^0.27.29",
"@massalabs/as-types": "^2.0.0",
"@massalabs/eslint-config": "^0.0.11",
"@massalabs/massa-as-sdk": "git://github.com/massalabs/massa-as-sdk#deferred_calls",
"@massalabs/massa-as-sdk": "^3.0.1-dev",
"@massalabs/massa-sc-compiler": "^0.2.1-dev",
"@massalabs/massa-sc-deployer": "^1.3.0",
"@massalabs/massa-web3": "^5.0.0-next",
Expand Down

0 comments on commit 4ecea9c

Please sign in to comment.