Skip to content

Commit

Permalink
chore: Delete unnecessary code and add gas snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
ChefCupcake committed Dec 17, 2024
1 parent aa73e7d commit de9289d
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions .forge-snapshots/testDonationSnipingPrevention.snapshot
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
AntiSnipingTest:testDonationSnipingPrevention() (gas: 1221314)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
AntiSnipingTest:testFeeRedistributionWhenNoLiquidity() (gas: 783889)
1 change: 1 addition & 0 deletions .forge-snapshots/testSwapAfterIncreaseLiquidity.snapshot
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
AntiSnipingTest:testSwapAfterIncreaseLiquidity() (gas: 1079845)
1 change: 1 addition & 0 deletions .forge-snapshots/testSwapFeeSnipingPrevention.snapshot
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
AntiSnipingTest:testSwapFeeSnipingPrevention() (gas: 1309635)
1 change: 0 additions & 1 deletion src/pool-cl/anti-sniping/CLAntiSniping.sol
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@ contract CLAntiSniping is CLBaseHook {
liqParams.tickLower = params.tickLower;
liqParams.tickUpper = params.tickUpper;
liqParams.salt = params.salt;
positionKeyToLiquidityParams[positionKey] = liqParams;

if (positionCreationBlock[poolId][positionKey] != 0 &&
block.number - positionCreationBlock[poolId][positionKey] < positionLockDuration) {
Expand Down
1 change: 0 additions & 1 deletion test/pool-cl/CLAntiSniping.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import {CLAntiSniping} from "../../src/pool-cl/anti-sniping/CLAntiSniping.sol";
import {Planner, Plan} from "pancake-v4-periphery/src/libraries/Planner.sol";
import {Actions} from "pancake-v4-periphery/src/libraries/Actions.sol";

import {console} from "forge-std/console.sol";
contract AntiSnipingTest is Test, Deployers, DeployPermit2 {
using PoolIdLibrary for PoolKey;
using CLPoolParametersHelper for bytes32;
Expand Down

0 comments on commit de9289d

Please sign in to comment.