From fd787c66cfcf0f5cbd745eb4b230a1e1184f9e6b Mon Sep 17 00:00:00 2001 From: Cody Born Date: Tue, 23 Apr 2024 12:27:03 +0100 Subject: [PATCH 1/2] Remove index from fields --- .forge-snapshots/initialize.snap | 2 +- .forge-snapshots/poolManager bytecode size.snap | 2 +- .forge-snapshots/simple swap with native.snap | 2 +- .forge-snapshots/simple swap.snap | 2 +- .../swap against liquidity with native token.snap | 2 +- .forge-snapshots/swap against liquidity.snap | 2 +- .forge-snapshots/swap burn 6909 for input.snap | 2 +- .forge-snapshots/swap burn native 6909 for input.snap | 2 +- .forge-snapshots/swap mint native output as 6909.snap | 2 +- .forge-snapshots/swap mint output as 6909.snap | 2 +- .forge-snapshots/swap skips hook call if hook is caller.snap | 2 +- .forge-snapshots/swap with dynamic fee.snap | 2 +- .forge-snapshots/swap with hooks.snap | 2 +- .forge-snapshots/update dynamic fee in before swap.snap | 2 +- src/interfaces/IPoolManager.sol | 4 ++-- test/DynamicFees.t.sol | 2 +- test/PoolManager.t.sol | 2 +- test/PoolManagerInitialize.t.sol | 2 +- 18 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.forge-snapshots/initialize.snap b/.forge-snapshots/initialize.snap index 33f4191f2..dcb952425 100644 --- a/.forge-snapshots/initialize.snap +++ b/.forge-snapshots/initialize.snap @@ -1 +1 @@ -51266 \ No newline at end of file +51159 \ No newline at end of file diff --git a/.forge-snapshots/poolManager bytecode size.snap b/.forge-snapshots/poolManager bytecode size.snap index dfa56f0f4..5a9de0185 100644 --- a/.forge-snapshots/poolManager bytecode size.snap +++ b/.forge-snapshots/poolManager bytecode size.snap @@ -1 +1 @@ -22628 \ No newline at end of file +22646 \ No newline at end of file diff --git a/.forge-snapshots/simple swap with native.snap b/.forge-snapshots/simple swap with native.snap index 48402771a..65d59457a 100644 --- a/.forge-snapshots/simple swap with native.snap +++ b/.forge-snapshots/simple swap with native.snap @@ -1 +1 @@ -126822 \ No newline at end of file +126742 \ No newline at end of file diff --git a/.forge-snapshots/simple swap.snap b/.forge-snapshots/simple swap.snap index 166e90f2b..a7ec372db 100644 --- a/.forge-snapshots/simple swap.snap +++ b/.forge-snapshots/simple swap.snap @@ -1 +1 @@ -138215 \ No newline at end of file +138135 \ No newline at end of file diff --git a/.forge-snapshots/swap against liquidity with native token.snap b/.forge-snapshots/swap against liquidity with native token.snap index 72f1a1429..6a1c46e3d 100644 --- a/.forge-snapshots/swap against liquidity with native token.snap +++ b/.forge-snapshots/swap against liquidity with native token.snap @@ -1 +1 @@ -71157 \ No newline at end of file +71077 \ No newline at end of file diff --git a/.forge-snapshots/swap against liquidity.snap b/.forge-snapshots/swap against liquidity.snap index 1c0a5d4a1..02dcb6b47 100644 --- a/.forge-snapshots/swap against liquidity.snap +++ b/.forge-snapshots/swap against liquidity.snap @@ -1 +1 @@ -61476 \ No newline at end of file +61396 \ No newline at end of file diff --git a/.forge-snapshots/swap burn 6909 for input.snap b/.forge-snapshots/swap burn 6909 for input.snap index 8e9fd0cb6..9dbc65ab0 100644 --- a/.forge-snapshots/swap burn 6909 for input.snap +++ b/.forge-snapshots/swap burn 6909 for input.snap @@ -1 +1 @@ -79369 \ No newline at end of file +79289 \ No newline at end of file diff --git a/.forge-snapshots/swap burn native 6909 for input.snap b/.forge-snapshots/swap burn native 6909 for input.snap index 46bd735f4..b4c8b2ad1 100644 --- a/.forge-snapshots/swap burn native 6909 for input.snap +++ b/.forge-snapshots/swap burn native 6909 for input.snap @@ -1 +1 @@ -75212 \ No newline at end of file +75132 \ No newline at end of file diff --git a/.forge-snapshots/swap mint native output as 6909.snap b/.forge-snapshots/swap mint native output as 6909.snap index 156c2a427..a2fb49618 100644 --- a/.forge-snapshots/swap mint native output as 6909.snap +++ b/.forge-snapshots/swap mint native output as 6909.snap @@ -1 +1 @@ -135595 \ No newline at end of file +135515 \ No newline at end of file diff --git a/.forge-snapshots/swap mint output as 6909.snap b/.forge-snapshots/swap mint output as 6909.snap index 52472b8fd..e7fba55b3 100644 --- a/.forge-snapshots/swap mint output as 6909.snap +++ b/.forge-snapshots/swap mint output as 6909.snap @@ -1 +1 @@ -152218 \ No newline at end of file +152138 \ No newline at end of file diff --git a/.forge-snapshots/swap skips hook call if hook is caller.snap b/.forge-snapshots/swap skips hook call if hook is caller.snap index 7b95765fd..2eea862e0 100644 --- a/.forge-snapshots/swap skips hook call if hook is caller.snap +++ b/.forge-snapshots/swap skips hook call if hook is caller.snap @@ -1 +1 @@ -158801 \ No newline at end of file +158641 \ No newline at end of file diff --git a/.forge-snapshots/swap with dynamic fee.snap b/.forge-snapshots/swap with dynamic fee.snap index d71a9ac1e..ffc0b43ea 100644 --- a/.forge-snapshots/swap with dynamic fee.snap +++ b/.forge-snapshots/swap with dynamic fee.snap @@ -1 +1 @@ -90705 \ No newline at end of file +90622 \ No newline at end of file diff --git a/.forge-snapshots/swap with hooks.snap b/.forge-snapshots/swap with hooks.snap index c02f4b287..959298d59 100644 --- a/.forge-snapshots/swap with hooks.snap +++ b/.forge-snapshots/swap with hooks.snap @@ -1 +1 @@ -61455 \ No newline at end of file +61375 \ No newline at end of file diff --git a/.forge-snapshots/update dynamic fee in before swap.snap b/.forge-snapshots/update dynamic fee in before swap.snap index d3875f3d7..7ff318fbd 100644 --- a/.forge-snapshots/update dynamic fee in before swap.snap +++ b/.forge-snapshots/update dynamic fee in before swap.snap @@ -1 +1 @@ -131731 \ No newline at end of file +131648 \ No newline at end of file diff --git a/src/interfaces/IPoolManager.sol b/src/interfaces/IPoolManager.sol index 7d9c9f69f..dffa06091 100644 --- a/src/interfaces/IPoolManager.sol +++ b/src/interfaces/IPoolManager.sol @@ -48,7 +48,7 @@ interface IPoolManager is IProtocolFees, IERC6909Claims, IExtsload { /// @param tickSpacing The minimum number of ticks between initialized ticks /// @param hooks The hooks contract address for the pool, or address(0) if none event Initialize( - PoolId indexed id, + PoolId id, Currency indexed currency0, Currency indexed currency1, uint24 fee, @@ -76,7 +76,7 @@ interface IPoolManager is IProtocolFees, IERC6909Claims, IExtsload { /// @param tick The log base 1.0001 of the price of the pool after the swap event Swap( PoolId indexed id, - address indexed sender, + address sender, int128 amount0, int128 amount1, uint160 sqrtPriceX96, diff --git a/test/DynamicFees.t.sol b/test/DynamicFees.t.sol index 378e5c1c2..373876359 100644 --- a/test/DynamicFees.t.sol +++ b/test/DynamicFees.t.sol @@ -46,7 +46,7 @@ contract TestDynamicFees is Test, Deployers, GasSnapshot { event Swap( PoolId indexed poolId, - address indexed sender, + address sender, int128 amount0, int128 amount1, uint160 sqrtPriceX96, diff --git a/test/PoolManager.t.sol b/test/PoolManager.t.sol index 94078b257..28b48de76 100644 --- a/test/PoolManager.t.sol +++ b/test/PoolManager.t.sol @@ -47,7 +47,7 @@ contract PoolManagerTest is Test, Deployers, GasSnapshot { ); event Swap( PoolId indexed poolId, - address indexed sender, + address sender, int128 amount0, int128 amount1, uint160 sqrtPriceX96, diff --git a/test/PoolManagerInitialize.t.sol b/test/PoolManagerInitialize.t.sol index 0365bceb8..86cfbd61a 100644 --- a/test/PoolManagerInitialize.t.sol +++ b/test/PoolManagerInitialize.t.sol @@ -30,7 +30,7 @@ contract PoolManagerInitializeTest is Test, Deployers, GasSnapshot { using ProtocolFeeLibrary for uint24; event Initialize( - PoolId indexed poolId, + PoolId poolId, Currency indexed currency0, Currency indexed currency1, uint24 fee, From 8634f30603ab54374a7cb90c2453cf71b7610e78 Mon Sep 17 00:00:00 2001 From: Cody Born Date: Wed, 24 Apr 2024 17:53:35 +0100 Subject: [PATCH 2/2] forge fmt --- src/interfaces/IPoolManager.sol | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/interfaces/IPoolManager.sol b/src/interfaces/IPoolManager.sol index dffa06091..8070d4fc6 100644 --- a/src/interfaces/IPoolManager.sol +++ b/src/interfaces/IPoolManager.sol @@ -48,12 +48,7 @@ interface IPoolManager is IProtocolFees, IERC6909Claims, IExtsload { /// @param tickSpacing The minimum number of ticks between initialized ticks /// @param hooks The hooks contract address for the pool, or address(0) if none event Initialize( - PoolId id, - Currency indexed currency0, - Currency indexed currency1, - uint24 fee, - int24 tickSpacing, - IHooks hooks + PoolId id, Currency indexed currency0, Currency indexed currency1, uint24 fee, int24 tickSpacing, IHooks hooks ); /// @notice Emitted when a liquidity position is modified