diff --git a/.forge-snapshots/update dynamic fee in before swap.snap b/.forge-snapshots/DynamicFees.swap_updateDynamicFeeInBeforeSwap.snap similarity index 100% rename from .forge-snapshots/update dynamic fee in before swap.snap rename to .forge-snapshots/DynamicFees.swap_updateDynamicFeeInBeforeSwap.snap diff --git a/.forge-snapshots/swap with dynamic fee.snap b/.forge-snapshots/DynamicFees.swap_withDynamicFee.snap similarity index 100% rename from .forge-snapshots/swap with dynamic fee.snap rename to .forge-snapshots/DynamicFees.swap_withDynamicFee.snap diff --git a/.forge-snapshots/HooksShouldCallBeforeSwap.snap b/.forge-snapshots/Hooks.callBeforeSwap.snap similarity index 100% rename from .forge-snapshots/HooksShouldCallBeforeSwap.snap rename to .forge-snapshots/Hooks.callBeforeSwap.snap diff --git a/.forge-snapshots/addLiquidity.snap b/.forge-snapshots/PoolManager.addLiquidity.snap similarity index 100% rename from .forge-snapshots/addLiquidity.snap rename to .forge-snapshots/PoolManager.addLiquidity.snap diff --git a/.forge-snapshots/addLiquidity with empty hook.snap b/.forge-snapshots/PoolManager.addLiquidity_withEmptyHook.snap similarity index 100% rename from .forge-snapshots/addLiquidity with empty hook.snap rename to .forge-snapshots/PoolManager.addLiquidity_withEmptyHook.snap diff --git a/.forge-snapshots/addLiquidity with native token.snap b/.forge-snapshots/PoolManager.addLiquidity_withNative.snap similarity index 100% rename from .forge-snapshots/addLiquidity with native token.snap rename to .forge-snapshots/PoolManager.addLiquidity_withNative.snap diff --git a/.forge-snapshots/poolManager bytecode size.snap b/.forge-snapshots/PoolManager.bytecodeSize.snap similarity index 100% rename from .forge-snapshots/poolManager bytecode size.snap rename to .forge-snapshots/PoolManager.bytecodeSize.snap diff --git a/.forge-snapshots/erc20 collect protocol fees.snap b/.forge-snapshots/PoolManager.collectProtocolFees_erc20.snap similarity index 100% rename from .forge-snapshots/erc20 collect protocol fees.snap rename to .forge-snapshots/PoolManager.collectProtocolFees_erc20.snap diff --git a/.forge-snapshots/native collect protocol fees.snap b/.forge-snapshots/PoolManager.collectProtocolFees_native.snap similarity index 100% rename from .forge-snapshots/native collect protocol fees.snap rename to .forge-snapshots/PoolManager.collectProtocolFees_native.snap diff --git a/.forge-snapshots/donate gas with 1 token.snap b/.forge-snapshots/PoolManager.donate_gasWith1Token.snap similarity index 100% rename from .forge-snapshots/donate gas with 1 token.snap rename to .forge-snapshots/PoolManager.donate_gasWith1Token.snap diff --git a/.forge-snapshots/donate gas with 2 tokens.snap b/.forge-snapshots/PoolManager.donate_gasWith2Tokens.snap similarity index 100% rename from .forge-snapshots/donate gas with 2 tokens.snap rename to .forge-snapshots/PoolManager.donate_gasWith2Tokens.snap diff --git a/.forge-snapshots/initialize.snap b/.forge-snapshots/PoolManager.initialize.snap similarity index 100% rename from .forge-snapshots/initialize.snap rename to .forge-snapshots/PoolManager.initialize.snap diff --git a/.forge-snapshots/removeLiquidity.snap b/.forge-snapshots/PoolManager.removeLiquidity.snap similarity index 100% rename from .forge-snapshots/removeLiquidity.snap rename to .forge-snapshots/PoolManager.removeLiquidity.snap diff --git a/.forge-snapshots/removeLiquidity with empty hook.snap b/.forge-snapshots/PoolManager.removeLiquidity_withEmptyHook.snap similarity index 100% rename from .forge-snapshots/removeLiquidity with empty hook.snap rename to .forge-snapshots/PoolManager.removeLiquidity_withEmptyHook.snap diff --git a/.forge-snapshots/removeLiquidity with native token.snap b/.forge-snapshots/PoolManager.removeLiquidity_withNative.snap similarity index 100% rename from .forge-snapshots/removeLiquidity with native token.snap rename to .forge-snapshots/PoolManager.removeLiquidity_withNative.snap diff --git a/.forge-snapshots/PoolManager.swap_againstLiquidity.snap b/.forge-snapshots/PoolManager.swap_againstLiquidity.snap new file mode 100644 index 000000000..8c57e0370 --- /dev/null +++ b/.forge-snapshots/PoolManager.swap_againstLiquidity.snap @@ -0,0 +1 @@ +61480 \ No newline at end of file diff --git a/.forge-snapshots/swap against liquidity with native token.snap b/.forge-snapshots/PoolManager.swap_againstLiquidityWithNativeToken.snap similarity index 100% rename from .forge-snapshots/swap against liquidity with native token.snap rename to .forge-snapshots/PoolManager.swap_againstLiquidityWithNativeToken.snap diff --git a/.forge-snapshots/PoolManager.swap_burn6909ForInput.snap b/.forge-snapshots/PoolManager.swap_burn6909ForInput.snap new file mode 100644 index 000000000..0b6bee6b5 --- /dev/null +++ b/.forge-snapshots/PoolManager.swap_burn6909ForInput.snap @@ -0,0 +1 @@ +79372 \ No newline at end of file diff --git a/.forge-snapshots/PoolManager.swap_burnNative6909ForInput.snap b/.forge-snapshots/PoolManager.swap_burnNative6909ForInput.snap new file mode 100644 index 000000000..1a9c91b86 --- /dev/null +++ b/.forge-snapshots/PoolManager.swap_burnNative6909ForInput.snap @@ -0,0 +1 @@ +75215 \ No newline at end of file diff --git a/.forge-snapshots/swap mint native output as 6909.snap b/.forge-snapshots/PoolManager.swap_mintNativeOutputAs6909.snap similarity index 100% rename from .forge-snapshots/swap mint native output as 6909.snap rename to .forge-snapshots/PoolManager.swap_mintNativeOutputAs6909.snap diff --git a/.forge-snapshots/swap mint output as 6909.snap b/.forge-snapshots/PoolManager.swap_mintOutputAs6909.snap similarity index 100% rename from .forge-snapshots/swap mint output as 6909.snap rename to .forge-snapshots/PoolManager.swap_mintOutputAs6909.snap diff --git a/.forge-snapshots/simple swap.snap b/.forge-snapshots/PoolManager.swap_simple.snap similarity index 100% rename from .forge-snapshots/simple swap.snap rename to .forge-snapshots/PoolManager.swap_simple.snap diff --git a/.forge-snapshots/simple swap with native.snap b/.forge-snapshots/PoolManager.swap_simpleWithNative.snap similarity index 100% rename from .forge-snapshots/simple swap with native.snap rename to .forge-snapshots/PoolManager.swap_simpleWithNative.snap diff --git a/.forge-snapshots/swap with hooks.snap b/.forge-snapshots/PoolManager.swap_withHooks.snap similarity index 100% rename from .forge-snapshots/swap with hooks.snap rename to .forge-snapshots/PoolManager.swap_withHooks.snap diff --git a/.forge-snapshots/SkipCallsTestsHook.swap_skipsHookCallifHookIsCaller.snap b/.forge-snapshots/SkipCallsTestsHook.swap_skipsHookCallifHookIsCaller.snap new file mode 100644 index 000000000..7b95765fd --- /dev/null +++ b/.forge-snapshots/SkipCallsTestsHook.swap_skipsHookCallifHookIsCaller.snap @@ -0,0 +1 @@ +158801 \ No newline at end of file diff --git a/test/DynamicFees.t.sol b/test/DynamicFees.t.sol index 378e5c1c2..aaa79b33e 100644 --- a/test/DynamicFees.t.sol +++ b/test/DynamicFees.t.sol @@ -142,7 +142,7 @@ contract TestDynamicFees is Test, Deployers, GasSnapshot { vm.expectEmit(true, true, true, true, address(manager)); emit Swap(key.toId(), address(swapRouter), -100, 98, 79228162514264329749955861424, 1e18, -1, 123); - snapStart("update dynamic fee in before swap"); + snapStart("DynamicFees.swap_updateDynamicFeeInBeforeSwap"); swapRouter.swap(key, params, testSettings, ZERO_BYTES); snapEnd(); @@ -166,7 +166,7 @@ contract TestDynamicFees is Test, Deployers, GasSnapshot { vm.expectEmit(true, true, true, true, address(manager)); emit Swap(key.toId(), address(swapRouter), -100, 98, 79228162514264329749955861424, 1e18, -1, 123); - snapStart("swap with dynamic fee"); + snapStart("DynamicFees.swap_withDynamicFee"); swapRouter.swap(key, params, testSettings, ZERO_BYTES); snapEnd(); } diff --git a/test/PoolManager.t.sol b/test/PoolManager.t.sol index 94078b257..ea4656fb8 100644 --- a/test/PoolManager.t.sol +++ b/test/PoolManager.t.sol @@ -71,7 +71,7 @@ contract PoolManagerTest is Test, Deployers, GasSnapshot { } function test_bytecodeSize() public { - snapSize("poolManager bytecode size", address(manager)); + snapSize("PoolManager.bytecodeSize", address(manager)); } function test_setProtocolFeeController_succeeds() public { @@ -381,25 +381,25 @@ contract PoolManagerTest is Test, Deployers, GasSnapshot { } function test_addLiquidity_gas() public { - snapStart("addLiquidity"); + snapStart("PoolManager.addLiquidity"); modifyLiquidityRouter.modifyLiquidity(key, LIQ_PARAMS, ZERO_BYTES); snapEnd(); } function test_removeLiquidity_gas() public { - snapStart("removeLiquidity"); + snapStart("PoolManager.removeLiquidity"); modifyLiquidityRouter.modifyLiquidity(key, REMOVE_LIQ_PARAMS, ZERO_BYTES); snapEnd(); } function test_addLiquidity_withNative_gas() public { - snapStart("addLiquidity with native token"); + snapStart("PoolManager.addLiquidity_withNative"); modifyLiquidityRouter.modifyLiquidity{value: 1 ether}(nativeKey, LIQ_PARAMS, ZERO_BYTES); snapEnd(); } function test_removeLiquidity_withNative_gas() public { - snapStart("removeLiquidity with native token"); + snapStart("PoolManager.removeLiquidity_withNative"); modifyLiquidityRouter.modifyLiquidity{value: 1 ether}(nativeKey, REMOVE_LIQ_PARAMS, ZERO_BYTES); snapEnd(); } @@ -412,7 +412,7 @@ contract PoolManagerTest is Test, Deployers, GasSnapshot { (key,) = initPool(currency0, currency1, mockHooks, 3000, SQRT_RATIO_1_1, ZERO_BYTES); - snapStart("addLiquidity with empty hook"); + snapStart("PoolManager.addLiquidity_withEmptyHook"); modifyLiquidityRouter.modifyLiquidity(key, LIQ_PARAMS, ZERO_BYTES); snapEnd(); } @@ -426,7 +426,7 @@ contract PoolManagerTest is Test, Deployers, GasSnapshot { (key,) = initPool(currency0, currency1, mockHooks, 3000, SQRT_RATIO_1_1, ZERO_BYTES); modifyLiquidityRouter.modifyLiquidity(key, LIQ_PARAMS, ZERO_BYTES); - snapStart("removeLiquidity with empty hook"); + snapStart("PoolManager.removeLiquidity_withEmptyHook"); modifyLiquidityRouter.modifyLiquidity(key, REMOVE_LIQ_PARAMS, ZERO_BYTES); snapEnd(); } @@ -581,7 +581,7 @@ contract PoolManagerTest is Test, Deployers, GasSnapshot { PoolSwapTest.TestSettings memory testSettings = PoolSwapTest.TestSettings({takeClaims: false, settleUsingBurn: false}); - snapStart("simple swap"); + snapStart("PoolManager.swap_simple"); swapRouter.swap(key, swapParams, testSettings, ZERO_BYTES); snapEnd(); } @@ -593,7 +593,7 @@ contract PoolManagerTest is Test, Deployers, GasSnapshot { PoolSwapTest.TestSettings memory testSettings = PoolSwapTest.TestSettings({takeClaims: false, settleUsingBurn: false}); - snapStart("simple swap with native"); + snapStart("PoolManager.swap_simpleWithNative"); swapRouter.swap{value: 100}(nativeKey, swapParams, testSettings, ZERO_BYTES); snapEnd(); } @@ -619,7 +619,7 @@ contract PoolManagerTest is Test, Deployers, GasSnapshot { IPoolManager.SwapParams({zeroForOne: true, amountSpecified: -100, sqrtPriceLimitX96: SQRT_RATIO_1_4}); testSettings = PoolSwapTest.TestSettings({takeClaims: false, settleUsingBurn: false}); - snapStart("swap with hooks"); + snapStart("PoolManager.swap_withHooks"); swapRouter.swap(key, swapParams, testSettings, ZERO_BYTES); snapEnd(); } @@ -633,7 +633,7 @@ contract PoolManagerTest is Test, Deployers, GasSnapshot { vm.expectEmit(); emit Transfer(address(swapRouter), address(0), address(this), CurrencyLibrary.toId(currency1), 98); - snapStart("swap mint output as 6909"); + snapStart("PoolManager.swap_mintOutputAs6909"); swapRouter.swap(key, params, testSettings, ZERO_BYTES); snapEnd(); @@ -650,7 +650,7 @@ contract PoolManagerTest is Test, Deployers, GasSnapshot { vm.expectEmit(); emit Transfer(address(swapRouter), address(0), address(this), CurrencyLibrary.toId(CurrencyLibrary.NATIVE), 98); - snapStart("swap mint native output as 6909"); + snapStart("PoolManager.swap_mintNativeOutputAs6909"); swapRouter.swap(nativeKey, params, testSettings, ZERO_BYTES); snapEnd(); @@ -681,7 +681,7 @@ contract PoolManagerTest is Test, Deployers, GasSnapshot { vm.expectEmit(); emit Transfer(address(swapRouter), address(this), address(0), CurrencyLibrary.toId(currency1), 27); - snapStart("swap burn 6909 for input"); + snapStart("PoolManager.swap_burn6909ForInput"); swapRouter.swap(key, params, testSettings, ZERO_BYTES); snapEnd(); @@ -712,7 +712,7 @@ contract PoolManagerTest is Test, Deployers, GasSnapshot { vm.expectEmit(); emit Transfer(address(swapRouter), address(this), address(0), CurrencyLibrary.toId(CurrencyLibrary.NATIVE), 27); - snapStart("swap burn native 6909 for input"); + snapStart("PoolManager.swap_burnNative6909ForInput"); // don't have to send in native currency since burning 6909 for input swapRouter.swap(nativeKey, params, testSettings, ZERO_BYTES); snapEnd(); @@ -732,7 +732,7 @@ contract PoolManagerTest is Test, Deployers, GasSnapshot { params = IPoolManager.SwapParams({zeroForOne: true, amountSpecified: -100, sqrtPriceLimitX96: SQRT_RATIO_1_4}); - snapStart("swap against liquidity"); + snapStart("PoolManager.swap_againstLiquidity"); swapRouter.swap(key, params, testSettings, ZERO_BYTES); snapEnd(); } @@ -748,7 +748,7 @@ contract PoolManagerTest is Test, Deployers, GasSnapshot { params = IPoolManager.SwapParams({zeroForOne: true, amountSpecified: -100, sqrtPriceLimitX96: SQRT_RATIO_1_4}); - snapStart("swap against liquidity with native token"); + snapStart("PoolManager.swap_againstLiquidityWithNativeToken"); swapRouter.swap{value: 1 ether}(nativeKey, params, testSettings, ZERO_BYTES); snapEnd(); } @@ -817,7 +817,7 @@ contract PoolManagerTest is Test, Deployers, GasSnapshot { assertEq(feeGrowthGlobal0X128, 0); assertEq(feeGrowthGlobal1X128, 0); - snapStart("donate gas with 2 tokens"); + snapStart("PoolManager.donate_gasWith2Tokens"); donateRouter.donate(key, 100, 200, ZERO_BYTES); snapEnd(); @@ -876,7 +876,7 @@ contract PoolManagerTest is Test, Deployers, GasSnapshot { } function test_donate_OneToken_gas() public { - snapStart("donate gas with 1 token"); + snapStart("PoolManager.donate_gasWith1Token"); donateRouter.donate(key, 100, 0, ZERO_BYTES); snapEnd(); } @@ -1019,7 +1019,7 @@ contract PoolManagerTest is Test, Deployers, GasSnapshot { assertEq(manager.protocolFeesAccrued(currency1), 0); assertEq(currency0.balanceOf(address(1)), 0); vm.prank(address(feeController)); - snapStart("erc20 collect protocol fees"); + snapStart("PoolManager.collectProtocolFees_erc20"); manager.collectProtocolFees(address(1), currency0, expectedFees); snapEnd(); assertEq(currency0.balanceOf(address(1)), expectedFees); @@ -1075,7 +1075,7 @@ contract PoolManagerTest is Test, Deployers, GasSnapshot { assertEq(manager.protocolFeesAccrued(currency1), 0); assertEq(nativeCurrency.balanceOf(address(1)), 0); vm.prank(address(feeController)); - snapStart("native collect protocol fees"); + snapStart("PoolManager.collectProtocolFees_native"); manager.collectProtocolFees(address(1), nativeCurrency, expectedFees); snapEnd(); assertEq(nativeCurrency.balanceOf(address(1)), expectedFees); diff --git a/test/PoolManagerInitialize.t.sol b/test/PoolManagerInitialize.t.sol index 0365bceb8..a8940bedf 100644 --- a/test/PoolManagerInitialize.t.sol +++ b/test/PoolManagerInitialize.t.sol @@ -387,7 +387,7 @@ contract PoolManagerInitializeTest is Test, Deployers, GasSnapshot { } function test_initialize_gas() public { - snapStart("initialize"); + snapStart("PoolManager.initialize"); manager.initialize(uninitializedKey, SQRT_RATIO_1_1, ZERO_BYTES); snapEnd(); } diff --git a/test/SkipCallsTestHook.t.sol b/test/SkipCallsTestHook.t.sol index f95e76814..937554b4a 100644 --- a/test/SkipCallsTestHook.t.sol +++ b/test/SkipCallsTestHook.t.sol @@ -169,7 +169,7 @@ contract SkipCallsTest is Test, Deployers, GasSnapshot { assertEq(skipCallsTestHook.counter(), 0); // swaps and increments counter - snapStart("swap skips hook call if hook is caller"); + snapStart("SkipCallsTestsHook.swap_skipsHookCallifHookIsCaller"); swapRouter.swap(key, swapParams, testSettings, abi.encode(address(this))); snapEnd(); assertEq(skipCallsTestHook.counter(), 1); diff --git a/test/libraries/Hooks.t.sol b/test/libraries/Hooks.t.sol index 4f8ea6e40..a268cb042 100644 --- a/test/libraries/Hooks.t.sol +++ b/test/libraries/Hooks.t.sol @@ -787,7 +787,7 @@ contract HooksTest is Test, Deployers, GasSnapshot { } function testGas() public { - snapStart("HooksShouldCallBeforeSwap"); + snapStart("Hooks.callBeforeSwap"); IHooks(address(0)).hasPermission(Hooks.BEFORE_SWAP_FLAG); snapEnd(); }