From a6eaa0fe3ad816c6cffe79f5c71f88e29f78f90e Mon Sep 17 00:00:00 2001 From: saucepoint Date: Tue, 8 Oct 2024 14:40:27 -0400 Subject: [PATCH 1/5] update core --- lib/v4-core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/v4-core b/lib/v4-core index 18b223ca..88482f7d 160000 --- a/lib/v4-core +++ b/lib/v4-core @@ -1 +1 @@ -Subproject commit 18b223cab19dc778d9d287a82d29fee3e99162b0 +Subproject commit 88482f7dc4356a7c395e199e454d50dc960bb6e7 From b9bf180987e90a68ed3b2fdb56656a8bfd83da23 Mon Sep 17 00:00:00 2001 From: saucepoint Date: Tue, 8 Oct 2024 15:01:56 -0400 Subject: [PATCH 2/5] account for ABI change --- src/base/PoolInitializer.sol | 5 ++--- src/base/hooks/BaseHook.sol | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/base/PoolInitializer.sol b/src/base/PoolInitializer.sol index 1f42ab1f..ab9e14bf 100644 --- a/src/base/PoolInitializer.sol +++ b/src/base/PoolInitializer.sol @@ -12,12 +12,11 @@ abstract contract PoolInitializer is ImmutableState { /// @notice Initialize a Uniswap v4 Pool /// @param key the PoolKey of the pool to initialize /// @param sqrtPriceX96 the initial sqrtPriceX96 of the pool - /// @param hookData the optional data passed to the hook's initialize functions - function initializePool(PoolKey calldata key, uint160 sqrtPriceX96, bytes calldata hookData) + function initializePool(PoolKey calldata key, uint160 sqrtPriceX96) external payable returns (int24) { - return poolManager.initialize(key, sqrtPriceX96, hookData); + return poolManager.initialize(key, sqrtPriceX96); } } diff --git a/src/base/hooks/BaseHook.sol b/src/base/hooks/BaseHook.sol index ca2eb985..4a9458f2 100644 --- a/src/base/hooks/BaseHook.sol +++ b/src/base/hooks/BaseHook.sol @@ -56,12 +56,12 @@ abstract contract BaseHook is IHooks, SafeCallback { } /// @inheritdoc IHooks - function beforeInitialize(address, PoolKey calldata, uint160, bytes calldata) external virtual returns (bytes4) { + function beforeInitialize(address, PoolKey calldata, uint160) external virtual returns (bytes4) { revert HookNotImplemented(); } /// @inheritdoc IHooks - function afterInitialize(address, PoolKey calldata, uint160, int24, bytes calldata) + function afterInitialize(address, PoolKey calldata, uint160, int24) external virtual returns (bytes4) From f6bf21afb65ab34f027a6da290edf5f03c3430de Mon Sep 17 00:00:00 2001 From: saucepoint Date: Tue, 8 Oct 2024 15:02:08 -0400 Subject: [PATCH 3/5] fix initialize ABI change --- test/PositionDescriptor.t.sol | 2 +- test/Quoter.t.sol | 6 +++--- test/StateViewTest.t.sol | 2 +- test/position-managers/Execute.t.sol | 2 +- test/position-managers/FeeCollection.t.sol | 2 +- test/position-managers/IncreaseLiquidity.t.sol | 2 +- test/position-managers/NativeToken.t.sol | 2 +- test/position-managers/Permit.t.sol | 2 +- test/position-managers/PositionManager.gas.t.sol | 6 +++--- .../PositionManager.modifyLiquidities.t.sol | 2 +- test/position-managers/PositionManager.multicall.t.sol | 8 ++++---- test/position-managers/PositionManager.notifier.t.sol | 2 +- test/position-managers/PositionManager.t.sol | 8 ++++---- test/shared/RoutingTestHelpers.sol | 4 ++-- 14 files changed, 25 insertions(+), 25 deletions(-) diff --git a/test/PositionDescriptor.t.sol b/test/PositionDescriptor.t.sol index 7ee83911..bb2b2e4e 100644 --- a/test/PositionDescriptor.t.sol +++ b/test/PositionDescriptor.t.sol @@ -33,7 +33,7 @@ contract PositionDescriptorTest is Test, PosmTestSetup, GasSnapshot { function setUp() public { deployFreshManager(); (currency0, currency1) = deployAndMint2Currencies(); - (key,) = initPool(currency0, currency1, IHooks(address(0)), 3000, SQRT_PRICE_1_1, ZERO_BYTES); + (key,) = initPool(currency0, currency1, IHooks(address(0)), 3000, SQRT_PRICE_1_1); deployAndApprovePosm(manager); } diff --git a/test/Quoter.t.sol b/test/Quoter.t.sol index 8de8e461..2dc1c854 100644 --- a/test/Quoter.t.sol +++ b/test/Quoter.t.sol @@ -452,7 +452,7 @@ contract QuoterTest is Test, Deployers, GasSnapshot { } function setupPool(PoolKey memory poolKey) internal { - manager.initialize(poolKey, SQRT_PRICE_1_1, ZERO_BYTES); + manager.initialize(poolKey, SQRT_PRICE_1_1); MockERC20(Currency.unwrap(poolKey.currency0)).approve(address(positionManager), type(uint256).max); MockERC20(Currency.unwrap(poolKey.currency1)).approve(address(positionManager), type(uint256).max); positionManager.modifyLiquidity( @@ -468,7 +468,7 @@ contract QuoterTest is Test, Deployers, GasSnapshot { } function setupPoolMultiplePositions(PoolKey memory poolKey) internal { - manager.initialize(poolKey, SQRT_PRICE_1_1, ZERO_BYTES); + manager.initialize(poolKey, SQRT_PRICE_1_1); MockERC20(Currency.unwrap(poolKey.currency0)).approve(address(positionManager), type(uint256).max); MockERC20(Currency.unwrap(poolKey.currency1)).approve(address(positionManager), type(uint256).max); positionManager.modifyLiquidity( @@ -501,7 +501,7 @@ contract QuoterTest is Test, Deployers, GasSnapshot { PoolId poolId = poolKey.toId(); (uint160 sqrtPriceX96,,,) = manager.getSlot0(poolId); if (sqrtPriceX96 == 0) { - manager.initialize(poolKey, SQRT_PRICE_1_1, ZERO_BYTES); + manager.initialize(poolKey, SQRT_PRICE_1_1); } MockERC20(Currency.unwrap(poolKey.currency0)).approve(address(positionManager), type(uint256).max); diff --git a/test/StateViewTest.t.sol b/test/StateViewTest.t.sol index 392d7048..c243f12f 100644 --- a/test/StateViewTest.t.sol +++ b/test/StateViewTest.t.sol @@ -38,7 +38,7 @@ contract StateViewTest is Test, Deployers, Fuzzers, GasSnapshot { // Create the pool key = PoolKey(currency0, currency1, 3000, 60, IHooks(address(0x0))); poolId = key.toId(); - manager.initialize(key, SQRT_PRICE_1_1, ZERO_BYTES); + manager.initialize(key, SQRT_PRICE_1_1); state = new StateView(manager); } diff --git a/test/position-managers/Execute.t.sol b/test/position-managers/Execute.t.sol index 42fb1a7b..dd99d86b 100644 --- a/test/position-managers/Execute.t.sol +++ b/test/position-managers/Execute.t.sol @@ -47,7 +47,7 @@ contract ExecuteTest is Test, PosmTestSetup, LiquidityFuzzers { // This is needed to receive return deltas from modifyLiquidity calls. deployPosmHookSavesDelta(); - (key, poolId) = initPool(currency0, currency1, IHooks(address(hook)), 3000, SQRT_PRICE_1_1, ZERO_BYTES); + (key, poolId) = initPool(currency0, currency1, IHooks(address(hook)), 3000, SQRT_PRICE_1_1); // Requires currency0 and currency1 to be set in base Deployers contract. deployAndApprovePosm(manager); diff --git a/test/position-managers/FeeCollection.t.sol b/test/position-managers/FeeCollection.t.sol index 837e2a82..c2508536 100644 --- a/test/position-managers/FeeCollection.t.sol +++ b/test/position-managers/FeeCollection.t.sol @@ -40,7 +40,7 @@ contract FeeCollectionTest is Test, PosmTestSetup, LiquidityFuzzers { // This is needed to receive return deltas from modifyLiquidity calls. deployPosmHookSavesDelta(); - (key, poolId) = initPool(currency0, currency1, IHooks(hook), 3000, SQRT_PRICE_1_1, ZERO_BYTES); + (key, poolId) = initPool(currency0, currency1, IHooks(hook), 3000, SQRT_PRICE_1_1); FEE_WAD = uint256(key.fee).mulDivDown(FixedPointMathLib.WAD, 1_000_000); // Requires currency0 and currency1 to be set in base Deployers contract. diff --git a/test/position-managers/IncreaseLiquidity.t.sol b/test/position-managers/IncreaseLiquidity.t.sol index ba0ec2f8..a0264d2b 100644 --- a/test/position-managers/IncreaseLiquidity.t.sol +++ b/test/position-managers/IncreaseLiquidity.t.sol @@ -57,7 +57,7 @@ contract IncreaseLiquidityTest is Test, PosmTestSetup, Fuzzers { // This is needed to receive return deltas from modifyLiquidity calls. deployPosmHookSavesDelta(); - (key, poolId) = initPool(currency0, currency1, IHooks(hook), 3000, SQRT_PRICE_1_1, ZERO_BYTES); + (key, poolId) = initPool(currency0, currency1, IHooks(hook), 3000, SQRT_PRICE_1_1); FEE_WAD = uint256(key.fee).mulDivDown(FixedPointMathLib.WAD, 1_000_000); // Requires currency0 and currency1 to be set in base Deployers contract. diff --git a/test/position-managers/NativeToken.t.sol b/test/position-managers/NativeToken.t.sol index fcad290c..c79f74de 100644 --- a/test/position-managers/NativeToken.t.sol +++ b/test/position-managers/NativeToken.t.sol @@ -54,7 +54,7 @@ contract PositionManagerTest is Test, PosmTestSetup, LiquidityFuzzers { deployPosmHookSavesDelta(); currency0 = CurrencyLibrary.ADDRESS_ZERO; - (nativeKey, poolId) = initPool(currency0, currency1, IHooks(hook), 3000, SQRT_PRICE_1_1, ZERO_BYTES); + (nativeKey, poolId) = initPool(currency0, currency1, IHooks(hook), 3000, SQRT_PRICE_1_1); deployPosm(manager); // currency0 is the native token so only execute approvals for currency1. diff --git a/test/position-managers/Permit.t.sol b/test/position-managers/Permit.t.sol index 392fc17e..0ce9a5b9 100644 --- a/test/position-managers/Permit.t.sol +++ b/test/position-managers/Permit.t.sol @@ -43,7 +43,7 @@ contract PermitTest is Test, PosmTestSetup { deployFreshManagerAndRouters(); deployMintAndApprove2Currencies(); - (key, poolId) = initPool(currency0, currency1, IHooks(address(0)), 3000, SQRT_PRICE_1_1, ZERO_BYTES); + (key, poolId) = initPool(currency0, currency1, IHooks(address(0)), 3000, SQRT_PRICE_1_1); // Requires currency0 and currency1 to be set in base Deployers contract. deployAndApprovePosm(manager); diff --git a/test/position-managers/PositionManager.gas.t.sol b/test/position-managers/PositionManager.gas.t.sol index 0fd658ea..cf077748 100644 --- a/test/position-managers/PositionManager.gas.t.sol +++ b/test/position-managers/PositionManager.gas.t.sol @@ -53,8 +53,8 @@ contract PosMGasTest is Test, PosmTestSetup, GasSnapshot { deployFreshManagerAndRouters(); deployMintAndApprove2Currencies(); - (key, poolId) = initPool(currency0, currency1, IHooks(address(0)), 3000, SQRT_PRICE_1_1, ZERO_BYTES); - (nativeKey,) = initPool(CurrencyLibrary.ADDRESS_ZERO, currency1, IHooks(hook), 3000, SQRT_PRICE_1_1, ZERO_BYTES); + (key, poolId) = initPool(currency0, currency1, IHooks(address(0)), 3000, SQRT_PRICE_1_1); + (nativeKey,) = initPool(CurrencyLibrary.ADDRESS_ZERO, currency1, IHooks(hook), 3000, SQRT_PRICE_1_1); FEE_WAD = uint256(key.fee).mulDivDown(FixedPointMathLib.WAD, 1_000_000); // Requires currency0 and currency1 to be set in base Deployers contract. @@ -393,7 +393,7 @@ contract PosMGasTest is Test, PosmTestSetup, GasSnapshot { // Use multicall to initialize a pool and mint liquidity bytes[] memory calls = new bytes[](2); - calls[0] = abi.encodeWithSelector(lpm.initializePool.selector, key, SQRT_PRICE_1_1, ZERO_BYTES); + calls[0] = abi.encodeWithSelector(lpm.initializePool.selector, key, SQRT_PRICE_1_1); config = PositionConfig({ poolKey: key, diff --git a/test/position-managers/PositionManager.modifyLiquidities.t.sol b/test/position-managers/PositionManager.modifyLiquidities.t.sol index 9b135e4f..e71c121f 100644 --- a/test/position-managers/PositionManager.modifyLiquidities.t.sol +++ b/test/position-managers/PositionManager.modifyLiquidities.t.sol @@ -53,7 +53,7 @@ contract PositionManagerModifyLiquiditiesTest is Test, PosmTestSetup, LiquidityF deployPosmHookModifyLiquidities(); seedBalance(address(hookModifyLiquidities)); - (key, poolId) = initPool(currency0, currency1, IHooks(hookModifyLiquidities), 3000, SQRT_PRICE_1_1, ZERO_BYTES); + (key, poolId) = initPool(currency0, currency1, IHooks(hookModifyLiquidities), 3000, SQRT_PRICE_1_1); config = PositionConfig({poolKey: key, tickLower: -60, tickUpper: 60}); } diff --git a/test/position-managers/PositionManager.multicall.t.sol b/test/position-managers/PositionManager.multicall.t.sol index e5347fb4..c70f68b3 100644 --- a/test/position-managers/PositionManager.multicall.t.sol +++ b/test/position-managers/PositionManager.multicall.t.sol @@ -71,7 +71,7 @@ contract PositionManagerMulticallTest is Test, Permit2SignatureHelpers, PosmTest deployFreshManagerAndRouters(); deployMintAndApprove2Currencies(); - (key, poolId) = initPool(currency0, currency1, IHooks(address(0)), 3000, SQRT_PRICE_1_1, ZERO_BYTES); + (key, poolId) = initPool(currency0, currency1, IHooks(address(0)), 3000, SQRT_PRICE_1_1); // Requires currency0 and currency1 to be set in base Deployers contract. deployAndApprovePosm(manager); @@ -98,7 +98,7 @@ contract PositionManagerMulticallTest is Test, Permit2SignatureHelpers, PosmTest // Use multicall to initialize a pool and mint liquidity bytes[] memory calls = new bytes[](2); - calls[0] = abi.encodeWithSelector(lpm.initializePool.selector, key, SQRT_PRICE_1_1, ZERO_BYTES); + calls[0] = abi.encodeWithSelector(lpm.initializePool.selector, key, SQRT_PRICE_1_1); config = PositionConfig({ poolKey: key, @@ -144,7 +144,7 @@ contract PositionManagerMulticallTest is Test, Permit2SignatureHelpers, PosmTest // Use multicall to initialize a pool and mint liquidity bytes[] memory calls = new bytes[](2); - calls[0] = abi.encodeWithSelector(lpm.initializePool.selector, key, SQRT_PRICE_1_1, ZERO_BYTES); + calls[0] = abi.encodeWithSelector(lpm.initializePool.selector, key, SQRT_PRICE_1_1); config = PositionConfig({ poolKey: key, @@ -241,7 +241,7 @@ contract PositionManagerMulticallTest is Test, Permit2SignatureHelpers, PosmTest // Use multicall to initialize a pool bytes[] memory calls = new bytes[](1); - calls[0] = abi.encodeWithSelector(PoolInitializer.initializePool.selector, key, SQRT_PRICE_1_1, ZERO_BYTES); + calls[0] = abi.encodeWithSelector(PoolInitializer.initializePool.selector, key, SQRT_PRICE_1_1); vm.expectRevert(abi.encodeWithSelector(IPoolManager.TickSpacingTooSmall.selector, tickSpacing)); lpm.multicall(calls); diff --git a/test/position-managers/PositionManager.notifier.t.sol b/test/position-managers/PositionManager.notifier.t.sol index 5e61891b..391446a8 100644 --- a/test/position-managers/PositionManager.notifier.t.sol +++ b/test/position-managers/PositionManager.notifier.t.sol @@ -39,7 +39,7 @@ contract PositionManagerNotifierTest is Test, PosmTestSetup, GasSnapshot { deployFreshManagerAndRouters(); deployMintAndApprove2Currencies(); - (key,) = initPool(currency0, currency1, IHooks(hook), 3000, SQRT_PRICE_1_1, ZERO_BYTES); + (key,) = initPool(currency0, currency1, IHooks(hook), 3000, SQRT_PRICE_1_1); // Requires currency0 and currency1 to be set in base Deployers contract. deployAndApprovePosm(manager); diff --git a/test/position-managers/PositionManager.t.sol b/test/position-managers/PositionManager.t.sol index 5762768b..7db64e9b 100644 --- a/test/position-managers/PositionManager.t.sol +++ b/test/position-managers/PositionManager.t.sol @@ -52,7 +52,7 @@ contract PositionManagerTest is Test, PosmTestSetup, LiquidityFuzzers { // This is needed to receive return deltas from modifyLiquidity calls. deployPosmHookSavesDelta(); - (key, poolId) = initPool(currency0, currency1, IHooks(hook), 3000, SQRT_PRICE_1_1, ZERO_BYTES); + (key, poolId) = initPool(currency0, currency1, IHooks(hook), 3000, SQRT_PRICE_1_1); // Requires currency0 and currency1 to be set in base Deployers contract. deployAndApprovePosm(manager); @@ -92,7 +92,7 @@ contract PositionManagerTest is Test, PosmTestSetup, LiquidityFuzzers { // Set up approvals for the reentrant token approvePosmCurrency(reentrantToken); - (key, poolId) = initPool(currency0, currency1, IHooks(address(0)), 3000, SQRT_PRICE_1_1, ZERO_BYTES); + (key, poolId) = initPool(currency0, currency1, IHooks(address(0)), 3000, SQRT_PRICE_1_1); // Try to add liquidity at that range, but the token reenters posm PositionConfig memory config = @@ -881,7 +881,7 @@ contract PositionManagerTest is Test, PosmTestSetup, LiquidityFuzzers { function test_initialize() public { // initialize a new pool and add liquidity key = PoolKey({currency0: currency0, currency1: currency1, fee: 0, tickSpacing: 10, hooks: IHooks(address(0))}); - lpm.initializePool(key, SQRT_PRICE_1_1, ZERO_BYTES); + lpm.initializePool(key, SQRT_PRICE_1_1); (uint160 sqrtPriceX96, int24 tick, uint24 protocolFee, uint24 lpFee) = manager.getSlot0(key.toId()); assertEq(sqrtPriceX96, SQRT_PRICE_1_1); @@ -896,7 +896,7 @@ contract PositionManagerTest is Test, PosmTestSetup, LiquidityFuzzers { fee = uint24(bound(fee, 0, LPFeeLibrary.MAX_LP_FEE)); key = PoolKey({currency0: currency0, currency1: currency1, fee: fee, tickSpacing: 10, hooks: IHooks(address(0))}); - lpm.initializePool(key, sqrtPrice, ZERO_BYTES); + lpm.initializePool(key, sqrtPrice); (uint160 sqrtPriceX96, int24 tick, uint24 protocolFee, uint24 lpFee) = manager.getSlot0(key.toId()); assertEq(sqrtPriceX96, sqrtPrice); diff --git a/test/shared/RoutingTestHelpers.sol b/test/shared/RoutingTestHelpers.sol index 3bde34ca..67b8f601 100644 --- a/test/shared/RoutingTestHelpers.sol +++ b/test/shared/RoutingTestHelpers.sol @@ -76,7 +76,7 @@ contract RoutingTestHelpers is Test, Deployers { if (Currency.unwrap(currencyA) > Currency.unwrap(currencyB)) (currencyA, currencyB) = (currencyB, currencyA); _key = PoolKey(currencyA, currencyB, 3000, 60, IHooks(hookAddr)); - manager.initialize(_key, SQRT_PRICE_1_1, ZERO_BYTES); + manager.initialize(_key, SQRT_PRICE_1_1); MockERC20(Currency.unwrap(currencyA)).approve(address(positionManager), type(uint256).max); MockERC20(Currency.unwrap(currencyB)).approve(address(positionManager), type(uint256).max); positionManager.modifyLiquidity(_key, IPoolManager.ModifyLiquidityParams(-887220, 887220, 200 ether, 0), "0x"); @@ -88,7 +88,7 @@ contract RoutingTestHelpers is Test, Deployers { { _key = PoolKey(CurrencyLibrary.ADDRESS_ZERO, currency, 3000, 60, IHooks(hookAddr)); - manager.initialize(_key, SQRT_PRICE_1_1, ZERO_BYTES); + manager.initialize(_key, SQRT_PRICE_1_1); MockERC20(Currency.unwrap(currency)).approve(address(positionManager), type(uint256).max); positionManager.modifyLiquidity{value: 200 ether}( _key, IPoolManager.ModifyLiquidityParams(-887220, 887220, 200 ether, 0), "0x" From e53ebdd7b6ed15f2f5d13b472225168175465377 Mon Sep 17 00:00:00 2001 From: saucepoint Date: Tue, 8 Oct 2024 15:02:15 -0400 Subject: [PATCH 4/5] snapshots --- .forge-snapshots/PositionManager_burn_empty.snap | 2 +- .forge-snapshots/PositionManager_burn_empty_native.snap | 2 +- .../PositionManager_burn_nonEmpty_native_withClose.snap | 2 +- .../PositionManager_burn_nonEmpty_native_withTakePair.snap | 2 +- .forge-snapshots/PositionManager_burn_nonEmpty_withClose.snap | 2 +- .../PositionManager_burn_nonEmpty_withTakePair.snap | 2 +- .forge-snapshots/PositionManager_collect_native.snap | 2 +- .forge-snapshots/PositionManager_collect_sameRange.snap | 2 +- .forge-snapshots/PositionManager_collect_withClose.snap | 2 +- .forge-snapshots/PositionManager_collect_withTakePair.snap | 2 +- .forge-snapshots/PositionManager_decreaseLiquidity_native.snap | 2 +- .../PositionManager_decreaseLiquidity_withClose.snap | 2 +- .../PositionManager_decreaseLiquidity_withTakePair.snap | 2 +- .forge-snapshots/PositionManager_decrease_burnEmpty.snap | 2 +- .forge-snapshots/PositionManager_decrease_burnEmpty_native.snap | 2 +- .../PositionManager_decrease_sameRange_allLiquidity.snap | 2 +- .forge-snapshots/PositionManager_decrease_take_take.snap | 2 +- .../PositionManager_increaseLiquidity_erc20_withClose.snap | 2 +- .../PositionManager_increaseLiquidity_erc20_withSettlePair.snap | 2 +- .forge-snapshots/PositionManager_increaseLiquidity_native.snap | 2 +- ...PositionManager_increase_autocompoundExactUnclaimedFees.snap | 2 +- .../PositionManager_increase_autocompoundExcessFeesCredit.snap | 2 +- .../PositionManager_increase_autocompound_clearExcess.snap | 2 +- .forge-snapshots/PositionManager_mint_native.snap | 2 +- .../PositionManager_mint_nativeWithSweep_withClose.snap | 2 +- .../PositionManager_mint_nativeWithSweep_withSettlePair.snap | 2 +- .forge-snapshots/PositionManager_mint_onSameTickLower.snap | 2 +- .forge-snapshots/PositionManager_mint_onSameTickUpper.snap | 2 +- .forge-snapshots/PositionManager_mint_sameRange.snap | 2 +- .../PositionManager_mint_settleWithBalance_sweep.snap | 2 +- .../PositionManager_mint_warmedPool_differentRange.snap | 2 +- .forge-snapshots/PositionManager_mint_withClose.snap | 2 +- .forge-snapshots/PositionManager_mint_withSettlePair.snap | 2 +- .forge-snapshots/PositionManager_multicall_initialize_mint.snap | 2 +- .forge-snapshots/PositionManager_unsubscribe.snap | 2 +- 35 files changed, 35 insertions(+), 35 deletions(-) diff --git a/.forge-snapshots/PositionManager_burn_empty.snap b/.forge-snapshots/PositionManager_burn_empty.snap index 949dd08a..0e85ca4a 100644 --- a/.forge-snapshots/PositionManager_burn_empty.snap +++ b/.forge-snapshots/PositionManager_burn_empty.snap @@ -1 +1 @@ -50481 \ No newline at end of file +50446 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_burn_empty_native.snap b/.forge-snapshots/PositionManager_burn_empty_native.snap index 949dd08a..0e85ca4a 100644 --- a/.forge-snapshots/PositionManager_burn_empty_native.snap +++ b/.forge-snapshots/PositionManager_burn_empty_native.snap @@ -1 +1 @@ -50481 \ No newline at end of file +50446 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_burn_nonEmpty_native_withClose.snap b/.forge-snapshots/PositionManager_burn_nonEmpty_native_withClose.snap index 75b6dc86..5345a8da 100644 --- a/.forge-snapshots/PositionManager_burn_nonEmpty_native_withClose.snap +++ b/.forge-snapshots/PositionManager_burn_nonEmpty_native_withClose.snap @@ -1 +1 @@ -125609 \ No newline at end of file +125574 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_burn_nonEmpty_native_withTakePair.snap b/.forge-snapshots/PositionManager_burn_nonEmpty_native_withTakePair.snap index 046f4910..068dd456 100644 --- a/.forge-snapshots/PositionManager_burn_nonEmpty_native_withTakePair.snap +++ b/.forge-snapshots/PositionManager_burn_nonEmpty_native_withTakePair.snap @@ -1 +1 @@ -125056 \ No newline at end of file +125021 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_burn_nonEmpty_withClose.snap b/.forge-snapshots/PositionManager_burn_nonEmpty_withClose.snap index 79ad3f25..2ffdbdf1 100644 --- a/.forge-snapshots/PositionManager_burn_nonEmpty_withClose.snap +++ b/.forge-snapshots/PositionManager_burn_nonEmpty_withClose.snap @@ -1 +1 @@ -132462 \ No newline at end of file +132427 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_burn_nonEmpty_withTakePair.snap b/.forge-snapshots/PositionManager_burn_nonEmpty_withTakePair.snap index dd001ceb..81149d95 100644 --- a/.forge-snapshots/PositionManager_burn_nonEmpty_withTakePair.snap +++ b/.forge-snapshots/PositionManager_burn_nonEmpty_withTakePair.snap @@ -1 +1 @@ -131909 \ No newline at end of file +131874 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_collect_native.snap b/.forge-snapshots/PositionManager_collect_native.snap index 8aca9b34..e6d5ff3e 100644 --- a/.forge-snapshots/PositionManager_collect_native.snap +++ b/.forge-snapshots/PositionManager_collect_native.snap @@ -1 +1 @@ -146326 \ No newline at end of file +146282 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_collect_sameRange.snap b/.forge-snapshots/PositionManager_collect_sameRange.snap index ab042564..fb052d00 100644 --- a/.forge-snapshots/PositionManager_collect_sameRange.snap +++ b/.forge-snapshots/PositionManager_collect_sameRange.snap @@ -1 +1 @@ -154892 \ No newline at end of file +154848 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_collect_withClose.snap b/.forge-snapshots/PositionManager_collect_withClose.snap index ab042564..fb052d00 100644 --- a/.forge-snapshots/PositionManager_collect_withClose.snap +++ b/.forge-snapshots/PositionManager_collect_withClose.snap @@ -1 +1 @@ -154892 \ No newline at end of file +154848 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_collect_withTakePair.snap b/.forge-snapshots/PositionManager_collect_withTakePair.snap index 7f09fc96..8be5e73c 100644 --- a/.forge-snapshots/PositionManager_collect_withTakePair.snap +++ b/.forge-snapshots/PositionManager_collect_withTakePair.snap @@ -1 +1 @@ -154213 \ No newline at end of file +154169 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_decreaseLiquidity_native.snap b/.forge-snapshots/PositionManager_decreaseLiquidity_native.snap index 7f9fa86d..5f7d954c 100644 --- a/.forge-snapshots/PositionManager_decreaseLiquidity_native.snap +++ b/.forge-snapshots/PositionManager_decreaseLiquidity_native.snap @@ -1 +1 @@ -112006 \ No newline at end of file +111971 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_decreaseLiquidity_withClose.snap b/.forge-snapshots/PositionManager_decreaseLiquidity_withClose.snap index 5a422f6f..f069ca36 100644 --- a/.forge-snapshots/PositionManager_decreaseLiquidity_withClose.snap +++ b/.forge-snapshots/PositionManager_decreaseLiquidity_withClose.snap @@ -1 +1 @@ -119773 \ No newline at end of file +119729 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_decreaseLiquidity_withTakePair.snap b/.forge-snapshots/PositionManager_decreaseLiquidity_withTakePair.snap index 7766b70b..7f1848a6 100644 --- a/.forge-snapshots/PositionManager_decreaseLiquidity_withTakePair.snap +++ b/.forge-snapshots/PositionManager_decreaseLiquidity_withTakePair.snap @@ -1 +1 @@ -119094 \ No newline at end of file +119050 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_decrease_burnEmpty.snap b/.forge-snapshots/PositionManager_decrease_burnEmpty.snap index 83fd9ce4..fce34ecd 100644 --- a/.forge-snapshots/PositionManager_decrease_burnEmpty.snap +++ b/.forge-snapshots/PositionManager_decrease_burnEmpty.snap @@ -1 +1 @@ -135259 \ No newline at end of file +135224 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_decrease_burnEmpty_native.snap b/.forge-snapshots/PositionManager_decrease_burnEmpty_native.snap index acb7f1ad..90c8a0d4 100644 --- a/.forge-snapshots/PositionManager_decrease_burnEmpty_native.snap +++ b/.forge-snapshots/PositionManager_decrease_burnEmpty_native.snap @@ -1 +1 @@ -128406 \ No newline at end of file +128371 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_decrease_sameRange_allLiquidity.snap b/.forge-snapshots/PositionManager_decrease_sameRange_allLiquidity.snap index dea30077..017e8a13 100644 --- a/.forge-snapshots/PositionManager_decrease_sameRange_allLiquidity.snap +++ b/.forge-snapshots/PositionManager_decrease_sameRange_allLiquidity.snap @@ -1 +1 @@ -132460 \ No newline at end of file +132416 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_decrease_take_take.snap b/.forge-snapshots/PositionManager_decrease_take_take.snap index ce76c048..c3381b75 100644 --- a/.forge-snapshots/PositionManager_decrease_take_take.snap +++ b/.forge-snapshots/PositionManager_decrease_take_take.snap @@ -1 +1 @@ -120349 \ No newline at end of file +120305 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_increaseLiquidity_erc20_withClose.snap b/.forge-snapshots/PositionManager_increaseLiquidity_erc20_withClose.snap index 0c1a9f6f..8800975f 100644 --- a/.forge-snapshots/PositionManager_increaseLiquidity_erc20_withClose.snap +++ b/.forge-snapshots/PositionManager_increaseLiquidity_erc20_withClose.snap @@ -1 +1 @@ -159077 \ No newline at end of file +159033 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_increaseLiquidity_erc20_withSettlePair.snap b/.forge-snapshots/PositionManager_increaseLiquidity_erc20_withSettlePair.snap index 87248cf4..4abbe118 100644 --- a/.forge-snapshots/PositionManager_increaseLiquidity_erc20_withSettlePair.snap +++ b/.forge-snapshots/PositionManager_increaseLiquidity_erc20_withSettlePair.snap @@ -1 +1 @@ -158017 \ No newline at end of file +157973 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_increaseLiquidity_native.snap b/.forge-snapshots/PositionManager_increaseLiquidity_native.snap index d9bceda2..37c589b6 100644 --- a/.forge-snapshots/PositionManager_increaseLiquidity_native.snap +++ b/.forge-snapshots/PositionManager_increaseLiquidity_native.snap @@ -1 +1 @@ -140904 \ No newline at end of file +140860 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_increase_autocompoundExactUnclaimedFees.snap b/.forge-snapshots/PositionManager_increase_autocompoundExactUnclaimedFees.snap index b6d9ed62..770899b4 100644 --- a/.forge-snapshots/PositionManager_increase_autocompoundExactUnclaimedFees.snap +++ b/.forge-snapshots/PositionManager_increase_autocompoundExactUnclaimedFees.snap @@ -1 +1 @@ -136403 \ No newline at end of file +136359 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_increase_autocompoundExcessFeesCredit.snap b/.forge-snapshots/PositionManager_increase_autocompoundExcessFeesCredit.snap index 8249d48b..8b02aa23 100644 --- a/.forge-snapshots/PositionManager_increase_autocompoundExcessFeesCredit.snap +++ b/.forge-snapshots/PositionManager_increase_autocompoundExcessFeesCredit.snap @@ -1 +1 @@ -177384 \ No newline at end of file +177340 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_increase_autocompound_clearExcess.snap b/.forge-snapshots/PositionManager_increase_autocompound_clearExcess.snap index 270700ec..01851753 100644 --- a/.forge-snapshots/PositionManager_increase_autocompound_clearExcess.snap +++ b/.forge-snapshots/PositionManager_increase_autocompound_clearExcess.snap @@ -1 +1 @@ -148060 \ No newline at end of file +148016 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_mint_native.snap b/.forge-snapshots/PositionManager_mint_native.snap index 920e0e3b..a62444fa 100644 --- a/.forge-snapshots/PositionManager_mint_native.snap +++ b/.forge-snapshots/PositionManager_mint_native.snap @@ -1 +1 @@ -364765 \ No newline at end of file +364721 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_mint_nativeWithSweep_withClose.snap b/.forge-snapshots/PositionManager_mint_nativeWithSweep_withClose.snap index 951aef9d..71b95dab 100644 --- a/.forge-snapshots/PositionManager_mint_nativeWithSweep_withClose.snap +++ b/.forge-snapshots/PositionManager_mint_nativeWithSweep_withClose.snap @@ -1 +1 @@ -373288 \ No newline at end of file +373244 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_mint_nativeWithSweep_withSettlePair.snap b/.forge-snapshots/PositionManager_mint_nativeWithSweep_withSettlePair.snap index 83fb2c93..1883afaa 100644 --- a/.forge-snapshots/PositionManager_mint_nativeWithSweep_withSettlePair.snap +++ b/.forge-snapshots/PositionManager_mint_nativeWithSweep_withSettlePair.snap @@ -1 +1 @@ -372511 \ No newline at end of file +372467 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_mint_onSameTickLower.snap b/.forge-snapshots/PositionManager_mint_onSameTickLower.snap index bd4d6b2d..36461286 100644 --- a/.forge-snapshots/PositionManager_mint_onSameTickLower.snap +++ b/.forge-snapshots/PositionManager_mint_onSameTickLower.snap @@ -1 +1 @@ -317613 \ No newline at end of file +317569 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_mint_onSameTickUpper.snap b/.forge-snapshots/PositionManager_mint_onSameTickUpper.snap index 4e64773a..ff59c265 100644 --- a/.forge-snapshots/PositionManager_mint_onSameTickUpper.snap +++ b/.forge-snapshots/PositionManager_mint_onSameTickUpper.snap @@ -1 +1 @@ -318283 \ No newline at end of file +318239 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_mint_sameRange.snap b/.forge-snapshots/PositionManager_mint_sameRange.snap index 59ae573a..74ca2bf7 100644 --- a/.forge-snapshots/PositionManager_mint_sameRange.snap +++ b/.forge-snapshots/PositionManager_mint_sameRange.snap @@ -1 +1 @@ -243852 \ No newline at end of file +243808 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_mint_settleWithBalance_sweep.snap b/.forge-snapshots/PositionManager_mint_settleWithBalance_sweep.snap index 00d17c63..e394e5e8 100644 --- a/.forge-snapshots/PositionManager_mint_settleWithBalance_sweep.snap +++ b/.forge-snapshots/PositionManager_mint_settleWithBalance_sweep.snap @@ -1 +1 @@ -419032 \ No newline at end of file +418988 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_mint_warmedPool_differentRange.snap b/.forge-snapshots/PositionManager_mint_warmedPool_differentRange.snap index a2b37601..9b34b9e5 100644 --- a/.forge-snapshots/PositionManager_mint_warmedPool_differentRange.snap +++ b/.forge-snapshots/PositionManager_mint_warmedPool_differentRange.snap @@ -1 +1 @@ -323644 \ No newline at end of file +323600 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_mint_withClose.snap b/.forge-snapshots/PositionManager_mint_withClose.snap index 03de054e..5c7354cd 100644 --- a/.forge-snapshots/PositionManager_mint_withClose.snap +++ b/.forge-snapshots/PositionManager_mint_withClose.snap @@ -1 +1 @@ -420166 \ No newline at end of file +420122 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_mint_withSettlePair.snap b/.forge-snapshots/PositionManager_mint_withSettlePair.snap index 66e3f851..f18f3a75 100644 --- a/.forge-snapshots/PositionManager_mint_withSettlePair.snap +++ b/.forge-snapshots/PositionManager_mint_withSettlePair.snap @@ -1 +1 @@ -419224 \ No newline at end of file +419180 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_multicall_initialize_mint.snap b/.forge-snapshots/PositionManager_multicall_initialize_mint.snap index 19ab0c1e..06443a11 100644 --- a/.forge-snapshots/PositionManager_multicall_initialize_mint.snap +++ b/.forge-snapshots/PositionManager_multicall_initialize_mint.snap @@ -1 +1 @@ -464348 \ No newline at end of file +463927 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_unsubscribe.snap b/.forge-snapshots/PositionManager_unsubscribe.snap index c0f309cf..0151c604 100644 --- a/.forge-snapshots/PositionManager_unsubscribe.snap +++ b/.forge-snapshots/PositionManager_unsubscribe.snap @@ -1 +1 @@ -59260 \ No newline at end of file +59238 \ No newline at end of file From fa2d164cbd530458ef3ad3a01691d787c01adb0e Mon Sep 17 00:00:00 2001 From: saucepoint Date: Tue, 8 Oct 2024 15:31:54 -0400 Subject: [PATCH 5/5] lint --- src/base/PoolInitializer.sol | 6 +----- src/base/hooks/BaseHook.sol | 6 +----- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/base/PoolInitializer.sol b/src/base/PoolInitializer.sol index ab9e14bf..445248e1 100644 --- a/src/base/PoolInitializer.sol +++ b/src/base/PoolInitializer.sol @@ -12,11 +12,7 @@ abstract contract PoolInitializer is ImmutableState { /// @notice Initialize a Uniswap v4 Pool /// @param key the PoolKey of the pool to initialize /// @param sqrtPriceX96 the initial sqrtPriceX96 of the pool - function initializePool(PoolKey calldata key, uint160 sqrtPriceX96) - external - payable - returns (int24) - { + function initializePool(PoolKey calldata key, uint160 sqrtPriceX96) external payable returns (int24) { return poolManager.initialize(key, sqrtPriceX96); } } diff --git a/src/base/hooks/BaseHook.sol b/src/base/hooks/BaseHook.sol index 4a9458f2..c53f9b75 100644 --- a/src/base/hooks/BaseHook.sol +++ b/src/base/hooks/BaseHook.sol @@ -61,11 +61,7 @@ abstract contract BaseHook is IHooks, SafeCallback { } /// @inheritdoc IHooks - function afterInitialize(address, PoolKey calldata, uint160, int24) - external - virtual - returns (bytes4) - { + function afterInitialize(address, PoolKey calldata, uint160, int24) external virtual returns (bytes4) { revert HookNotImplemented(); }