diff --git a/.forge-snapshots/FullRangeAddInitialLiquidity.snap b/.forge-snapshots/FullRangeAddInitialLiquidity.snap index ade39882..cc081c07 100644 --- a/.forge-snapshots/FullRangeAddInitialLiquidity.snap +++ b/.forge-snapshots/FullRangeAddInitialLiquidity.snap @@ -1 +1 @@ -385077 \ No newline at end of file +384810 \ No newline at end of file diff --git a/.forge-snapshots/FullRangeAddLiquidity.snap b/.forge-snapshots/FullRangeAddLiquidity.snap index adaace55..3efefad2 100644 --- a/.forge-snapshots/FullRangeAddLiquidity.snap +++ b/.forge-snapshots/FullRangeAddLiquidity.snap @@ -1 +1 @@ -179444 \ No newline at end of file +179177 \ No newline at end of file diff --git a/.forge-snapshots/FullRangeFirstSwap.snap b/.forge-snapshots/FullRangeFirstSwap.snap index fd84f5a0..dab2490c 100644 --- a/.forge-snapshots/FullRangeFirstSwap.snap +++ b/.forge-snapshots/FullRangeFirstSwap.snap @@ -1 +1 @@ -128741 \ No newline at end of file +128474 \ No newline at end of file diff --git a/.forge-snapshots/FullRangeInitialize.snap b/.forge-snapshots/FullRangeInitialize.snap index 8b9a7693..eba3eeed 100644 --- a/.forge-snapshots/FullRangeInitialize.snap +++ b/.forge-snapshots/FullRangeInitialize.snap @@ -1 +1 @@ -1017451 \ No newline at end of file +1017493 \ No newline at end of file diff --git a/.forge-snapshots/FullRangeRemoveLiquidity.snap b/.forge-snapshots/FullRangeRemoveLiquidity.snap index 473e27f2..3d33afe6 100644 --- a/.forge-snapshots/FullRangeRemoveLiquidity.snap +++ b/.forge-snapshots/FullRangeRemoveLiquidity.snap @@ -1 +1 @@ -169775 \ No newline at end of file +169552 \ No newline at end of file diff --git a/.forge-snapshots/FullRangeRemoveLiquidityAndRebalance.snap b/.forge-snapshots/FullRangeRemoveLiquidityAndRebalance.snap index b1c4f9f4..3b896491 100644 --- a/.forge-snapshots/FullRangeRemoveLiquidityAndRebalance.snap +++ b/.forge-snapshots/FullRangeRemoveLiquidityAndRebalance.snap @@ -1 +1 @@ -347304 \ No newline at end of file +346885 \ No newline at end of file diff --git a/.forge-snapshots/FullRangeSecondSwap.snap b/.forge-snapshots/FullRangeSecondSwap.snap index 637cad9d..2ed006ed 100644 --- a/.forge-snapshots/FullRangeSecondSwap.snap +++ b/.forge-snapshots/FullRangeSecondSwap.snap @@ -1 +1 @@ -89494 \ No newline at end of file +89227 \ No newline at end of file diff --git a/.forge-snapshots/FullRangeSwap.snap b/.forge-snapshots/FullRangeSwap.snap index 583c0bff..f7af585f 100644 --- a/.forge-snapshots/FullRangeSwap.snap +++ b/.forge-snapshots/FullRangeSwap.snap @@ -1 +1 @@ -127016 \ No newline at end of file +126749 \ No newline at end of file diff --git a/.forge-snapshots/TWAMMSubmitOrder.snap b/.forge-snapshots/TWAMMSubmitOrder.snap index 8b4d94e0..688d8d7c 100644 --- a/.forge-snapshots/TWAMMSubmitOrder.snap +++ b/.forge-snapshots/TWAMMSubmitOrder.snap @@ -1 +1 @@ -122687 \ No newline at end of file +122731 \ No newline at end of file diff --git a/contracts/hooks/examples/LimitOrder.sol b/contracts/hooks/examples/LimitOrder.sol index d2d8e372..17a35579 100644 --- a/contracts/hooks/examples/LimitOrder.sol +++ b/contracts/hooks/examples/LimitOrder.sol @@ -142,22 +142,20 @@ contract LimitOrder is BaseHook { // order fills are the opposite of swap fills, hence the inversion below bool zeroForOne = !params.zeroForOne; for (; lower <= upper; lower += key.tickSpacing) { - _fillEpoch(sender, key, lower, zeroForOne); + _fillEpoch(key, lower, zeroForOne); } setTickLowerLast(key.toId(), tickLower); return LimitOrder.afterSwap.selector; } - function _fillEpoch(address sender, PoolKey calldata key, int24 lower, bool zeroForOne) internal { + function _fillEpoch(PoolKey calldata key, int24 lower, bool zeroForOne) internal { Epoch epoch = getEpoch(key, lower, zeroForOne); if (!epoch.equals(EPOCH_DEFAULT)) { EpochInfo storage epochInfo = epochInfos[epoch]; epochInfo.filled = true; - address locker = poolManager.getLocker(); - require(locker == sender, "invalid locker"); (uint256 amount0, uint256 amount1) = _lockAcquiredFill(key, lower, -int256(uint256(epochInfo.liquidityTotal)));