From 3f314fc35c837a693f2183e6b1d93f567f14e190 Mon Sep 17 00:00:00 2001 From: chef-burger <137024020+chefburger@users.noreply.github.com> Date: Thu, 30 May 2024 10:11:48 +0800 Subject: [PATCH 1/2] fix: tighten the dynamic fee validation rule (#51) * fix: tighten the dynamic fee validation rule * fix: clPool testSwap failed --- ...okTest#testInitializeSucceedsWithHook.snap | 2 +- .../BinHookTest#testSwapSucceedsWithHook.snap | 2 +- ...anagerTest#testFuzzUpdateDynamicLPFee.snap | 2 +- ...oolManagerTest#testFuzz_SetMaxBinStep.snap | 2 +- ...oolManagerTest#initializeWithoutHooks.snap | 2 +- .../CLPoolManagerTest#swap_withHooks.snap | 2 +- ...anagerTest#testFuzzUpdateDynamicLPFee.snap | 2 +- src/libraries/LPFeeLibrary.sol | 7 ++--- src/pool-bin/BinPoolManager.sol | 1 - src/types/PoolKey.sol | 2 +- test/libraries/LPFeeLibrary.t.sol | 22 ++++++++++--- test/pool-bin/BinHookReturnsFee.t.sol | 2 +- test/pool-bin/BinPoolManager.t.sol | 24 ++++++++++++-- test/pool-bin/libraries/BinPoolFee.t.sol | 8 ++--- test/pool-cl/CLPoolManager.t.sol | 27 +++++++++++++--- test/pool-cl/libraries/CLPool.t.sol | 31 ++++++++++++++++++- 16 files changed, 106 insertions(+), 32 deletions(-) diff --git a/.forge-snapshots/BinHookTest#testInitializeSucceedsWithHook.snap b/.forge-snapshots/BinHookTest#testInitializeSucceedsWithHook.snap index eb0299a4..f8d3252e 100644 --- a/.forge-snapshots/BinHookTest#testInitializeSucceedsWithHook.snap +++ b/.forge-snapshots/BinHookTest#testInitializeSucceedsWithHook.snap @@ -1 +1 @@ -137576 \ No newline at end of file +137573 \ No newline at end of file diff --git a/.forge-snapshots/BinHookTest#testSwapSucceedsWithHook.snap b/.forge-snapshots/BinHookTest#testSwapSucceedsWithHook.snap index ce686ff3..3e695acc 100644 --- a/.forge-snapshots/BinHookTest#testSwapSucceedsWithHook.snap +++ b/.forge-snapshots/BinHookTest#testSwapSucceedsWithHook.snap @@ -1 +1 @@ -193836 \ No newline at end of file +193842 \ No newline at end of file diff --git a/.forge-snapshots/BinPoolManagerTest#testFuzzUpdateDynamicLPFee.snap b/.forge-snapshots/BinPoolManagerTest#testFuzzUpdateDynamicLPFee.snap index 91d76f7f..bb7187ce 100644 --- a/.forge-snapshots/BinPoolManagerTest#testFuzzUpdateDynamicLPFee.snap +++ b/.forge-snapshots/BinPoolManagerTest#testFuzzUpdateDynamicLPFee.snap @@ -1 +1 @@ -32551 +32557 \ No newline at end of file diff --git a/.forge-snapshots/BinPoolManagerTest#testFuzz_SetMaxBinStep.snap b/.forge-snapshots/BinPoolManagerTest#testFuzz_SetMaxBinStep.snap index 8e96cfd1..960d5d6f 100644 --- a/.forge-snapshots/BinPoolManagerTest#testFuzz_SetMaxBinStep.snap +++ b/.forge-snapshots/BinPoolManagerTest#testFuzz_SetMaxBinStep.snap @@ -1 +1 @@ -30405 \ No newline at end of file +30417 \ No newline at end of file diff --git a/.forge-snapshots/CLPoolManagerTest#initializeWithoutHooks.snap b/.forge-snapshots/CLPoolManagerTest#initializeWithoutHooks.snap index 0b05c93e..78a29c3e 100644 --- a/.forge-snapshots/CLPoolManagerTest#initializeWithoutHooks.snap +++ b/.forge-snapshots/CLPoolManagerTest#initializeWithoutHooks.snap @@ -1 +1 @@ -59778 \ No newline at end of file +59781 \ No newline at end of file diff --git a/.forge-snapshots/CLPoolManagerTest#swap_withHooks.snap b/.forge-snapshots/CLPoolManagerTest#swap_withHooks.snap index 3c36313e..30c78f9c 100644 --- a/.forge-snapshots/CLPoolManagerTest#swap_withHooks.snap +++ b/.forge-snapshots/CLPoolManagerTest#swap_withHooks.snap @@ -1 +1 @@ -96223 \ No newline at end of file +96229 \ No newline at end of file diff --git a/.forge-snapshots/CLPoolManagerTest#testFuzzUpdateDynamicLPFee.snap b/.forge-snapshots/CLPoolManagerTest#testFuzzUpdateDynamicLPFee.snap index 7658a9f9..f4a4a363 100644 --- a/.forge-snapshots/CLPoolManagerTest#testFuzzUpdateDynamicLPFee.snap +++ b/.forge-snapshots/CLPoolManagerTest#testFuzzUpdateDynamicLPFee.snap @@ -1 +1 @@ -29467 \ No newline at end of file +32261 \ No newline at end of file diff --git a/src/libraries/LPFeeLibrary.sol b/src/libraries/LPFeeLibrary.sol index 6c3c1f8e..b34a5bb7 100644 --- a/src/libraries/LPFeeLibrary.sol +++ b/src/libraries/LPFeeLibrary.sol @@ -13,10 +13,9 @@ library LPFeeLibrary { error FeeTooLarge(); /// @dev the flag and mask - uint24 public constant FEE_MASK = 0x7FFFFF; uint24 public constant OVERRIDE_MASK = 0xBFFFFF; - // the top bit of the fee in a PoolKey is used to signal if a Pool's LP fee is dynamic + // a dynamic fee pool must have exactly same value for fee field uint24 public constant DYNAMIC_FEE_FLAG = 0x800000; // the second bit of the fee returned by beforeSwap is used to signal if the stored LP fee should be overridden in this swap @@ -29,7 +28,7 @@ library LPFeeLibrary { uint24 public constant TEN_PERCENT_FEE = 100_000; function isDynamicLPFee(uint24 self) internal pure returns (bool) { - return self & DYNAMIC_FEE_FLAG != 0; + return self == DYNAMIC_FEE_FLAG; } function validate(uint24 self, uint24 maxFee) internal pure { @@ -40,7 +39,7 @@ library LPFeeLibrary { function getInitialLPFee(uint24 self) internal pure returns (uint24 lpFee) { // the initial fee for a dynamic fee pool is 0 if (self.isDynamicLPFee()) return 0; - lpFee = self & FEE_MASK; + lpFee = self; } /// @notice returns true if the fee has the override flag set (top bit of the uint24) diff --git a/src/pool-bin/BinPoolManager.sol b/src/pool-bin/BinPoolManager.sol index 94b49cdb..48cbb411 100644 --- a/src/pool-bin/BinPoolManager.sol +++ b/src/pool-bin/BinPoolManager.sol @@ -196,7 +196,6 @@ contract BinPoolManager is IBinPoolManager, ProtocolFees, Extsload { msg.sender, key, swapForY, 0, amountOut ); } else { - // clear the top 4 bits since they may be flagged lpFee = key.fee.getInitialLPFee(); } lpFee.validate(LPFeeLibrary.TEN_PERCENT_FEE); diff --git a/src/types/PoolKey.sol b/src/types/PoolKey.sol index 818812a0..647576b3 100644 --- a/src/types/PoolKey.sol +++ b/src/types/PoolKey.sol @@ -15,7 +15,7 @@ struct PoolKey { IHooks hooks; /// @notice The pool manager of the pool IPoolManager poolManager; - /// @notice The pool lp fee, capped at 1_000_000. The upper 4 bits determine if the hook sets any fees. + /// @notice The pool lp fee, capped at 1_000_000. If the pool has a dynamic fee then it must be exactly equal to 0x800000 uint24 fee; /// @notice Hooks callback and pool specific parameters, i.e. tickSpacing for CL, binStep for bin bytes32 parameters; diff --git a/test/libraries/LPFeeLibrary.t.sol b/test/libraries/LPFeeLibrary.t.sol index 04ec1f01..030368f8 100644 --- a/test/libraries/LPFeeLibrary.t.sol +++ b/test/libraries/LPFeeLibrary.t.sol @@ -22,12 +22,20 @@ contract LPFeeLibraryTest is Test { assertEq(LPFeeLibrary.isDynamicLPFee(0x100000), false); // 1111 1111 1111 1111 1111 1111 - assertEq(LPFeeLibrary.isDynamicLPFee(0xFFFFFF), true); + assertEq(LPFeeLibrary.isDynamicLPFee(0xFFFFFF), false); // 0111 1111 1111 1111 1111 1111 assertEq(LPFeeLibrary.isDynamicLPFee(0x7FFFFF), false); } + function testIsDynamicLPFeeFuzz(uint24 fee) public { + if (fee != 0x800000) { + assertEq(LPFeeLibrary.isDynamicLPFee(fee), false); + } else { + assertEq(LPFeeLibrary.isDynamicLPFee(fee), true); + } + } + function testGetInitialLPFee() public { // static assertEq(LPFeeLibrary.getInitialLPFee(0x000001), 0x000001); @@ -36,12 +44,16 @@ contract LPFeeLibraryTest is Test { assertEq(LPFeeLibrary.getInitialLPFee(0x001004), 0x001004); assertEq(LPFeeLibrary.getInitialLPFee(0x111020), 0x111020); assertEq(LPFeeLibrary.getInitialLPFee(0x511020), 0x511020); - + assertEq(LPFeeLibrary.getInitialLPFee(0xF00F05), 0xF00F05); + assertEq(LPFeeLibrary.getInitialLPFee(0x800310), 0x800310); + assertEq(LPFeeLibrary.getInitialLPFee(0x901020), 0x901020); + assertEq(LPFeeLibrary.getInitialLPFee(0x800001), 0x800001); + assertEq(LPFeeLibrary.getInitialLPFee(0x800010), 0x800010); + assertEq(LPFeeLibrary.getInitialLPFee(0x800100), 0x800100); + assertEq(LPFeeLibrary.getInitialLPFee(0x801000), 0x801000); + assertEq(LPFeeLibrary.getInitialLPFee(0x810000), 0x810000); // dynamic - assertEq(LPFeeLibrary.getInitialLPFee(0xF00F05), 0); - assertEq(LPFeeLibrary.getInitialLPFee(0x800310), 0); assertEq(LPFeeLibrary.getInitialLPFee(0x800000), 0); - assertEq(LPFeeLibrary.getInitialLPFee(0x901020), 0); } function testFuzzValidate(uint24 self, uint24 maxFee) public { diff --git a/test/pool-bin/BinHookReturnsFee.t.sol b/test/pool-bin/BinHookReturnsFee.t.sol index 55b1514d..27f0cfca 100644 --- a/test/pool-bin/BinHookReturnsFee.t.sol +++ b/test/pool-bin/BinHookReturnsFee.t.sol @@ -88,7 +88,7 @@ contract BinHookReturnsFeeTest is Test, BinTestHelper { currency1: currency1, hooks: dynamicReturnsFeesHook, poolManager: poolManager, - fee: LPFeeLibrary.DYNAMIC_FEE_FLAG, // 3000 = 0.3% + fee: LPFeeLibrary.DYNAMIC_FEE_FLAG, parameters: bytes32(uint256(dynamicReturnsFeesHook.getHooksRegistrationBitmap())).setBinStep(10) }); diff --git a/test/pool-bin/BinPoolManager.t.sol b/test/pool-bin/BinPoolManager.t.sol index 5a2935d5..852e8159 100644 --- a/test/pool-bin/BinPoolManager.t.sol +++ b/test/pool-bin/BinPoolManager.t.sol @@ -213,7 +213,7 @@ contract BinPoolManagerTest is Test, GasSnapshot, BinTestHelper { currency1: currency1, hooks: IHooks(address(binFeeManagerHook)), poolManager: IPoolManager(address(poolManager)), - fee: LPFeeLibrary.DYNAMIC_FEE_FLAG + uint24(3000), // 3000 = 0.3% + fee: LPFeeLibrary.DYNAMIC_FEE_FLAG, parameters: bytes32(uint256(bitMap)).setBinStep(10) }); @@ -224,6 +224,24 @@ contract BinPoolManagerTest is Test, GasSnapshot, BinTestHelper { poolManager.updateDynamicLPFee(key, dynamicSwapFee); } + function testInitializeInvalidFee() public { + uint16 bitMap = 0x0040; // 0000 0000 0100 0000 (before swap call) + BinFeeManagerHook binFeeManagerHook = new BinFeeManagerHook(poolManager); + binFeeManagerHook.setHooksRegistrationBitmap(bitMap); + + key = PoolKey({ + currency0: currency0, + currency1: currency1, + hooks: IHooks(address(binFeeManagerHook)), + poolManager: IPoolManager(address(poolManager)), + fee: LPFeeLibrary.DYNAMIC_FEE_FLAG + 1, + parameters: bytes32(uint256(bitMap)).setBinStep(10) + }); + + vm.expectRevert(LPFeeLibrary.FeeTooLarge.selector); + poolManager.initialize(key, 10, new bytes(0)); + } + function testInitializeSwapFeeTooLarge() public { uint24 swapFee = LPFeeLibrary.TEN_PERCENT_FEE + 1; @@ -888,7 +906,7 @@ contract BinPoolManagerTest is Test, GasSnapshot, BinTestHelper { currency1: currency1, hooks: IHooks(address(binFeeManagerHook)), poolManager: IPoolManager(address(poolManager)), - fee: LPFeeLibrary.DYNAMIC_FEE_FLAG + uint24(3000), // 3000 = 0.3% + fee: LPFeeLibrary.DYNAMIC_FEE_FLAG, parameters: bytes32(uint256(bitMap)).setBinStep(10) }); @@ -925,7 +943,7 @@ contract BinPoolManagerTest is Test, GasSnapshot, BinTestHelper { currency1: currency1, hooks: IHooks(address(binFeeManagerHook)), poolManager: IPoolManager(address(poolManager)), - fee: LPFeeLibrary.DYNAMIC_FEE_FLAG + uint24(3000), // 3000 = 0.3% + fee: LPFeeLibrary.DYNAMIC_FEE_FLAG, parameters: bytes32(uint256(bitMap)).setBinStep(10) }); poolManager.initialize(key, activeId, new bytes(0)); diff --git a/test/pool-bin/libraries/BinPoolFee.t.sol b/test/pool-bin/libraries/BinPoolFee.t.sol index ccee087e..161ace40 100644 --- a/test/pool-bin/libraries/BinPoolFee.t.sol +++ b/test/pool-bin/libraries/BinPoolFee.t.sol @@ -138,7 +138,7 @@ contract BinPoolFeeTest is BinTestHelper { currency1: currency1, hooks: IHooks(address(binFeeManagerHook)), poolManager: IPoolManager(address(poolManager)), - fee: LPFeeLibrary.DYNAMIC_FEE_FLAG + uint24(10_000), // 10_000 = 1% + fee: LPFeeLibrary.DYNAMIC_FEE_FLAG, parameters: bytes32(uint256(bitMap)).setBinStep(10) }); @@ -158,7 +158,7 @@ contract BinPoolFeeTest is BinTestHelper { hooks: IHooks(address(mockFeeManagerHook)), poolManager: IPoolManager(address(poolManager)), /// @dev dynamic swap fee is 0 when pool is initialized, hence 0.3% will be ignored - fee: LPFeeLibrary.DYNAMIC_FEE_FLAG + uint24(3000), + fee: LPFeeLibrary.DYNAMIC_FEE_FLAG, parameters: BinPoolParametersHelper.setBinStep( bytes32(uint256(mockFeeManagerHook.getHooksRegistrationBitmap())), 10 ) @@ -291,7 +291,7 @@ contract BinPoolFeeTest is BinTestHelper { currency1: currency1, hooks: IHooks(address(binFeeManagerHook)), poolManager: IPoolManager(address(poolManager)), - fee: LPFeeLibrary.DYNAMIC_FEE_FLAG + poolFee, + fee: LPFeeLibrary.DYNAMIC_FEE_FLAG, // parameters: poolParam // binStep parameters: bytes32(uint256(bitMap)).setBinStep(10) }); @@ -332,7 +332,7 @@ contract BinPoolFeeTest is BinTestHelper { currency1: currency1, hooks: IHooks(address(binFeeManagerHook)), poolManager: IPoolManager(address(poolManager)), - fee: LPFeeLibrary.DYNAMIC_FEE_FLAG + uint24(10_000), // 10_000 = 1% + fee: LPFeeLibrary.DYNAMIC_FEE_FLAG, parameters: bytes32(uint256(bitMap)).setBinStep(10) }); diff --git a/test/pool-cl/CLPoolManager.t.sol b/test/pool-cl/CLPoolManager.t.sol index 8ff939f7..c525e79e 100644 --- a/test/pool-cl/CLPoolManager.t.sol +++ b/test/pool-cl/CLPoolManager.t.sol @@ -359,7 +359,7 @@ contract CLPoolManagerTest is Test, NoIsolate, Deployers, TokenFixture, GasSnaps } else if (!_validateHookPermissionsConflict(key)) { vm.expectRevert(abi.encodeWithSelector(Hooks.HookPermissionsValidationError.selector)); poolManager.initialize(key, sqrtPriceX96, ZERO_BYTES); - } else if (key.fee & LPFeeLibrary.FEE_MASK > LPFeeLibrary.ONE_HUNDRED_PERCENT_FEE) { + } else if (key.fee > LPFeeLibrary.ONE_HUNDRED_PERCENT_FEE) { vm.expectRevert(abi.encodeWithSelector(IProtocolFees.FeeTooLarge.selector)); poolManager.initialize(key, sqrtPriceX96, ZERO_BYTES); } else { @@ -662,7 +662,7 @@ contract CLPoolManagerTest is Test, NoIsolate, Deployers, TokenFixture, GasSnaps PoolKey memory key = PoolKey({ currency0: currency0, currency1: currency1, - fee: LPFeeLibrary.DYNAMIC_FEE_FLAG + uint24(3000), // 3000 = 0.3% + fee: LPFeeLibrary.DYNAMIC_FEE_FLAG, hooks: IHooks(address(clFeeManagerHook)), poolManager: poolManager, parameters: CLPoolParametersHelper.setTickSpacing( @@ -676,6 +676,23 @@ contract CLPoolManagerTest is Test, NoIsolate, Deployers, TokenFixture, GasSnaps poolManager.initialize(key, SQRT_RATIO_1_1, ZERO_BYTES); } + function test_initialize_failsDynamicFeeInvalid() public { + clFeeManagerHook.setHooksRegistrationBitmap(uint16(1 << HOOKS_AFTER_INITIALIZE_OFFSET)); + PoolKey memory key = PoolKey({ + currency0: currency0, + currency1: currency1, + fee: LPFeeLibrary.DYNAMIC_FEE_FLAG + 1, + hooks: IHooks(address(clFeeManagerHook)), + poolManager: poolManager, + parameters: CLPoolParametersHelper.setTickSpacing( + bytes32(uint256(clFeeManagerHook.getHooksRegistrationBitmap())), 10 + ) + }); + + vm.expectRevert(LPFeeLibrary.FeeTooLarge.selector); + poolManager.initialize(key, SQRT_RATIO_1_1, ZERO_BYTES); + } + // ************** *************** // // ************** modifyPosition *************** // // ************** *************** // @@ -1744,7 +1761,7 @@ contract CLPoolManagerTest is Test, NoIsolate, Deployers, TokenFixture, GasSnaps PoolKey memory key = PoolKey({ currency0: currency0, currency1: currency1, - fee: LPFeeLibrary.DYNAMIC_FEE_FLAG + uint24(3000), // 0.3% + fee: LPFeeLibrary.DYNAMIC_FEE_FLAG, // 0.3% hooks: IHooks(address(clFeeManagerHook)), poolManager: poolManager, parameters: bytes32(uint256((60 << 16) | clFeeManagerHook.getHooksRegistrationBitmap())) @@ -2725,7 +2742,7 @@ contract CLPoolManagerTest is Test, NoIsolate, Deployers, TokenFixture, GasSnaps PoolKey memory key = PoolKey({ currency0: currency0, currency1: currency1, - fee: LPFeeLibrary.DYNAMIC_FEE_FLAG + uint24(3000), // 3000 = 0.3% + fee: LPFeeLibrary.DYNAMIC_FEE_FLAG, hooks: IHooks(address(clFeeManagerHook)), poolManager: poolManager, parameters: bytes32(uint256(10) << 16) @@ -2761,7 +2778,7 @@ contract CLPoolManagerTest is Test, NoIsolate, Deployers, TokenFixture, GasSnaps PoolKey memory key = PoolKey({ currency0: currency0, currency1: currency1, - fee: LPFeeLibrary.DYNAMIC_FEE_FLAG + uint24(3000), // 3000 = 0.3% + fee: LPFeeLibrary.DYNAMIC_FEE_FLAG, hooks: IHooks(address(clFeeManagerHook)), poolManager: poolManager, parameters: bytes32(uint256((10 << 16) | clFeeManagerHook.getHooksRegistrationBitmap())) diff --git a/test/pool-cl/libraries/CLPool.t.sol b/test/pool-cl/libraries/CLPool.t.sol index 3bff44ed..3a7ba1d4 100644 --- a/test/pool-cl/libraries/CLPool.t.sol +++ b/test/pool-cl/libraries/CLPool.t.sol @@ -18,6 +18,7 @@ import {FixedPoint128} from "../../../src/pool-cl/libraries/FixedPoint128.sol"; import {ICLPoolManager} from "../../../src/pool-cl/interfaces/ICLPoolManager.sol"; import {LPFeeLibrary} from "../../../src/libraries/LPFeeLibrary.sol"; import {ProtocolFeeLibrary} from "../../../src/libraries/ProtocolFeeLibrary.sol"; +import {BalanceDelta, BalanceDeltaLibrary} from "../../../src/types/BalanceDelta.sol"; contract PoolTest is Test { using CLPool for CLPool.State; @@ -98,6 +99,28 @@ contract PoolTest is Test { CLPool.SwapParams memory swapParams, uint24 lpFee ) public { + // modifyLiquidityParams = CLPool.ModifyLiquidityParams({ + // owner: 0x250Eb93F2C350590E52cdb977b8BcF502a1Db7e7, + // tickLower: -402986, + // tickUpper: 50085, + // liquidityDelta: 33245614918536803008426086500145, + // tickSpacing: 1, + // salt: 0xfd9c91c4f1bbf3d855ba0a973b97c685c1dd51875a574392ef94ab56d7a72528 + // }); + // swapParams = CLPool.SwapParams({ + // tickSpacing: 8807, + // zeroForOne: true, + // amountSpecified: 20406714586857485490153777552586525, + // sqrtPriceLimitX96: 3669890892491818487, + // lpFeeOverride: 440 + // }); + // TODO: find a better way to cover following case: + // 1. when amountSpecified is large enough + // 2. and the effect price is either too large or too small (due to larger price slippage or inproper liquidity range) + // It will cause the amountUnspecified to be out of int128 range hence the tx reverts with SafeCastOverflow + // try to comment following three limitations and uncomment above case and rerun the test to verify + modifyLiquidityParams.tickLower = -100; + modifyLiquidityParams.tickUpper = 100; swapParams.amountSpecified = int256(bound(swapParams.amountSpecified, 0, type(int128).max)); testModifyPosition(sqrtPriceX96, modifyLiquidityParams, lpFee); @@ -149,7 +172,13 @@ contract PoolTest is Test { vm.expectRevert(CLPool.InvalidFeeForExactOut.selector); } - state.swap(swapParams); + (BalanceDelta delta,) = state.swap(swapParams); + + if (swapParams.amountSpecified == 0) { + // early return if amountSpecified is 0 + assertTrue(delta == BalanceDeltaLibrary.ZERO_DELTA); + return; + } if ( modifyLiquidityParams.liquidityDelta == 0 From 2099560c852d84430a7c2d06ea94a27b74619afd Mon Sep 17 00:00:00 2001 From: chef-burger <137024020+chefburger@users.noreply.github.com> Date: Thu, 30 May 2024 10:45:44 +0800 Subject: [PATCH 2/2] optimization: update solc version to 0.8.26 (#53) --- .forge-snapshots/BinHookTest#testBurnSucceedsWithHook.snap | 2 +- .../BinHookTest#testDonateSucceedsWithHook.snap | 2 +- .../BinHookTest#testInitializeSucceedsWithHook.snap | 2 +- .forge-snapshots/BinHookTest#testMintSucceedsWithHook.snap | 2 +- .forge-snapshots/BinHookTest#testSwapSucceedsWithHook.snap | 2 +- .../BinPoolManagerTest#testBurnNativeCurrency.snap | 2 +- .../BinPoolManagerTest#testFuzzUpdateDynamicLPFee.snap | 2 +- .forge-snapshots/BinPoolManagerTest#testGasBurnHalfBin.snap | 2 +- .../BinPoolManagerTest#testGasBurnNineBins.snap | 2 +- .forge-snapshots/BinPoolManagerTest#testGasBurnOneBin.snap | 2 +- .forge-snapshots/BinPoolManagerTest#testGasDonate.snap | 2 +- .../BinPoolManagerTest#testGasMintNneBins-1.snap | 2 +- .../BinPoolManagerTest#testGasMintNneBins-2.snap | 2 +- .../BinPoolManagerTest#testGasMintOneBin-1.snap | 2 +- .../BinPoolManagerTest#testGasMintOneBin-2.snap | 2 +- .../BinPoolManagerTest#testGasSwapMultipleBins.snap | 2 +- .../BinPoolManagerTest#testGasSwapOverBigBinIdGate.snap | 2 +- .../BinPoolManagerTest#testGasSwapSingleBin.snap | 2 +- .../BinPoolManagerTest#testMintNativeCurrency.snap | 2 +- .../CLPoolManagerTest#addLiquidity_fromEmpty.snap | 2 +- .../CLPoolManagerTest#addLiquidity_fromNonEmpty.snap | 2 +- .../CLPoolManagerTest#addLiquidity_nativeToken.snap | 2 +- .forge-snapshots/CLPoolManagerTest#donateBothTokens.snap | 2 +- .forge-snapshots/CLPoolManagerTest#gasDonateOneToken.snap | 2 +- .../CLPoolManagerTest#initializeWithoutHooks.snap | 2 +- .../CLPoolManagerTest#removeLiquidity_toNonEmpty.snap | 2 +- .../CLPoolManagerTest#swap_againstLiquidity.snap | 2 +- .../CLPoolManagerTest#swap_leaveSurplusTokenInVault.snap | 2 +- .../CLPoolManagerTest#swap_runOutOfLiquidity.snap | 2 +- .forge-snapshots/CLPoolManagerTest#swap_simple.snap | 2 +- .../CLPoolManagerTest#swap_useSurplusTokenAsInput.snap | 2 +- .forge-snapshots/CLPoolManagerTest#swap_withHooks.snap | 2 +- .forge-snapshots/CLPoolManagerTest#swap_withNative.snap | 2 +- .../CLPoolManagerTest#testFuzzUpdateDynamicLPFee.snap | 2 +- .forge-snapshots/ExtsloadTest#extsloadInBatch.snap | 2 +- ...etAmount1Delta_gasCostForAmount1WhereRoundUpIsFalse.snap | 2 +- ...getAmount1Delta_gasCostForAmount1WhereRoundUpIsTrue.snap | 2 +- .../SwapMathTest#SwapOneForZeroExactInCapped.snap | 2 +- .../SwapMathTest#SwapOneForZeroExactInPartial.snap | 2 +- .../SwapMathTest#SwapOneForZeroExactOutCapped.snap | 2 +- .../SwapMathTest#SwapOneForZeroExactOutPartial.snap | 2 +- .../SwapMathTest#SwapZeroForOneExactInCapped.snap | 2 +- .../SwapMathTest#SwapZeroForOneExactInPartial.snap | 2 +- .../SwapMathTest#SwapZeroForOneExactOutCapped.snap | 2 +- .../SwapMathTest#SwapZeroForOneExactOutPartial.snap | 2 +- .../TickTest#tickSpacingToMaxLiquidityPerTick.snap | 2 +- .forge-snapshots/TickTest#update.snap | 2 +- .forge-snapshots/VaultTest#lockSettledWhenAddLiquidity.snap | 2 +- .forge-snapshots/VaultTest#lockSettledWhenFlashloan.snap | 2 +- .forge-snapshots/VaultTest#lockSettledWhenMultiHopSwap.snap | 2 +- .forge-snapshots/VaultTest#lockSettledWhenSwap.snap | 2 +- .forge-snapshots/VaultTest#testLock_NoOp.snap | 2 +- foundry.toml | 6 +++--- test/VaultToken.t.sol | 2 +- 54 files changed, 56 insertions(+), 56 deletions(-) diff --git a/.forge-snapshots/BinHookTest#testBurnSucceedsWithHook.snap b/.forge-snapshots/BinHookTest#testBurnSucceedsWithHook.snap index 2e7b67d1..0ccfc1df 100644 --- a/.forge-snapshots/BinHookTest#testBurnSucceedsWithHook.snap +++ b/.forge-snapshots/BinHookTest#testBurnSucceedsWithHook.snap @@ -1 +1 @@ -181729 \ No newline at end of file +180826 \ No newline at end of file diff --git a/.forge-snapshots/BinHookTest#testDonateSucceedsWithHook.snap b/.forge-snapshots/BinHookTest#testDonateSucceedsWithHook.snap index 1a710776..a36c9ed3 100644 --- a/.forge-snapshots/BinHookTest#testDonateSucceedsWithHook.snap +++ b/.forge-snapshots/BinHookTest#testDonateSucceedsWithHook.snap @@ -1 +1 @@ -185616 \ No newline at end of file +184747 \ No newline at end of file diff --git a/.forge-snapshots/BinHookTest#testInitializeSucceedsWithHook.snap b/.forge-snapshots/BinHookTest#testInitializeSucceedsWithHook.snap index f8d3252e..033fcda0 100644 --- a/.forge-snapshots/BinHookTest#testInitializeSucceedsWithHook.snap +++ b/.forge-snapshots/BinHookTest#testInitializeSucceedsWithHook.snap @@ -1 +1 @@ -137573 \ No newline at end of file +137347 \ No newline at end of file diff --git a/.forge-snapshots/BinHookTest#testMintSucceedsWithHook.snap b/.forge-snapshots/BinHookTest#testMintSucceedsWithHook.snap index 0014efcd..5f53ee3e 100644 --- a/.forge-snapshots/BinHookTest#testMintSucceedsWithHook.snap +++ b/.forge-snapshots/BinHookTest#testMintSucceedsWithHook.snap @@ -1 +1 @@ -331570 \ No newline at end of file +331343 \ No newline at end of file diff --git a/.forge-snapshots/BinHookTest#testSwapSucceedsWithHook.snap b/.forge-snapshots/BinHookTest#testSwapSucceedsWithHook.snap index 3e695acc..a3bf0533 100644 --- a/.forge-snapshots/BinHookTest#testSwapSucceedsWithHook.snap +++ b/.forge-snapshots/BinHookTest#testSwapSucceedsWithHook.snap @@ -1 +1 @@ -193842 \ No newline at end of file +192943 \ No newline at end of file diff --git a/.forge-snapshots/BinPoolManagerTest#testBurnNativeCurrency.snap b/.forge-snapshots/BinPoolManagerTest#testBurnNativeCurrency.snap index 3c53920f..7b02326e 100644 --- a/.forge-snapshots/BinPoolManagerTest#testBurnNativeCurrency.snap +++ b/.forge-snapshots/BinPoolManagerTest#testBurnNativeCurrency.snap @@ -1 +1 @@ -138277 \ No newline at end of file +136989 \ No newline at end of file diff --git a/.forge-snapshots/BinPoolManagerTest#testFuzzUpdateDynamicLPFee.snap b/.forge-snapshots/BinPoolManagerTest#testFuzzUpdateDynamicLPFee.snap index bb7187ce..31fc91f1 100644 --- a/.forge-snapshots/BinPoolManagerTest#testFuzzUpdateDynamicLPFee.snap +++ b/.forge-snapshots/BinPoolManagerTest#testFuzzUpdateDynamicLPFee.snap @@ -1 +1 @@ -32557 \ No newline at end of file +32533 \ No newline at end of file diff --git a/.forge-snapshots/BinPoolManagerTest#testGasBurnHalfBin.snap b/.forge-snapshots/BinPoolManagerTest#testGasBurnHalfBin.snap index 0c2d1d3b..659516f9 100644 --- a/.forge-snapshots/BinPoolManagerTest#testGasBurnHalfBin.snap +++ b/.forge-snapshots/BinPoolManagerTest#testGasBurnHalfBin.snap @@ -1 +1 @@ -148315 \ No newline at end of file +146707 \ No newline at end of file diff --git a/.forge-snapshots/BinPoolManagerTest#testGasBurnNineBins.snap b/.forge-snapshots/BinPoolManagerTest#testGasBurnNineBins.snap index 3241e480..a9aa44ff 100644 --- a/.forge-snapshots/BinPoolManagerTest#testGasBurnNineBins.snap +++ b/.forge-snapshots/BinPoolManagerTest#testGasBurnNineBins.snap @@ -1 +1 @@ -296230 \ No newline at end of file +294285 \ No newline at end of file diff --git a/.forge-snapshots/BinPoolManagerTest#testGasBurnOneBin.snap b/.forge-snapshots/BinPoolManagerTest#testGasBurnOneBin.snap index 830bdfee..b11075b5 100644 --- a/.forge-snapshots/BinPoolManagerTest#testGasBurnOneBin.snap +++ b/.forge-snapshots/BinPoolManagerTest#testGasBurnOneBin.snap @@ -1 +1 @@ -131487 \ No newline at end of file +130198 \ No newline at end of file diff --git a/.forge-snapshots/BinPoolManagerTest#testGasDonate.snap b/.forge-snapshots/BinPoolManagerTest#testGasDonate.snap index b7627590..11afa3d3 100644 --- a/.forge-snapshots/BinPoolManagerTest#testGasDonate.snap +++ b/.forge-snapshots/BinPoolManagerTest#testGasDonate.snap @@ -1 +1 @@ -120359 \ No newline at end of file +119160 \ No newline at end of file diff --git a/.forge-snapshots/BinPoolManagerTest#testGasMintNneBins-1.snap b/.forge-snapshots/BinPoolManagerTest#testGasMintNneBins-1.snap index 07411f98..4b6d94a8 100644 --- a/.forge-snapshots/BinPoolManagerTest#testGasMintNneBins-1.snap +++ b/.forge-snapshots/BinPoolManagerTest#testGasMintNneBins-1.snap @@ -1 +1 @@ -977517 \ No newline at end of file +975956 \ No newline at end of file diff --git a/.forge-snapshots/BinPoolManagerTest#testGasMintNneBins-2.snap b/.forge-snapshots/BinPoolManagerTest#testGasMintNneBins-2.snap index 3df84ad8..188f8199 100644 --- a/.forge-snapshots/BinPoolManagerTest#testGasMintNneBins-2.snap +++ b/.forge-snapshots/BinPoolManagerTest#testGasMintNneBins-2.snap @@ -1 +1 @@ -339707 \ No newline at end of file +338146 \ No newline at end of file diff --git a/.forge-snapshots/BinPoolManagerTest#testGasMintOneBin-1.snap b/.forge-snapshots/BinPoolManagerTest#testGasMintOneBin-1.snap index 57cce71d..e89ce9d7 100644 --- a/.forge-snapshots/BinPoolManagerTest#testGasMintOneBin-1.snap +++ b/.forge-snapshots/BinPoolManagerTest#testGasMintOneBin-1.snap @@ -1 +1 @@ -343184 \ No newline at end of file +341727 \ No newline at end of file diff --git a/.forge-snapshots/BinPoolManagerTest#testGasMintOneBin-2.snap b/.forge-snapshots/BinPoolManagerTest#testGasMintOneBin-2.snap index 4f289951..9f30794c 100644 --- a/.forge-snapshots/BinPoolManagerTest#testGasMintOneBin-2.snap +++ b/.forge-snapshots/BinPoolManagerTest#testGasMintOneBin-2.snap @@ -1 +1 @@ -146127 \ No newline at end of file +144670 \ No newline at end of file diff --git a/.forge-snapshots/BinPoolManagerTest#testGasSwapMultipleBins.snap b/.forge-snapshots/BinPoolManagerTest#testGasSwapMultipleBins.snap index c80f85ba..7210bb1a 100644 --- a/.forge-snapshots/BinPoolManagerTest#testGasSwapMultipleBins.snap +++ b/.forge-snapshots/BinPoolManagerTest#testGasSwapMultipleBins.snap @@ -1 +1 @@ -180562 \ No newline at end of file +179189 \ No newline at end of file diff --git a/.forge-snapshots/BinPoolManagerTest#testGasSwapOverBigBinIdGate.snap b/.forge-snapshots/BinPoolManagerTest#testGasSwapOverBigBinIdGate.snap index 138ac9d4..a7c0f04c 100644 --- a/.forge-snapshots/BinPoolManagerTest#testGasSwapOverBigBinIdGate.snap +++ b/.forge-snapshots/BinPoolManagerTest#testGasSwapOverBigBinIdGate.snap @@ -1 +1 @@ -186545 \ No newline at end of file +185172 \ No newline at end of file diff --git a/.forge-snapshots/BinPoolManagerTest#testGasSwapSingleBin.snap b/.forge-snapshots/BinPoolManagerTest#testGasSwapSingleBin.snap index a6455c0d..81af7a1e 100644 --- a/.forge-snapshots/BinPoolManagerTest#testGasSwapSingleBin.snap +++ b/.forge-snapshots/BinPoolManagerTest#testGasSwapSingleBin.snap @@ -1 +1 @@ -138925 \ No newline at end of file +137567 \ No newline at end of file diff --git a/.forge-snapshots/BinPoolManagerTest#testMintNativeCurrency.snap b/.forge-snapshots/BinPoolManagerTest#testMintNativeCurrency.snap index c388a734..3289cd13 100644 --- a/.forge-snapshots/BinPoolManagerTest#testMintNativeCurrency.snap +++ b/.forge-snapshots/BinPoolManagerTest#testMintNativeCurrency.snap @@ -1 +1 @@ -309700 \ No newline at end of file +308239 \ No newline at end of file diff --git a/.forge-snapshots/CLPoolManagerTest#addLiquidity_fromEmpty.snap b/.forge-snapshots/CLPoolManagerTest#addLiquidity_fromEmpty.snap index dbc20106..decf71c1 100644 --- a/.forge-snapshots/CLPoolManagerTest#addLiquidity_fromEmpty.snap +++ b/.forge-snapshots/CLPoolManagerTest#addLiquidity_fromEmpty.snap @@ -1 +1 @@ -362978 \ No newline at end of file +360155 \ No newline at end of file diff --git a/.forge-snapshots/CLPoolManagerTest#addLiquidity_fromNonEmpty.snap b/.forge-snapshots/CLPoolManagerTest#addLiquidity_fromNonEmpty.snap index 9809932f..11779656 100644 --- a/.forge-snapshots/CLPoolManagerTest#addLiquidity_fromNonEmpty.snap +++ b/.forge-snapshots/CLPoolManagerTest#addLiquidity_fromNonEmpty.snap @@ -1 +1 @@ -178146 \ No newline at end of file +175323 \ No newline at end of file diff --git a/.forge-snapshots/CLPoolManagerTest#addLiquidity_nativeToken.snap b/.forge-snapshots/CLPoolManagerTest#addLiquidity_nativeToken.snap index c191a03b..3da5abf3 100644 --- a/.forge-snapshots/CLPoolManagerTest#addLiquidity_nativeToken.snap +++ b/.forge-snapshots/CLPoolManagerTest#addLiquidity_nativeToken.snap @@ -1 +1 @@ -248182 \ No newline at end of file +245309 \ No newline at end of file diff --git a/.forge-snapshots/CLPoolManagerTest#donateBothTokens.snap b/.forge-snapshots/CLPoolManagerTest#donateBothTokens.snap index bd36e770..420669e2 100644 --- a/.forge-snapshots/CLPoolManagerTest#donateBothTokens.snap +++ b/.forge-snapshots/CLPoolManagerTest#donateBothTokens.snap @@ -1 +1 @@ -170745 \ No newline at end of file +168381 \ No newline at end of file diff --git a/.forge-snapshots/CLPoolManagerTest#gasDonateOneToken.snap b/.forge-snapshots/CLPoolManagerTest#gasDonateOneToken.snap index 004cff8a..9866672d 100644 --- a/.forge-snapshots/CLPoolManagerTest#gasDonateOneToken.snap +++ b/.forge-snapshots/CLPoolManagerTest#gasDonateOneToken.snap @@ -1 +1 @@ -114589 \ No newline at end of file +112221 \ No newline at end of file diff --git a/.forge-snapshots/CLPoolManagerTest#initializeWithoutHooks.snap b/.forge-snapshots/CLPoolManagerTest#initializeWithoutHooks.snap index 78a29c3e..0b05c93e 100644 --- a/.forge-snapshots/CLPoolManagerTest#initializeWithoutHooks.snap +++ b/.forge-snapshots/CLPoolManagerTest#initializeWithoutHooks.snap @@ -1 +1 @@ -59781 \ No newline at end of file +59778 \ No newline at end of file diff --git a/.forge-snapshots/CLPoolManagerTest#removeLiquidity_toNonEmpty.snap b/.forge-snapshots/CLPoolManagerTest#removeLiquidity_toNonEmpty.snap index df4fffbd..9a79bb53 100644 --- a/.forge-snapshots/CLPoolManagerTest#removeLiquidity_toNonEmpty.snap +++ b/.forge-snapshots/CLPoolManagerTest#removeLiquidity_toNonEmpty.snap @@ -1 +1 @@ -124243 \ No newline at end of file +121412 \ No newline at end of file diff --git a/.forge-snapshots/CLPoolManagerTest#swap_againstLiquidity.snap b/.forge-snapshots/CLPoolManagerTest#swap_againstLiquidity.snap index f1835fcf..f2421731 100644 --- a/.forge-snapshots/CLPoolManagerTest#swap_againstLiquidity.snap +++ b/.forge-snapshots/CLPoolManagerTest#swap_againstLiquidity.snap @@ -1 +1 @@ -141453 \ No newline at end of file +138691 \ No newline at end of file diff --git a/.forge-snapshots/CLPoolManagerTest#swap_leaveSurplusTokenInVault.snap b/.forge-snapshots/CLPoolManagerTest#swap_leaveSurplusTokenInVault.snap index 83dd93e0..b2933bd0 100644 --- a/.forge-snapshots/CLPoolManagerTest#swap_leaveSurplusTokenInVault.snap +++ b/.forge-snapshots/CLPoolManagerTest#swap_leaveSurplusTokenInVault.snap @@ -1 +1 @@ -174968 \ No newline at end of file +172201 \ No newline at end of file diff --git a/.forge-snapshots/CLPoolManagerTest#swap_runOutOfLiquidity.snap b/.forge-snapshots/CLPoolManagerTest#swap_runOutOfLiquidity.snap index 818ca8fb..0d3ad4ce 100644 --- a/.forge-snapshots/CLPoolManagerTest#swap_runOutOfLiquidity.snap +++ b/.forge-snapshots/CLPoolManagerTest#swap_runOutOfLiquidity.snap @@ -1 +1 @@ -161331 \ No newline at end of file +158605 \ No newline at end of file diff --git a/.forge-snapshots/CLPoolManagerTest#swap_simple.snap b/.forge-snapshots/CLPoolManagerTest#swap_simple.snap index 043583b9..9fa27f27 100644 --- a/.forge-snapshots/CLPoolManagerTest#swap_simple.snap +++ b/.forge-snapshots/CLPoolManagerTest#swap_simple.snap @@ -1 +1 @@ -79416 \ No newline at end of file +76655 \ No newline at end of file diff --git a/.forge-snapshots/CLPoolManagerTest#swap_useSurplusTokenAsInput.snap b/.forge-snapshots/CLPoolManagerTest#swap_useSurplusTokenAsInput.snap index 5153cc63..1df4a010 100644 --- a/.forge-snapshots/CLPoolManagerTest#swap_useSurplusTokenAsInput.snap +++ b/.forge-snapshots/CLPoolManagerTest#swap_useSurplusTokenAsInput.snap @@ -1 +1 @@ -153614 \ No newline at end of file +150853 \ No newline at end of file diff --git a/.forge-snapshots/CLPoolManagerTest#swap_withHooks.snap b/.forge-snapshots/CLPoolManagerTest#swap_withHooks.snap index 30c78f9c..6c749c8a 100644 --- a/.forge-snapshots/CLPoolManagerTest#swap_withHooks.snap +++ b/.forge-snapshots/CLPoolManagerTest#swap_withHooks.snap @@ -1 +1 @@ -96229 \ No newline at end of file +93547 \ No newline at end of file diff --git a/.forge-snapshots/CLPoolManagerTest#swap_withNative.snap b/.forge-snapshots/CLPoolManagerTest#swap_withNative.snap index 697d07cc..5206d3e8 100644 --- a/.forge-snapshots/CLPoolManagerTest#swap_withNative.snap +++ b/.forge-snapshots/CLPoolManagerTest#swap_withNative.snap @@ -1 +1 @@ -79419 \ No newline at end of file +76658 \ No newline at end of file diff --git a/.forge-snapshots/CLPoolManagerTest#testFuzzUpdateDynamicLPFee.snap b/.forge-snapshots/CLPoolManagerTest#testFuzzUpdateDynamicLPFee.snap index f4a4a363..6e03401a 100644 --- a/.forge-snapshots/CLPoolManagerTest#testFuzzUpdateDynamicLPFee.snap +++ b/.forge-snapshots/CLPoolManagerTest#testFuzzUpdateDynamicLPFee.snap @@ -1 +1 @@ -32261 \ No newline at end of file +32316 \ No newline at end of file diff --git a/.forge-snapshots/ExtsloadTest#extsloadInBatch.snap b/.forge-snapshots/ExtsloadTest#extsloadInBatch.snap index 8f979894..6ed84f8e 100644 --- a/.forge-snapshots/ExtsloadTest#extsloadInBatch.snap +++ b/.forge-snapshots/ExtsloadTest#extsloadInBatch.snap @@ -1 +1 @@ -11374 \ No newline at end of file +11394 \ No newline at end of file diff --git a/.forge-snapshots/SqrtPriceMathTest#getAmount1Delta_gasCostForAmount1WhereRoundUpIsFalse.snap b/.forge-snapshots/SqrtPriceMathTest#getAmount1Delta_gasCostForAmount1WhereRoundUpIsFalse.snap index 1fc188de..e157b5b5 100644 --- a/.forge-snapshots/SqrtPriceMathTest#getAmount1Delta_gasCostForAmount1WhereRoundUpIsFalse.snap +++ b/.forge-snapshots/SqrtPriceMathTest#getAmount1Delta_gasCostForAmount1WhereRoundUpIsFalse.snap @@ -1 +1 @@ -525 \ No newline at end of file +520 \ No newline at end of file diff --git a/.forge-snapshots/SqrtPriceMathTest#getAmount1Delta_gasCostForAmount1WhereRoundUpIsTrue.snap b/.forge-snapshots/SqrtPriceMathTest#getAmount1Delta_gasCostForAmount1WhereRoundUpIsTrue.snap index 929530e8..70e36030 100644 --- a/.forge-snapshots/SqrtPriceMathTest#getAmount1Delta_gasCostForAmount1WhereRoundUpIsTrue.snap +++ b/.forge-snapshots/SqrtPriceMathTest#getAmount1Delta_gasCostForAmount1WhereRoundUpIsTrue.snap @@ -1 +1 @@ -653 \ No newline at end of file +648 \ No newline at end of file diff --git a/.forge-snapshots/SwapMathTest#SwapOneForZeroExactInCapped.snap b/.forge-snapshots/SwapMathTest#SwapOneForZeroExactInCapped.snap index 4c97b937..9a6039e9 100644 --- a/.forge-snapshots/SwapMathTest#SwapOneForZeroExactInCapped.snap +++ b/.forge-snapshots/SwapMathTest#SwapOneForZeroExactInCapped.snap @@ -1 +1 @@ -2239 \ No newline at end of file +2234 \ No newline at end of file diff --git a/.forge-snapshots/SwapMathTest#SwapOneForZeroExactInPartial.snap b/.forge-snapshots/SwapMathTest#SwapOneForZeroExactInPartial.snap index f8a37503..a71ad804 100644 --- a/.forge-snapshots/SwapMathTest#SwapOneForZeroExactInPartial.snap +++ b/.forge-snapshots/SwapMathTest#SwapOneForZeroExactInPartial.snap @@ -1 +1 @@ -3029 \ No newline at end of file +3019 \ No newline at end of file diff --git a/.forge-snapshots/SwapMathTest#SwapOneForZeroExactOutCapped.snap b/.forge-snapshots/SwapMathTest#SwapOneForZeroExactOutCapped.snap index 47c57f60..48e42dfb 100644 --- a/.forge-snapshots/SwapMathTest#SwapOneForZeroExactOutCapped.snap +++ b/.forge-snapshots/SwapMathTest#SwapOneForZeroExactOutCapped.snap @@ -1 +1 @@ -1981 \ No newline at end of file +1976 \ No newline at end of file diff --git a/.forge-snapshots/SwapMathTest#SwapOneForZeroExactOutPartial.snap b/.forge-snapshots/SwapMathTest#SwapOneForZeroExactOutPartial.snap index f8a37503..a71ad804 100644 --- a/.forge-snapshots/SwapMathTest#SwapOneForZeroExactOutPartial.snap +++ b/.forge-snapshots/SwapMathTest#SwapOneForZeroExactOutPartial.snap @@ -1 +1 @@ -3029 \ No newline at end of file +3019 \ No newline at end of file diff --git a/.forge-snapshots/SwapMathTest#SwapZeroForOneExactInCapped.snap b/.forge-snapshots/SwapMathTest#SwapZeroForOneExactInCapped.snap index 9606a0dd..21aeb5a6 100644 --- a/.forge-snapshots/SwapMathTest#SwapZeroForOneExactInCapped.snap +++ b/.forge-snapshots/SwapMathTest#SwapZeroForOneExactInCapped.snap @@ -1 +1 @@ -2229 \ No newline at end of file +2224 \ No newline at end of file diff --git a/.forge-snapshots/SwapMathTest#SwapZeroForOneExactInPartial.snap b/.forge-snapshots/SwapMathTest#SwapZeroForOneExactInPartial.snap index 80f7c30e..1a73c6cc 100644 --- a/.forge-snapshots/SwapMathTest#SwapZeroForOneExactInPartial.snap +++ b/.forge-snapshots/SwapMathTest#SwapZeroForOneExactInPartial.snap @@ -1 +1 @@ -3182 \ No newline at end of file +3177 \ No newline at end of file diff --git a/.forge-snapshots/SwapMathTest#SwapZeroForOneExactOutCapped.snap b/.forge-snapshots/SwapMathTest#SwapZeroForOneExactOutCapped.snap index 7237be0c..42e20350 100644 --- a/.forge-snapshots/SwapMathTest#SwapZeroForOneExactOutCapped.snap +++ b/.forge-snapshots/SwapMathTest#SwapZeroForOneExactOutCapped.snap @@ -1 +1 @@ -1971 \ No newline at end of file +1966 \ No newline at end of file diff --git a/.forge-snapshots/SwapMathTest#SwapZeroForOneExactOutPartial.snap b/.forge-snapshots/SwapMathTest#SwapZeroForOneExactOutPartial.snap index 80f7c30e..1a73c6cc 100644 --- a/.forge-snapshots/SwapMathTest#SwapZeroForOneExactOutPartial.snap +++ b/.forge-snapshots/SwapMathTest#SwapZeroForOneExactOutPartial.snap @@ -1 +1 @@ -3182 \ No newline at end of file +3177 \ No newline at end of file diff --git a/.forge-snapshots/TickTest#tickSpacingToMaxLiquidityPerTick.snap b/.forge-snapshots/TickTest#tickSpacingToMaxLiquidityPerTick.snap index 04170a36..5ec4258d 100644 --- a/.forge-snapshots/TickTest#tickSpacingToMaxLiquidityPerTick.snap +++ b/.forge-snapshots/TickTest#tickSpacingToMaxLiquidityPerTick.snap @@ -1 +1 @@ -1151 \ No newline at end of file +1159 \ No newline at end of file diff --git a/.forge-snapshots/TickTest#update.snap b/.forge-snapshots/TickTest#update.snap index 7b7e6841..201f1298 100644 --- a/.forge-snapshots/TickTest#update.snap +++ b/.forge-snapshots/TickTest#update.snap @@ -1 +1 @@ -134819 \ No newline at end of file +134827 \ No newline at end of file diff --git a/.forge-snapshots/VaultTest#lockSettledWhenAddLiquidity.snap b/.forge-snapshots/VaultTest#lockSettledWhenAddLiquidity.snap index f08826dc..01cd6f4e 100644 --- a/.forge-snapshots/VaultTest#lockSettledWhenAddLiquidity.snap +++ b/.forge-snapshots/VaultTest#lockSettledWhenAddLiquidity.snap @@ -1 +1 @@ -81624 \ No newline at end of file +81446 \ No newline at end of file diff --git a/.forge-snapshots/VaultTest#lockSettledWhenFlashloan.snap b/.forge-snapshots/VaultTest#lockSettledWhenFlashloan.snap index e188f56d..30c979e2 100644 --- a/.forge-snapshots/VaultTest#lockSettledWhenFlashloan.snap +++ b/.forge-snapshots/VaultTest#lockSettledWhenFlashloan.snap @@ -1 +1 @@ -121653 \ No newline at end of file +121465 \ No newline at end of file diff --git a/.forge-snapshots/VaultTest#lockSettledWhenMultiHopSwap.snap b/.forge-snapshots/VaultTest#lockSettledWhenMultiHopSwap.snap index 451d1a86..70082924 100644 --- a/.forge-snapshots/VaultTest#lockSettledWhenMultiHopSwap.snap +++ b/.forge-snapshots/VaultTest#lockSettledWhenMultiHopSwap.snap @@ -1 +1 @@ -45212 \ No newline at end of file +45034 \ No newline at end of file diff --git a/.forge-snapshots/VaultTest#lockSettledWhenSwap.snap b/.forge-snapshots/VaultTest#lockSettledWhenSwap.snap index 5c8eeda4..ecbcdd19 100644 --- a/.forge-snapshots/VaultTest#lockSettledWhenSwap.snap +++ b/.forge-snapshots/VaultTest#lockSettledWhenSwap.snap @@ -1 +1 @@ -45211 \ No newline at end of file +45033 \ No newline at end of file diff --git a/.forge-snapshots/VaultTest#testLock_NoOp.snap b/.forge-snapshots/VaultTest#testLock_NoOp.snap index dc6975ce..4aef5c16 100644 --- a/.forge-snapshots/VaultTest#testLock_NoOp.snap +++ b/.forge-snapshots/VaultTest#testLock_NoOp.snap @@ -1 +1 @@ -33260 \ No newline at end of file +33072 \ No newline at end of file diff --git a/foundry.toml b/foundry.toml index c96a6059..019a911e 100644 --- a/foundry.toml +++ b/foundry.toml @@ -1,14 +1,14 @@ [profile.default] src = 'src' out = 'foundry-out' -solc_version = '0.8.24' +solc_version = '0.8.26' optimizer_runs = 800 via_ir = false ffi = true fs_permissions = [ { access = "read-write", path = ".forge-snapshots/" }, { access = "read", path = "./foundry-out" }, - { access = "read", path = "./script/config"}, + { access = "read", path = "./script/config" }, ] evm_version = 'cancun' @@ -21,7 +21,7 @@ runs = 1000 runs = 10000 [profile.ci.invariant] -runs = 1000 # The number of calls to make in the invariant tests +runs = 1000 # The number of calls to make in the invariant tests call_override = false # Override calls fail_on_revert = false # Fail the test if the contract reverts diff --git a/test/VaultToken.t.sol b/test/VaultToken.t.sol index 5590db12..38d69286 100644 --- a/test/VaultToken.t.sol +++ b/test/VaultToken.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.24; +pragma solidity ^0.8.24; import {Test} from "forge-std/Test.sol"; import {VaultToken} from "../src/VaultToken.sol";