From af0eafc8bf3b9d76bf8bc7f0d384ca1c674582da Mon Sep 17 00:00:00 2001 From: Aryan Malik <88618913+Aryan9592@users.noreply.github.com> Date: Sun, 24 Sep 2023 01:19:03 +0530 Subject: [PATCH] Update TWAMM.sol --- contracts/hooks/examples/TWAMM.sol | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contracts/hooks/examples/TWAMM.sol b/contracts/hooks/examples/TWAMM.sol index 08d7e026..aacdce1f 100644 --- a/contracts/hooks/examples/TWAMM.sol +++ b/contracts/hooks/examples/TWAMM.sol @@ -562,10 +562,10 @@ contract TWAMM is BaseHook, ITWAMM { } struct TickCrossingParams { - int24 initializedTick; uint256 nextTimestamp; uint256 secondsElapsedX96; PoolParamsOnExecute pool; + int24 initializedTick; } function _advanceTimeThroughTickCrossing( @@ -621,7 +621,7 @@ contract TWAMM is BaseHook, ITWAMM { nextTickInit = pool.sqrtPriceX96.getTickAtSqrtRatio(); int24 targetTick = nextSqrtPriceX96.getTickAtSqrtRatio(); bool searchingLeft = nextSqrtPriceX96 < pool.sqrtPriceX96; - bool nextTickInitFurtherThanTarget = false; // initialize as false + bool nextTickInitFurtherThanTarget; // initialize as false // nextTickInit returns the furthest tick within one word if no tick within that word is initialized // so we must keep iterating if we haven't reached a tick further than our target tick