From 2085df3d7bd9886940959e90d73e95fd6fd7558f Mon Sep 17 00:00:00 2001 From: saucepoint Date: Thu, 11 Jan 2024 11:19:09 -0500 Subject: [PATCH] reorg struct --- contracts/lens/Quoter.sol | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/contracts/lens/Quoter.sol b/contracts/lens/Quoter.sol index 15ac37b7..6dd27139 100644 --- a/contracts/lens/Quoter.sol +++ b/contracts/lens/Quoter.sol @@ -29,6 +29,23 @@ contract Quoter is IQuoter, ILockCallback { /// @dev int128[2] + sqrtPriceX96After padded to 32bytes + intializeTicksLoaded padded to 32bytes uint256 internal constant MINIMUM_VALID_RESPONSE_LENGTH = 96; + struct QuoteResult { + int128[] deltaAmounts; + uint160[] sqrtPriceX96AfterList; + uint32[] initializedTicksLoadedList; + } + + struct QuoteCache { + BalanceDelta curDeltas; + uint128 prevAmount; + int128 deltaIn; + int128 deltaOut; + int24 tickBefore; + int24 tickAfter; + Currency prevCurrency; + uint160 sqrtPriceX96After; + } + /// @dev Only this address may call this function modifier selfOnly() { if (msg.sender != address(this)) revert NotSelf(); @@ -147,23 +164,6 @@ contract Quoter is IQuoter, ILockCallback { abi.decode(reason, (int128[], uint160[], uint32[])); } - struct QuoteResult { - int128[] deltaAmounts; - uint160[] sqrtPriceX96AfterList; - uint32[] initializedTicksLoadedList; - } - - struct QuoteCache { - Currency prevCurrency; - uint128 prevAmount; - int128 deltaIn; - int128 deltaOut; - BalanceDelta curDeltas; - uint160 sqrtPriceX96After; - int24 tickBefore; - int24 tickAfter; - } - /// @dev quote an ExactInput swap along a path of tokens, then revert with the result function _quoteExactInput(QuoteExactParams memory params) public selfOnly returns (bytes memory) { uint256 pathLength = params.path.length;