Skip to content

Commit

Permalink
fix gas benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
saucepoint committed Jul 1, 2024
1 parent cb13e34 commit 6db1674
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
239588
238844
12 changes: 9 additions & 3 deletions test/position-managers/Gas.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,14 @@ contract GasTest is Test, Deployers, GasSnapshot {
donateRouter.donate(key, 20e18, 20e18, ZERO_BYTES);

// bob collects fees so some of alice's fees are now cached
bytes[] memory calls = new bytes[](1);
calls[0] = abi.encodeWithSelector(lpm.collect.selector, tokenIdBob, bob, ZERO_BYTES, false);
Currency[] memory currencies = new Currency[](2);
currencies[0] = currency0;
currencies[1] = currency1;

vm.prank(bob);
lpm.collect(tokenIdBob, bob, ZERO_BYTES, false);
lpm.unlockAndExecute(calls, currencies);

// donate to create more fees
donateRouter.donate(key, 20e18, 20e18, ZERO_BYTES);
Expand All @@ -216,10 +222,10 @@ contract GasTest is Test, Deployers, GasSnapshot {
newToken1Owed
);

bytes[] memory calls = new bytes[](1);
calls = new bytes[](1);
calls[0] =
abi.encodeWithSelector(lpm.increaseLiquidity.selector, tokenIdAlice, liquidityDelta, ZERO_BYTES, false);
Currency[] memory currencies = new Currency[](2);
currencies = new Currency[](2);
currencies[0] = currency0;
currencies[1] = currency1;

Expand Down

0 comments on commit 6db1674

Please sign in to comment.