Skip to content

Commit

Permalink
multicall price
Browse files Browse the repository at this point in the history
  • Loading branch information
gaetbout committed Jun 10, 2024
1 parent 6ce8bec commit 471468a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
8 changes: 4 additions & 4 deletions gas-report.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ Summary:
┌───────────────────────┬─────────────────────┬─────────┬────────────────┬────────────────┬─────────────────┬───────────┬──────────────┬──────────────────────────────┬───────────────┬────────┬─────────┐
│ (index) │ Actual fee │ Fee usd │ Fee without DA │ Gas without DA │ Computation gas │ Event gas │ Calldata gas │ Max computation per Category │ Storage diffs │ DA fee │ DA mode │
├───────────────────────┼─────────────────────┼─────────┼────────────────┼────────────────┼─────────────────┼───────────┼──────────────┼──────────────────────────────┼───────────────┼────────┼─────────┤
│ Deposit (txV3: false) │ '1.152.000.000.352' │ 0.00461152000000000323141 │ 'steps' │ 4352 │ 'BLOB' │
│ Deposit (txV3: false) │ '1.404.000.000.288' │ 0.00561404000000000393752 │ 'steps' │ 3288 │ 'BLOB' │
│ Claim (txV3: false) │ '1.332.000.000.192' │ 0.0053 │ 1332000000000 │ 37 │ 35 │ 2 │ 2 │ 'steps' │ 3 │ 192 │ 'BLOB' │
│ Deposit (txV3: true) │ '1.152.000.000.480' │ 0.00461152000000000323141 │ 'steps' │ 5480 │ 'BLOB' │
│ Deposit (txV3: true) │ '1.404.000.000.416' │ 0.00561404000000000393752 │ 'steps' │ 4416 │ 'BLOB' │
│ Claim (txV3: true) │ '1.332.000.000.192' │ 0 │ 1332000000000 │ 37 │ 35 │ 2 │ 2 │ 'steps' │ 3 │ 192 │ 'BLOB' │
└───────────────────────┴─────────────────────┴─────────┴────────────────┴────────────────┴─────────────────┴───────────┴──────────────┴──────────────────────────────┴───────────────┴────────┴─────────┘
Resources:
┌───────────────────────┬─────────┬───────┬───────┬────────┬──────────┬──────────┬─────────────┬───────┐
│ (index) │ bitwise │ ec_op │ ecdsa │ keccak │ pedersen │ poseidon │ range_check │ steps │
├───────────────────────┼─────────┼───────┼───────┼────────┼──────────┼──────────┼─────────────┼───────┤
│ Deposit (txV3: false) │ 0 │ 3 │ 0 │ 0 │ 39 │ 0 │ 28112154
│ Deposit (txV3: false) │ 0 │ 3 │ 0 │ 0 │ 47 │ 0 │ 33514585
│ Claim (txV3: false) │ 0 │ 3 │ 0 │ 0 │ 75 │ 0 │ 475 │ 13657 │
│ Deposit (txV3: true) │ 0 │ 3 │ 0 │ 0 │ 39 │ 0 │ 28112155
│ Deposit (txV3: true) │ 0 │ 3 │ 0 │ 0 │ 47 │ 0 │ 33514586
│ Claim (txV3: true) │ 0 │ 3 │ 0 │ 0 │ 75 │ 0 │ 509 │ 13855 │
└───────────────────────┴─────────┴───────┴───────┴────────┴──────────┴──────────┴─────────────┴───────┘
18 changes: 9 additions & 9 deletions scripts/profile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ for (const useTxV3 of [false, true]) {
const maxFee = 50000000000000n;
const receiver = "0x42";

// Make a gift
const tokenContract = await manager.tokens.feeTokenContract(useTxV3);
tokenContract.connect(deployer);
factory.connect(deployer);
await tokenContract.approve(factory.address, amount + maxFee);
await profiler.profile(
`Deposit (txV3: ${useTxV3})`,
await factory.deposit(tokenContract.address, amount, tokenContract.address, maxFee, claimPubkey),
);
// Make a gift
const tokenContract = await manager.tokens.feeTokenContract(useTxV3);
await profiler.profile(
`Deposit (txV3: ${useTxV3})`,
await deployer.execute([
tokenContract.populateTransaction.approve(factory.address, amount + maxFee),
factory.populateTransaction.deposit(tokenContract.address, amount, tokenContract.address, maxFee, claimPubkey),
]),
);

// Ensure there is a contract for the claim
const claimAddress = await factory.get_claim_address(
Expand Down

0 comments on commit 471468a

Please sign in to comment.