{"id":"0f52f2796b7c9cea6db7a77cb71148fe","_format":"hh-sol-build-info-1","solcVersion":"0.7.6","solcLongVersion":"0.7.6+commit.7338295f","input":{"language":"Solidity","sources":{"@airdao/astra-cl-core/contracts/libraries/Oracle.sol":{"content":"// SPDX-License-Identifier: BUSL-1.1\npragma solidity >=0.5.0 <0.8.0;\n\n/// @title Oracle\n/// @notice Provides price and liquidity data useful for a wide variety of system designs\n/// @dev Instances of stored oracle data, \"observations\", are collected in the oracle array\n/// Every pool is initialized with an oracle array length of 1. Anyone can pay the SSTOREs to increase the\n/// maximum length of the oracle array. New slots will be added when the array is fully populated.\n/// Observations are overwritten when the full length of the oracle array is populated.\n/// The most recent observation is available, independent of the length of the oracle array, by passing 0 to observe()\nlibrary Oracle {\n    struct Observation {\n        // the block timestamp of the observation\n        uint32 blockTimestamp;\n        // the tick accumulator, i.e. tick * time elapsed since the pool was first initialized\n        int56 tickCumulative;\n        // the seconds per liquidity, i.e. seconds elapsed / max(1, liquidity) since the pool was first initialized\n        uint160 secondsPerLiquidityCumulativeX128;\n        // whether or not the observation is initialized\n        bool initialized;\n    }\n\n    /// @notice Transforms a previous observation into a new observation, given the passage of time and the current tick and liquidity values\n    /// @dev blockTimestamp _must_ be chronologically equal to or greater than last.blockTimestamp, safe for 0 or 1 overflows\n    /// @param last The specified observation to be transformed\n    /// @param blockTimestamp The timestamp of the new observation\n    /// @param tick The active tick at the time of the new observation\n    /// @param liquidity The total in-range liquidity at the time of the new observation\n    /// @return Observation The newly populated observation\n    function transform(\n        Observation memory last,\n        uint32 blockTimestamp,\n        int24 tick,\n        uint128 liquidity\n    ) private pure returns (Observation memory) {\n        uint32 delta = blockTimestamp - last.blockTimestamp;\n        return\n            Observation({\n                blockTimestamp: blockTimestamp,\n                tickCumulative: last.tickCumulative + int56(tick) * delta,\n                secondsPerLiquidityCumulativeX128: last.secondsPerLiquidityCumulativeX128 +\n                    ((uint160(delta) << 128) / (liquidity > 0 ? liquidity : 1)),\n                initialized: true\n            });\n    }\n\n    /// @notice Initialize the oracle array by writing the first slot. Called once for the lifecycle of the observations array\n    /// @param self The stored oracle array\n    /// @param time The time of the oracle initialization, via block.timestamp truncated to uint32\n    /// @return cardinality The number of populated elements in the oracle array\n    /// @return cardinalityNext The new length of the oracle array, independent of population\n    function initialize(\n        Observation[65535] storage self,\n        uint32 time\n    ) internal returns (uint16 cardinality, uint16 cardinalityNext) {\n        self[0] = Observation({\n            blockTimestamp: time,\n            tickCumulative: 0,\n            secondsPerLiquidityCumulativeX128: 0,\n            initialized: true\n        });\n        return (1, 1);\n    }\n\n    /// @notice Writes an oracle observation to the array\n    /// @dev Writable at most once per block. Index represents the most recently written element. cardinality and index must be tracked externally.\n    /// If the index is at the end of the allowable array length (according to cardinality), and the next cardinality\n    /// is greater than the current one, cardinality may be increased. This restriction is created to preserve ordering.\n    /// @param self The stored oracle array\n    /// @param index The index of the observation that was most recently written to the observations array\n    /// @param blockTimestamp The timestamp of the new observation\n    /// @param tick The active tick at the time of the new observation\n    /// @param liquidity The total in-range liquidity at the time of the new observation\n    /// @param cardinality The number of populated elements in the oracle array\n    /// @param cardinalityNext The new length of the oracle array, independent of population\n    /// @return indexUpdated The new index of the most recently written element in the oracle array\n    /// @return cardinalityUpdated The new cardinality of the oracle array\n    function write(\n        Observation[65535] storage self,\n        uint16 index,\n        uint32 blockTimestamp,\n        int24 tick,\n        uint128 liquidity,\n        uint16 cardinality,\n        uint16 cardinalityNext\n    ) internal returns (uint16 indexUpdated, uint16 cardinalityUpdated) {\n        Observation memory last = self[index];\n\n        // early return if we've already written an observation this block\n        if (last.blockTimestamp == blockTimestamp) return (index, cardinality);\n\n        // if the conditions are right, we can bump the cardinality\n        if (cardinalityNext > cardinality && index == (cardinality - 1)) {\n            cardinalityUpdated = cardinalityNext;\n        } else {\n            cardinalityUpdated = cardinality;\n        }\n\n        indexUpdated = (index + 1) % cardinalityUpdated;\n        self[indexUpdated] = transform(last, blockTimestamp, tick, liquidity);\n    }\n\n    /// @notice Prepares the oracle array to store up to `next` observations\n    /// @param self The stored oracle array\n    /// @param current The current next cardinality of the oracle array\n    /// @param next The proposed next cardinality which will be populated in the oracle array\n    /// @return next The next cardinality which will be populated in the oracle array\n    function grow(Observation[65535] storage self, uint16 current, uint16 next) internal returns (uint16) {\n        require(current > 0, 'I');\n        // no-op if the passed next value isn't greater than the current next value\n        if (next <= current) return current;\n        // store in each slot to prevent fresh SSTOREs in swaps\n        // this data will not be used because the initialized boolean is still false\n        for (uint16 i = current; i < next; i++) self[i].blockTimestamp = 1;\n        return next;\n    }\n\n    /// @notice comparator for 32-bit timestamps\n    /// @dev safe for 0 or 1 overflows, a and b _must_ be chronologically before or equal to time\n    /// @param time A timestamp truncated to 32 bits\n    /// @param a A comparison timestamp from which to determine the relative position of `time`\n    /// @param b From which to determine the relative position of `time`\n    /// @return bool Whether `a` is chronologically <= `b`\n    function lte(uint32 time, uint32 a, uint32 b) private pure returns (bool) {\n        // if there hasn't been overflow, no need to adjust\n        if (a <= time && b <= time) return a <= b;\n\n        uint256 aAdjusted = a > time ? a : a + 2 ** 32;\n        uint256 bAdjusted = b > time ? b : b + 2 ** 32;\n\n        return aAdjusted <= bAdjusted;\n    }\n\n    /// @notice Fetches the observations beforeOrAt and atOrAfter a target, i.e. where [beforeOrAt, atOrAfter] is satisfied.\n    /// The result may be the same observation, or adjacent observations.\n    /// @dev The answer must be contained in the array, used when the target is located within the stored observation\n    /// boundaries: older than the most recent observation and younger, or the same age as, the oldest observation\n    /// @param self The stored oracle array\n    /// @param time The current block.timestamp\n    /// @param target The timestamp at which the reserved observation should be for\n    /// @param index The index of the observation that was most recently written to the observations array\n    /// @param cardinality The number of populated elements in the oracle array\n    /// @return beforeOrAt The observation recorded before, or at, the target\n    /// @return atOrAfter The observation recorded at, or after, the target\n    function binarySearch(\n        Observation[65535] storage self,\n        uint32 time,\n        uint32 target,\n        uint16 index,\n        uint16 cardinality\n    ) private view returns (Observation memory beforeOrAt, Observation memory atOrAfter) {\n        uint256 l = (index + 1) % cardinality; // oldest observation\n        uint256 r = l + cardinality - 1; // newest observation\n        uint256 i;\n        while (true) {\n            i = (l + r) / 2;\n\n            beforeOrAt = self[i % cardinality];\n\n            // we've landed on an uninitialized tick, keep searching higher (more recently)\n            if (!beforeOrAt.initialized) {\n                l = i + 1;\n                continue;\n            }\n\n            atOrAfter = self[(i + 1) % cardinality];\n\n            bool targetAtOrAfter = lte(time, beforeOrAt.blockTimestamp, target);\n\n            // check if we've found the answer!\n            if (targetAtOrAfter && lte(time, target, atOrAfter.blockTimestamp)) break;\n\n            if (!targetAtOrAfter) r = i - 1;\n            else l = i + 1;\n        }\n    }\n\n    /// @notice Fetches the observations beforeOrAt and atOrAfter a given target, i.e. where [beforeOrAt, atOrAfter] is satisfied\n    /// @dev Assumes there is at least 1 initialized observation.\n    /// Used by observeSingle() to compute the counterfactual accumulator values as of a given block timestamp.\n    /// @param self The stored oracle array\n    /// @param time The current block.timestamp\n    /// @param target The timestamp at which the reserved observation should be for\n    /// @param tick The active tick at the time of the returned or simulated observation\n    /// @param index The index of the observation that was most recently written to the observations array\n    /// @param liquidity The total pool liquidity at the time of the call\n    /// @param cardinality The number of populated elements in the oracle array\n    /// @return beforeOrAt The observation which occurred at, or before, the given timestamp\n    /// @return atOrAfter The observation which occurred at, or after, the given timestamp\n    function getSurroundingObservations(\n        Observation[65535] storage self,\n        uint32 time,\n        uint32 target,\n        int24 tick,\n        uint16 index,\n        uint128 liquidity,\n        uint16 cardinality\n    ) private view returns (Observation memory beforeOrAt, Observation memory atOrAfter) {\n        // optimistically set before to the newest observation\n        beforeOrAt = self[index];\n\n        // if the target is chronologically at or after the newest observation, we can early return\n        if (lte(time, beforeOrAt.blockTimestamp, target)) {\n            if (beforeOrAt.blockTimestamp == target) {\n                // if newest observation equals target, we're in the same block, so we can ignore atOrAfter\n                return (beforeOrAt, atOrAfter);\n            } else {\n                // otherwise, we need to transform\n                return (beforeOrAt, transform(beforeOrAt, target, tick, liquidity));\n            }\n        }\n\n        // now, set before to the oldest observation\n        beforeOrAt = self[(index + 1) % cardinality];\n        if (!beforeOrAt.initialized) beforeOrAt = self[0];\n\n        // ensure that the target is chronologically at or after the oldest observation\n        require(lte(time, beforeOrAt.blockTimestamp, target), 'OLD');\n\n        // if we've reached this point, we have to binary search\n        return binarySearch(self, time, target, index, cardinality);\n    }\n\n    /// @dev Reverts if an observation at or before the desired observation timestamp does not exist.\n    /// 0 may be passed as `secondsAgo' to return the current cumulative values.\n    /// If called with a timestamp falling between two observations, returns the counterfactual accumulator values\n    /// at exactly the timestamp between the two observations.\n    /// @param self The stored oracle array\n    /// @param time The current block timestamp\n    /// @param secondsAgo The amount of time to look back, in seconds, at which point to return an observation\n    /// @param tick The current tick\n    /// @param index The index of the observation that was most recently written to the observations array\n    /// @param liquidity The current in-range pool liquidity\n    /// @param cardinality The number of populated elements in the oracle array\n    /// @return tickCumulative The tick * time elapsed since the pool was first initialized, as of `secondsAgo`\n    /// @return secondsPerLiquidityCumulativeX128 The time elapsed / max(1, liquidity) since the pool was first initialized, as of `secondsAgo`\n    function observeSingle(\n        Observation[65535] storage self,\n        uint32 time,\n        uint32 secondsAgo,\n        int24 tick,\n        uint16 index,\n        uint128 liquidity,\n        uint16 cardinality\n    ) internal view returns (int56 tickCumulative, uint160 secondsPerLiquidityCumulativeX128) {\n        if (secondsAgo == 0) {\n            Observation memory last = self[index];\n            if (last.blockTimestamp != time) last = transform(last, time, tick, liquidity);\n            return (last.tickCumulative, last.secondsPerLiquidityCumulativeX128);\n        }\n\n        uint32 target = time - secondsAgo;\n\n        (Observation memory beforeOrAt, Observation memory atOrAfter) = getSurroundingObservations(\n            self,\n            time,\n            target,\n            tick,\n            index,\n            liquidity,\n            cardinality\n        );\n\n        if (target == beforeOrAt.blockTimestamp) {\n            // we're at the left boundary\n            return (beforeOrAt.tickCumulative, beforeOrAt.secondsPerLiquidityCumulativeX128);\n        } else if (target == atOrAfter.blockTimestamp) {\n            // we're at the right boundary\n            return (atOrAfter.tickCumulative, atOrAfter.secondsPerLiquidityCumulativeX128);\n        } else {\n            // we're in the middle\n            uint32 observationTimeDelta = atOrAfter.blockTimestamp - beforeOrAt.blockTimestamp;\n            uint32 targetDelta = target - beforeOrAt.blockTimestamp;\n            return (\n                beforeOrAt.tickCumulative +\n                    ((atOrAfter.tickCumulative - beforeOrAt.tickCumulative) / observationTimeDelta) *\n                    targetDelta,\n                beforeOrAt.secondsPerLiquidityCumulativeX128 +\n                    uint160(\n                        (uint256(\n                            atOrAfter.secondsPerLiquidityCumulativeX128 - beforeOrAt.secondsPerLiquidityCumulativeX128\n                        ) * targetDelta) / observationTimeDelta\n                    )\n            );\n        }\n    }\n\n    /// @notice Returns the accumulator values as of each time seconds ago from the given time in the array of `secondsAgos`\n    /// @dev Reverts if `secondsAgos` > oldest observation\n    /// @param self The stored oracle array\n    /// @param time The current block.timestamp\n    /// @param secondsAgos Each amount of time to look back, in seconds, at which point to return an observation\n    /// @param tick The current tick\n    /// @param index The index of the observation that was most recently written to the observations array\n    /// @param liquidity The current in-range pool liquidity\n    /// @param cardinality The number of populated elements in the oracle array\n    /// @return tickCumulatives The tick * time elapsed since the pool was first initialized, as of each `secondsAgo`\n    /// @return secondsPerLiquidityCumulativeX128s The cumulative seconds / max(1, liquidity) since the pool was first initialized, as of each `secondsAgo`\n    function observe(\n        Observation[65535] storage self,\n        uint32 time,\n        uint32[] memory secondsAgos,\n        int24 tick,\n        uint16 index,\n        uint128 liquidity,\n        uint16 cardinality\n    ) internal view returns (int56[] memory tickCumulatives, uint160[] memory secondsPerLiquidityCumulativeX128s) {\n        require(cardinality > 0, 'I');\n\n        tickCumulatives = new int56[](secondsAgos.length);\n        secondsPerLiquidityCumulativeX128s = new uint160[](secondsAgos.length);\n        for (uint256 i = 0; i < secondsAgos.length; i++) {\n            (tickCumulatives[i], secondsPerLiquidityCumulativeX128s[i]) = observeSingle(\n                self,\n                time,\n                secondsAgos[i],\n                tick,\n                index,\n                liquidity,\n                cardinality\n            );\n        }\n    }\n}\n"},"contracts/test/MockObservations.sol":{"content":"// SPDX-License-Identifier: UNLICENSED\npragma solidity =0.7.6;\n\n// TODO: change to import from @airdao/astra-cl-core\nimport '@airdao/astra-cl-core/contracts/libraries/Oracle.sol';\n\ncontract MockObservations {\n    Oracle.Observation[4] internal oracleObservations;\n\n    int24 slot0Tick;\n    uint16 internal slot0ObservationCardinality;\n    uint16 internal slot0ObservationIndex;\n    uint128 public liquidity;\n\n    bool internal lastObservationCurrentTimestamp;\n\n    constructor(\n        uint32[4] memory _blockTimestamps,\n        int56[4] memory _tickCumulatives,\n        uint128[4] memory _secondsPerLiquidityCumulativeX128s,\n        bool[4] memory _initializeds,\n        int24 _tick,\n        uint16 _observationCardinality,\n        uint16 _observationIndex,\n        bool _lastObservationCurrentTimestamp,\n        uint128 _liquidity\n    ) {\n        for (uint256 i = 0; i < _blockTimestamps.length; i++) {\n            oracleObservations[i] = Oracle.Observation({\n                blockTimestamp: _blockTimestamps[i],\n                tickCumulative: _tickCumulatives[i],\n                secondsPerLiquidityCumulativeX128: _secondsPerLiquidityCumulativeX128s[i],\n                initialized: _initializeds[i]\n            });\n        }\n\n        slot0Tick = _tick;\n        slot0ObservationCardinality = _observationCardinality;\n        slot0ObservationIndex = _observationIndex;\n        lastObservationCurrentTimestamp = _lastObservationCurrentTimestamp;\n        liquidity = _liquidity;\n    }\n\n    function slot0() external view returns (uint160, int24, uint16, uint16, uint16, uint8, bool) {\n        return (0, slot0Tick, slot0ObservationIndex, slot0ObservationCardinality, 0, 0, false);\n    }\n\n    function observations(uint256 index) external view returns (uint32, int56, uint160, bool) {\n        Oracle.Observation memory observation = oracleObservations[index];\n        if (lastObservationCurrentTimestamp) {\n            observation.blockTimestamp =\n                uint32(block.timestamp) -\n                (oracleObservations[slot0ObservationIndex].blockTimestamp - observation.blockTimestamp);\n        }\n        return (\n            observation.blockTimestamp,\n            observation.tickCumulative,\n            observation.secondsPerLiquidityCumulativeX128,\n            observation.initialized\n        );\n    }\n}\n"}},"settings":{"evmVersion":"istanbul","optimizer":{"enabled":true,"runs":1000000},"metadata":{"bytecodeHash":"none"},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"],"":["ast"]}}}},"output":{"sources":{"@airdao/astra-cl-core/contracts/libraries/Oracle.sol":{"ast":{"absolutePath":"@airdao/astra-cl-core/contracts/libraries/Oracle.sol","exportedSymbols":{"Oracle":[734]},"id":735,"license":"BUSL-1.1","nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity",">=","0.5",".0","<","0.8",".0"],"nodeType":"PragmaDirective","src":"37:31:0"},{"abstract":false,"baseContracts":[],"contractDependencies":[],"contractKind":"library","documentation":{"id":2,"nodeType":"StructuredDocumentation","src":"70:613:0","text":"@title Oracle\n @notice Provides price and liquidity data useful for a wide variety of system designs\n @dev Instances of stored oracle data, \"observations\", are collected in the oracle array\n Every pool is initialized with an oracle array length of 1. Anyone can pay the SSTOREs to increase the\n maximum length of the oracle array. New slots will be added when the array is fully populated.\n Observations are overwritten when the full length of the oracle array is populated.\n The most recent observation is available, independent of the length of the oracle array, by passing 0 to observe()"},"fullyImplemented":true,"id":734,"linearizedBaseContracts":[734],"name":"Oracle","nodeType":"ContractDefinition","nodes":[{"canonicalName":"Oracle.Observation","id":11,"members":[{"constant":false,"id":4,"mutability":"mutable","name":"blockTimestamp","nodeType":"VariableDeclaration","scope":11,"src":"783:21:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":3,"name":"uint32","nodeType":"ElementaryTypeName","src":"783:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"visibility":"internal"},{"constant":false,"id":6,"mutability":"mutable","name":"tickCumulative","nodeType":"VariableDeclaration","scope":11,"src":"909:20:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int56","typeString":"int56"},"typeName":{"id":5,"name":"int56","nodeType":"ElementaryTypeName","src":"909:5:0","typeDescriptions":{"typeIdentifier":"t_int56","typeString":"int56"}},"visibility":"internal"},{"constant":false,"id":8,"mutability":"mutable","name":"secondsPerLiquidityCumulativeX128","nodeType":"VariableDeclaration","scope":11,"src":"1055:41:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint160","typeString":"uint160"},"typeName":{"id":7,"name":"uint160","nodeType":"ElementaryTypeName","src":"1055:7:0","typeDescriptions":{"typeIdentifier":"t_uint160","typeString":"uint160"}},"visibility":"internal"},{"constant":false,"id":10,"mutability":"mutable","name":"initialized","nodeType":"VariableDeclaration","scope":11,"src":"1163:16:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":9,"name":"bool","nodeType":"ElementaryTypeName","src":"1163:4:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"visibility":"internal"}],"name":"Observation","nodeType":"StructDefinition","scope":734,"src":"704:482:0","visibility":"public"},{"body":{"id":65,"nodeType":"Block","src":"1989:455:0","statements":[{"assignments":[26],"declarations":[{"constant":false,"id":26,"mutability":"mutable","name":"delta","nodeType":"VariableDeclaration","scope":65,"src":"1999:12:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":25,"name":"uint32","nodeType":"ElementaryTypeName","src":"1999:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"visibility":"internal"}],"id":31,"initialValue":{"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":30,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":27,"name":"blockTimestamp","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":16,"src":"2014:14:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"expression":{"id":28,"name":"last","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":14,"src":"2031:4:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation memory"}},"id":29,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"blockTimestamp","nodeType":"MemberAccess","referencedDeclaration":4,"src":"2031:19:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"2014:36:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"VariableDeclarationStatement","src":"1999:51:0"},{"expression":{"arguments":[{"id":33,"name":"blockTimestamp","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":16,"src":"2125:14:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},{"commonType":{"typeIdentifier":"t_int56","typeString":"int56"},"id":42,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"expression":{"id":34,"name":"last","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":14,"src":"2173:4:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation memory"}},"id":35,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"tickCumulative","nodeType":"MemberAccess","referencedDeclaration":6,"src":"2173:19:0","typeDescriptions":{"typeIdentifier":"t_int56","typeString":"int56"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"commonType":{"typeIdentifier":"t_int56","typeString":"int56"},"id":41,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"arguments":[{"id":38,"name":"tick","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":18,"src":"2201:4:0","typeDescriptions":{"typeIdentifier":"t_int24","typeString":"int24"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_int24","typeString":"int24"}],"id":37,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"2195:5:0","typeDescriptions":{"typeIdentifier":"t_type$_t_int56_$","typeString":"type(int56)"},"typeName":{"id":36,"name":"int56","nodeType":"ElementaryTypeName","src":"2195:5:0","typeDescriptions":{}}},"id":39,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2195:11:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_int56","typeString":"int56"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"id":40,"name":"delta","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":26,"src":"2209:5:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"2195:19:0","typeDescriptions":{"typeIdentifier":"t_int56","typeString":"int56"}},"src":"2173:41:0","typeDescriptions":{"typeIdentifier":"t_int56","typeString":"int56"}},{"commonType":{"typeIdentifier":"t_uint160","typeString":"uint160"},"id":61,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"expression":{"id":43,"name":"last","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":14,"src":"2267:4:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation memory"}},"id":44,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"secondsPerLiquidityCumulativeX128","nodeType":"MemberAccess","referencedDeclaration":8,"src":"2267:38:0","typeDescriptions":{"typeIdentifier":"t_uint160","typeString":"uint160"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"components":[{"commonType":{"typeIdentifier":"t_uint160","typeString":"uint160"},"id":59,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"components":[{"commonType":{"typeIdentifier":"t_uint160","typeString":"uint160"},"id":50,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"arguments":[{"id":47,"name":"delta","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":26,"src":"2338:5:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint32","typeString":"uint32"}],"id":46,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"2330:7:0","typeDescriptions":{"typeIdentifier":"t_type$_t_uint160_$","typeString":"type(uint160)"},"typeName":{"id":45,"name":"uint160","nodeType":"ElementaryTypeName","src":"2330:7:0","typeDescriptions":{}}},"id":48,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2330:14:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_uint160","typeString":"uint160"}},"nodeType":"BinaryOperation","operator":"<<","rightExpression":{"hexValue":"313238","id":49,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2348:3:0","typeDescriptions":{"typeIdentifier":"t_rational_128_by_1","typeString":"int_const 128"},"value":"128"},"src":"2330:21:0","typeDescriptions":{"typeIdentifier":"t_uint160","typeString":"uint160"}}],"id":51,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"2329:23:0","typeDescriptions":{"typeIdentifier":"t_uint160","typeString":"uint160"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"components":[{"condition":{"commonType":{"typeIdentifier":"t_uint128","typeString":"uint128"},"id":54,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":52,"name":"liquidity","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":20,"src":"2356:9:0","typeDescriptions":{"typeIdentifier":"t_uint128","typeString":"uint128"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"hexValue":"30","id":53,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2368:1:0","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2356:13:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseExpression":{"hexValue":"31","id":56,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2384:1:0","typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"id":57,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"Conditional","src":"2356:29:0","trueExpression":{"id":55,"name":"liquidity","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":20,"src":"2372:9:0","typeDescriptions":{"typeIdentifier":"t_uint128","typeString":"uint128"}},"typeDescriptions":{"typeIdentifier":"t_uint128","typeString":"uint128"}}],"id":58,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"2355:31:0","typeDescriptions":{"typeIdentifier":"t_uint128","typeString":"uint128"}},"src":"2329:57:0","typeDescriptions":{"typeIdentifier":"t_uint160","typeString":"uint160"}}],"id":60,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"2328:59:0","typeDescriptions":{"typeIdentifier":"t_uint160","typeString":"uint160"}},"src":"2267:120:0","typeDescriptions":{"typeIdentifier":"t_uint160","typeString":"uint160"}},{"hexValue":"74727565","id":62,"isConstant":false,"isLValue":false,"isPure":true,"kind":"bool","lValueRequested":false,"nodeType":"Literal","src":"2418:4:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"value":"true"}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint32","typeString":"uint32"},{"typeIdentifier":"t_int56","typeString":"int56"},{"typeIdentifier":"t_uint160","typeString":"uint160"},{"typeIdentifier":"t_bool","typeString":"bool"}],"id":32,"name":"Observation","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":11,"src":"2079:11:0","typeDescriptions":{"typeIdentifier":"t_type$_t_struct$_Observation_$11_storage_ptr_$","typeString":"type(struct Oracle.Observation storage pointer)"}},"id":63,"isConstant":false,"isLValue":false,"isPure":false,"kind":"structConstructorCall","lValueRequested":false,"names":["blockTimestamp","tickCumulative","secondsPerLiquidityCumulativeX128","initialized"],"nodeType":"FunctionCall","src":"2079:358:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation memory"}},"functionReturnParameters":24,"id":64,"nodeType":"Return","src":"2060:377:0"}]},"documentation":{"id":12,"nodeType":"StructuredDocumentation","src":"1192:614:0","text":"@notice Transforms a previous observation into a new observation, given the passage of time and the current tick and liquidity values\n @dev blockTimestamp _must_ be chronologically equal to or greater than last.blockTimestamp, safe for 0 or 1 overflows\n @param last The specified observation to be transformed\n @param blockTimestamp The timestamp of the new observation\n @param tick The active tick at the time of the new observation\n @param liquidity The total in-range liquidity at the time of the new observation\n @return Observation The newly populated observation"},"id":66,"implemented":true,"kind":"function","modifiers":[],"name":"transform","nodeType":"FunctionDefinition","parameters":{"id":21,"nodeType":"ParameterList","parameters":[{"constant":false,"id":14,"mutability":"mutable","name":"last","nodeType":"VariableDeclaration","scope":66,"src":"1839:23:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation"},"typeName":{"id":13,"name":"Observation","nodeType":"UserDefinedTypeName","referencedDeclaration":11,"src":"1839:11:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_storage_ptr","typeString":"struct Oracle.Observation"}},"visibility":"internal"},{"constant":false,"id":16,"mutability":"mutable","name":"blockTimestamp","nodeType":"VariableDeclaration","scope":66,"src":"1872:21:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":15,"name":"uint32","nodeType":"ElementaryTypeName","src":"1872:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"visibility":"internal"},{"constant":false,"id":18,"mutability":"mutable","name":"tick","nodeType":"VariableDeclaration","scope":66,"src":"1903:10:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int24","typeString":"int24"},"typeName":{"id":17,"name":"int24","nodeType":"ElementaryTypeName","src":"1903:5:0","typeDescriptions":{"typeIdentifier":"t_int24","typeString":"int24"}},"visibility":"internal"},{"constant":false,"id":20,"mutability":"mutable","name":"liquidity","nodeType":"VariableDeclaration","scope":66,"src":"1923:17:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint128","typeString":"uint128"},"typeName":{"id":19,"name":"uint128","nodeType":"ElementaryTypeName","src":"1923:7:0","typeDescriptions":{"typeIdentifier":"t_uint128","typeString":"uint128"}},"visibility":"internal"}],"src":"1829:117:0"},"returnParameters":{"id":24,"nodeType":"ParameterList","parameters":[{"constant":false,"id":23,"mutability":"mutable","name":"","nodeType":"VariableDeclaration","scope":66,"src":"1969:18:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation"},"typeName":{"id":22,"name":"Observation","nodeType":"UserDefinedTypeName","referencedDeclaration":11,"src":"1969:11:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_storage_ptr","typeString":"struct Oracle.Observation"}},"visibility":"internal"}],"src":"1968:20:0"},"scope":734,"src":"1811:633:0","stateMutability":"pure","virtual":false,"visibility":"private"},{"body":{"id":95,"nodeType":"Block","src":"3045:219:0","statements":[{"expression":{"id":89,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"baseExpression":{"id":80,"name":"self","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":71,"src":"3055:4:0","typeDescriptions":{"typeIdentifier":"t_array$_t_struct$_Observation_$11_storage_$65535_storage_ptr","typeString":"struct Oracle.Observation storage ref[65535] storage pointer"}},"id":82,"indexExpression":{"hexValue":"30","id":81,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3060:1:0","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"3055:7:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_storage","typeString":"struct Oracle.Observation storage ref"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"arguments":[{"id":84,"name":"time","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":73,"src":"3107:4:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},{"hexValue":"30","id":85,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3141:1:0","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},{"hexValue":"30","id":86,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3191:1:0","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},{"hexValue":"74727565","id":87,"isConstant":false,"isLValue":false,"isPure":true,"kind":"bool","lValueRequested":false,"nodeType":"Literal","src":"3219:4:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"value":"true"}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint32","typeString":"uint32"},{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},{"typeIdentifier":"t_bool","typeString":"bool"}],"id":83,"name":"Observation","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":11,"src":"3065:11:0","typeDescriptions":{"typeIdentifier":"t_type$_t_struct$_Observation_$11_storage_ptr_$","typeString":"type(struct Oracle.Observation storage pointer)"}},"id":88,"isConstant":false,"isLValue":false,"isPure":false,"kind":"structConstructorCall","lValueRequested":false,"names":["blockTimestamp","tickCumulative","secondsPerLiquidityCumulativeX128","initialized"],"nodeType":"FunctionCall","src":"3065:169:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation memory"}},"src":"3055:179:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_storage","typeString":"struct Oracle.Observation storage ref"}},"id":90,"nodeType":"ExpressionStatement","src":"3055:179:0"},{"expression":{"components":[{"hexValue":"31","id":91,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3252:1:0","typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},{"hexValue":"31","id":92,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3255:1:0","typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"}],"id":93,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"TupleExpression","src":"3251:6:0","typeDescriptions":{"typeIdentifier":"t_tuple$_t_rational_1_by_1_$_t_rational_1_by_1_$","typeString":"tuple(int_const 1,int_const 1)"}},"functionReturnParameters":79,"id":94,"nodeType":"Return","src":"3244:13:0"}]},"documentation":{"id":67,"nodeType":"StructuredDocumentation","src":"2450:440:0","text":"@notice Initialize the oracle array by writing the first slot. Called once for the lifecycle of the observations array\n @param self The stored oracle array\n @param time The time of the oracle initialization, via block.timestamp truncated to uint32\n @return cardinality The number of populated elements in the oracle array\n @return cardinalityNext The new length of the oracle array, independent of population"},"id":96,"implemented":true,"kind":"function","modifiers":[],"name":"initialize","nodeType":"FunctionDefinition","parameters":{"id":74,"nodeType":"ParameterList","parameters":[{"constant":false,"id":71,"mutability":"mutable","name":"self","nodeType":"VariableDeclaration","scope":96,"src":"2924:31:0","stateVariable":false,"storageLocation":"storage","typeDescriptions":{"typeIdentifier":"t_array$_t_struct$_Observation_$11_storage_$65535_storage_ptr","typeString":"struct Oracle.Observation[65535]"},"typeName":{"baseType":{"id":68,"name":"Observation","nodeType":"UserDefinedTypeName","referencedDeclaration":11,"src":"2924:11:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_storage_ptr","typeString":"struct Oracle.Observation"}},"id":70,"length":{"hexValue":"3635353335","id":69,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2936:5:0","typeDescriptions":{"typeIdentifier":"t_rational_65535_by_1","typeString":"int_const 65535"},"value":"65535"},"nodeType":"ArrayTypeName","src":"2924:18:0","typeDescriptions":{"typeIdentifier":"t_array$_t_struct$_Observation_$11_storage_$65535_storage_ptr","typeString":"struct Oracle.Observation[65535]"}},"visibility":"internal"},{"constant":false,"id":73,"mutability":"mutable","name":"time","nodeType":"VariableDeclaration","scope":96,"src":"2965:11:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":72,"name":"uint32","nodeType":"ElementaryTypeName","src":"2965:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"visibility":"internal"}],"src":"2914:68:0"},"returnParameters":{"id":79,"nodeType":"ParameterList","parameters":[{"constant":false,"id":76,"mutability":"mutable","name":"cardinality","nodeType":"VariableDeclaration","scope":96,"src":"3001:18:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"},"typeName":{"id":75,"name":"uint16","nodeType":"ElementaryTypeName","src":"3001:6:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"visibility":"internal"},{"constant":false,"id":78,"mutability":"mutable","name":"cardinalityNext","nodeType":"VariableDeclaration","scope":96,"src":"3021:22:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"},"typeName":{"id":77,"name":"uint16","nodeType":"ElementaryTypeName","src":"3021:6:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"visibility":"internal"}],"src":"3000:44:0"},"scope":734,"src":"2895:369:0","stateMutability":"nonpayable","virtual":false,"visibility":"internal"},{"body":{"id":176,"nodeType":"Block","src":"4729:614:0","statements":[{"assignments":[121],"declarations":[{"constant":false,"id":121,"mutability":"mutable","name":"last","nodeType":"VariableDeclaration","scope":176,"src":"4739:23:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation"},"typeName":{"id":120,"name":"Observation","nodeType":"UserDefinedTypeName","referencedDeclaration":11,"src":"4739:11:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_storage_ptr","typeString":"struct Oracle.Observation"}},"visibility":"internal"}],"id":125,"initialValue":{"baseExpression":{"id":122,"name":"self","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":101,"src":"4765:4:0","typeDescriptions":{"typeIdentifier":"t_array$_t_struct$_Observation_$11_storage_$65535_storage_ptr","typeString":"struct Oracle.Observation storage ref[65535] storage pointer"}},"id":124,"indexExpression":{"id":123,"name":"index","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":103,"src":"4770:5:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"4765:11:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_storage","typeString":"struct Oracle.Observation storage ref"}},"nodeType":"VariableDeclarationStatement","src":"4739:37:0"},{"condition":{"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":129,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"expression":{"id":126,"name":"last","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":121,"src":"4866:4:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation memory"}},"id":127,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"blockTimestamp","nodeType":"MemberAccess","referencedDeclaration":4,"src":"4866:19:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"id":128,"name":"blockTimestamp","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":105,"src":"4889:14:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"4866:37:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":134,"nodeType":"IfStatement","src":"4862:70:0","trueBody":{"expression":{"components":[{"id":130,"name":"index","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":103,"src":"4913:5:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},{"id":131,"name":"cardinality","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":111,"src":"4920:11:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}}],"id":132,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"4912:20:0","typeDescriptions":{"typeIdentifier":"t_tuple$_t_uint16_$_t_uint16_$","typeString":"tuple(uint16,uint16)"}},"functionReturnParameters":119,"id":133,"nodeType":"Return","src":"4905:27:0"}},{"condition":{"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":144,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"commonType":{"typeIdentifier":"t_uint16","typeString":"uint16"},"id":137,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":135,"name":"cardinalityNext","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":113,"src":"5015:15:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"id":136,"name":"cardinality","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":111,"src":"5033:11:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"src":"5015:29:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"commonType":{"typeIdentifier":"t_uint16","typeString":"uint16"},"id":143,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":138,"name":"index","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":103,"src":"5048:5:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"components":[{"commonType":{"typeIdentifier":"t_uint16","typeString":"uint16"},"id":141,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":139,"name":"cardinality","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":111,"src":"5058:11:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"hexValue":"31","id":140,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5072:1:0","typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"5058:15:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}}],"id":142,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"5057:17:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"src":"5048:26:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"5015:59:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"id":154,"nodeType":"Block","src":"5143:57:0","statements":[{"expression":{"id":152,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"id":150,"name":"cardinalityUpdated","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":118,"src":"5157:18:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"id":151,"name":"cardinality","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":111,"src":"5178:11:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"src":"5157:32:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"id":153,"nodeType":"ExpressionStatement","src":"5157:32:0"}]},"id":155,"nodeType":"IfStatement","src":"5011:189:0","trueBody":{"id":149,"nodeType":"Block","src":"5076:61:0","statements":[{"expression":{"id":147,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"id":145,"name":"cardinalityUpdated","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":118,"src":"5090:18:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"id":146,"name":"cardinalityNext","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":113,"src":"5111:15:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"src":"5090:36:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"id":148,"nodeType":"ExpressionStatement","src":"5090:36:0"}]}},{"expression":{"id":163,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"id":156,"name":"indexUpdated","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":116,"src":"5210:12:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"commonType":{"typeIdentifier":"t_uint16","typeString":"uint16"},"id":162,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"components":[{"commonType":{"typeIdentifier":"t_uint16","typeString":"uint16"},"id":159,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":157,"name":"index","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":103,"src":"5226:5:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"hexValue":"31","id":158,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5234:1:0","typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"5226:9:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}}],"id":160,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"5225:11:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"nodeType":"BinaryOperation","operator":"%","rightExpression":{"id":161,"name":"cardinalityUpdated","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":118,"src":"5239:18:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"src":"5225:32:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"src":"5210:47:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"id":164,"nodeType":"ExpressionStatement","src":"5210:47:0"},{"expression":{"id":174,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"baseExpression":{"id":165,"name":"self","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":101,"src":"5267:4:0","typeDescriptions":{"typeIdentifier":"t_array$_t_struct$_Observation_$11_storage_$65535_storage_ptr","typeString":"struct Oracle.Observation storage ref[65535] storage pointer"}},"id":167,"indexExpression":{"id":166,"name":"indexUpdated","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":116,"src":"5272:12:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"5267:18:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_storage","typeString":"struct Oracle.Observation storage ref"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"arguments":[{"id":169,"name":"last","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":121,"src":"5298:4:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation memory"}},{"id":170,"name":"blockTimestamp","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":105,"src":"5304:14:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},{"id":171,"name":"tick","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":107,"src":"5320:4:0","typeDescriptions":{"typeIdentifier":"t_int24","typeString":"int24"}},{"id":172,"name":"liquidity","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":109,"src":"5326:9:0","typeDescriptions":{"typeIdentifier":"t_uint128","typeString":"uint128"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation memory"},{"typeIdentifier":"t_uint32","typeString":"uint32"},{"typeIdentifier":"t_int24","typeString":"int24"},{"typeIdentifier":"t_uint128","typeString":"uint128"}],"id":168,"name":"transform","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":66,"src":"5288:9:0","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_struct$_Observation_$11_memory_ptr_$_t_uint32_$_t_int24_$_t_uint128_$returns$_t_struct$_Observation_$11_memory_ptr_$","typeString":"function (struct Oracle.Observation memory,uint32,int24,uint128) pure returns (struct Oracle.Observation memory)"}},"id":173,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5288:48:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation memory"}},"src":"5267:69:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_storage","typeString":"struct Oracle.Observation storage ref"}},"id":175,"nodeType":"ExpressionStatement","src":"5267:69:0"}]},"documentation":{"id":97,"nodeType":"StructuredDocumentation","src":"3270:1166:0","text":"@notice Writes an oracle observation to the array\n @dev Writable at most once per block. Index represents the most recently written element. cardinality and index must be tracked externally.\n If the index is at the end of the allowable array length (according to cardinality), and the next cardinality\n is greater than the current one, cardinality may be increased. This restriction is created to preserve ordering.\n @param self The stored oracle array\n @param index The index of the observation that was most recently written to the observations array\n @param blockTimestamp The timestamp of the new observation\n @param tick The active tick at the time of the new observation\n @param liquidity The total in-range liquidity at the time of the new observation\n @param cardinality The number of populated elements in the oracle array\n @param cardinalityNext The new length of the oracle array, independent of population\n @return indexUpdated The new index of the most recently written element in the oracle array\n @return cardinalityUpdated The new cardinality of the oracle array"},"id":177,"implemented":true,"kind":"function","modifiers":[],"name":"write","nodeType":"FunctionDefinition","parameters":{"id":114,"nodeType":"ParameterList","parameters":[{"constant":false,"id":101,"mutability":"mutable","name":"self","nodeType":"VariableDeclaration","scope":177,"src":"4465:31:0","stateVariable":false,"storageLocation":"storage","typeDescriptions":{"typeIdentifier":"t_array$_t_struct$_Observation_$11_storage_$65535_storage_ptr","typeString":"struct Oracle.Observation[65535]"},"typeName":{"baseType":{"id":98,"name":"Observation","nodeType":"UserDefinedTypeName","referencedDeclaration":11,"src":"4465:11:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_storage_ptr","typeString":"struct Oracle.Observation"}},"id":100,"length":{"hexValue":"3635353335","id":99,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4477:5:0","typeDescriptions":{"typeIdentifier":"t_rational_65535_by_1","typeString":"int_const 65535"},"value":"65535"},"nodeType":"ArrayTypeName","src":"4465:18:0","typeDescriptions":{"typeIdentifier":"t_array$_t_struct$_Observation_$11_storage_$65535_storage_ptr","typeString":"struct Oracle.Observation[65535]"}},"visibility":"internal"},{"constant":false,"id":103,"mutability":"mutable","name":"index","nodeType":"VariableDeclaration","scope":177,"src":"4506:12:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"},"typeName":{"id":102,"name":"uint16","nodeType":"ElementaryTypeName","src":"4506:6:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"visibility":"internal"},{"constant":false,"id":105,"mutability":"mutable","name":"blockTimestamp","nodeType":"VariableDeclaration","scope":177,"src":"4528:21:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":104,"name":"uint32","nodeType":"ElementaryTypeName","src":"4528:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"visibility":"internal"},{"constant":false,"id":107,"mutability":"mutable","name":"tick","nodeType":"VariableDeclaration","scope":177,"src":"4559:10:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int24","typeString":"int24"},"typeName":{"id":106,"name":"int24","nodeType":"ElementaryTypeName","src":"4559:5:0","typeDescriptions":{"typeIdentifier":"t_int24","typeString":"int24"}},"visibility":"internal"},{"constant":false,"id":109,"mutability":"mutable","name":"liquidity","nodeType":"VariableDeclaration","scope":177,"src":"4579:17:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint128","typeString":"uint128"},"typeName":{"id":108,"name":"uint128","nodeType":"ElementaryTypeName","src":"4579:7:0","typeDescriptions":{"typeIdentifier":"t_uint128","typeString":"uint128"}},"visibility":"internal"},{"constant":false,"id":111,"mutability":"mutable","name":"cardinality","nodeType":"VariableDeclaration","scope":177,"src":"4606:18:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"},"typeName":{"id":110,"name":"uint16","nodeType":"ElementaryTypeName","src":"4606:6:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"visibility":"internal"},{"constant":false,"id":113,"mutability":"mutable","name":"cardinalityNext","nodeType":"VariableDeclaration","scope":177,"src":"4634:22:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"},"typeName":{"id":112,"name":"uint16","nodeType":"ElementaryTypeName","src":"4634:6:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"visibility":"internal"}],"src":"4455:207:0"},"returnParameters":{"id":119,"nodeType":"ParameterList","parameters":[{"constant":false,"id":116,"mutability":"mutable","name":"indexUpdated","nodeType":"VariableDeclaration","scope":177,"src":"4681:19:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"},"typeName":{"id":115,"name":"uint16","nodeType":"ElementaryTypeName","src":"4681:6:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"visibility":"internal"},{"constant":false,"id":118,"mutability":"mutable","name":"cardinalityUpdated","nodeType":"VariableDeclaration","scope":177,"src":"4702:25:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"},"typeName":{"id":117,"name":"uint16","nodeType":"ElementaryTypeName","src":"4702:6:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"visibility":"internal"}],"src":"4680:48:0"},"scope":734,"src":"4441:902:0","stateMutability":"nonpayable","virtual":false,"visibility":"internal"},{"body":{"id":224,"nodeType":"Block","src":"5824:417:0","statements":[{"expression":{"arguments":[{"commonType":{"typeIdentifier":"t_uint16","typeString":"uint16"},"id":194,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":192,"name":"current","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":184,"src":"5842:7:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"hexValue":"30","id":193,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5852:1:0","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"5842:11:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},{"hexValue":"49","id":195,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"5855:3:0","typeDescriptions":{"typeIdentifier":"t_stringliteral_8d61ecf6e15472e15b1a0f63cd77f62aa57e6edcd3871d7a841f1056fb42b216","typeString":"literal_string \"I\""},"value":"I"}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"},{"typeIdentifier":"t_stringliteral_8d61ecf6e15472e15b1a0f63cd77f62aa57e6edcd3871d7a841f1056fb42b216","typeString":"literal_string \"I\""}],"id":191,"name":"require","nodeType":"Identifier","overloadedDeclarations":[-18,-18],"referencedDeclaration":-18,"src":"5834:7:0","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$","typeString":"function (bool,string memory) pure"}},"id":196,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5834:25:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":197,"nodeType":"ExpressionStatement","src":"5834:25:0"},{"condition":{"commonType":{"typeIdentifier":"t_uint16","typeString":"uint16"},"id":200,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":198,"name":"next","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":186,"src":"5957:4:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"nodeType":"BinaryOperation","operator":"<=","rightExpression":{"id":199,"name":"current","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":184,"src":"5965:7:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"src":"5957:15:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":203,"nodeType":"IfStatement","src":"5953:35:0","trueBody":{"expression":{"id":201,"name":"current","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":184,"src":"5981:7:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"functionReturnParameters":190,"id":202,"nodeType":"Return","src":"5974:14:0"}},{"body":{"expression":{"id":219,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"expression":{"baseExpression":{"id":214,"name":"self","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":182,"src":"6187:4:0","typeDescriptions":{"typeIdentifier":"t_array$_t_struct$_Observation_$11_storage_$65535_storage_ptr","typeString":"struct Oracle.Observation storage ref[65535] storage pointer"}},"id":216,"indexExpression":{"id":215,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":205,"src":"6192:1:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"6187:7:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_storage","typeString":"struct Oracle.Observation storage ref"}},"id":217,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"memberName":"blockTimestamp","nodeType":"MemberAccess","referencedDeclaration":4,"src":"6187:22:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"hexValue":"31","id":218,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"6212:1:0","typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"6187:26:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":220,"nodeType":"ExpressionStatement","src":"6187:26:0"},"condition":{"commonType":{"typeIdentifier":"t_uint16","typeString":"uint16"},"id":210,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":208,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":205,"src":"6172:1:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"id":209,"name":"next","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":186,"src":"6176:4:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"src":"6172:8:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":221,"initializationExpression":{"assignments":[205],"declarations":[{"constant":false,"id":205,"mutability":"mutable","name":"i","nodeType":"VariableDeclaration","scope":221,"src":"6152:8:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"},"typeName":{"id":204,"name":"uint16","nodeType":"ElementaryTypeName","src":"6152:6:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"visibility":"internal"}],"id":207,"initialValue":{"id":206,"name":"current","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":184,"src":"6163:7:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"nodeType":"VariableDeclarationStatement","src":"6152:18:0"},"loopExpression":{"expression":{"id":212,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"6182:3:0","subExpression":{"id":211,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":205,"src":"6182:1:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"id":213,"nodeType":"ExpressionStatement","src":"6182:3:0"},"nodeType":"ForStatement","src":"6147:66:0"},{"expression":{"id":222,"name":"next","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":186,"src":"6230:4:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"functionReturnParameters":190,"id":223,"nodeType":"Return","src":"6223:11:0"}]},"documentation":{"id":178,"nodeType":"StructuredDocumentation","src":"5349:368:0","text":"@notice Prepares the oracle array to store up to `next` observations\n @param self The stored oracle array\n @param current The current next cardinality of the oracle array\n @param next The proposed next cardinality which will be populated in the oracle array\n @return next The next cardinality which will be populated in the oracle array"},"id":225,"implemented":true,"kind":"function","modifiers":[],"name":"grow","nodeType":"FunctionDefinition","parameters":{"id":187,"nodeType":"ParameterList","parameters":[{"constant":false,"id":182,"mutability":"mutable","name":"self","nodeType":"VariableDeclaration","scope":225,"src":"5736:31:0","stateVariable":false,"storageLocation":"storage","typeDescriptions":{"typeIdentifier":"t_array$_t_struct$_Observation_$11_storage_$65535_storage_ptr","typeString":"struct Oracle.Observation[65535]"},"typeName":{"baseType":{"id":179,"name":"Observation","nodeType":"UserDefinedTypeName","referencedDeclaration":11,"src":"5736:11:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_storage_ptr","typeString":"struct Oracle.Observation"}},"id":181,"length":{"hexValue":"3635353335","id":180,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5748:5:0","typeDescriptions":{"typeIdentifier":"t_rational_65535_by_1","typeString":"int_const 65535"},"value":"65535"},"nodeType":"ArrayTypeName","src":"5736:18:0","typeDescriptions":{"typeIdentifier":"t_array$_t_struct$_Observation_$11_storage_$65535_storage_ptr","typeString":"struct Oracle.Observation[65535]"}},"visibility":"internal"},{"constant":false,"id":184,"mutability":"mutable","name":"current","nodeType":"VariableDeclaration","scope":225,"src":"5769:14:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"},"typeName":{"id":183,"name":"uint16","nodeType":"ElementaryTypeName","src":"5769:6:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"visibility":"internal"},{"constant":false,"id":186,"mutability":"mutable","name":"next","nodeType":"VariableDeclaration","scope":225,"src":"5785:11:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"},"typeName":{"id":185,"name":"uint16","nodeType":"ElementaryTypeName","src":"5785:6:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"visibility":"internal"}],"src":"5735:62:0"},"returnParameters":{"id":190,"nodeType":"ParameterList","parameters":[{"constant":false,"id":189,"mutability":"mutable","name":"","nodeType":"VariableDeclaration","scope":225,"src":"5816:6:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"},"typeName":{"id":188,"name":"uint16","nodeType":"ElementaryTypeName","src":"5816:6:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"visibility":"internal"}],"src":"5815:8:0"},"scope":734,"src":"5722:519:0","stateMutability":"nonpayable","virtual":false,"visibility":"internal"},{"body":{"id":279,"nodeType":"Block","src":"6749:271:0","statements":[{"condition":{"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":243,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":239,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":237,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":230,"src":"6823:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"BinaryOperation","operator":"<=","rightExpression":{"id":238,"name":"time","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":228,"src":"6828:4:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"6823:9:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":242,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":240,"name":"b","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":232,"src":"6836:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"BinaryOperation","operator":"<=","rightExpression":{"id":241,"name":"time","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":228,"src":"6841:4:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"6836:9:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"6823:22:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":248,"nodeType":"IfStatement","src":"6819:41:0","trueBody":{"expression":{"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":246,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":244,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":230,"src":"6854:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"BinaryOperation","operator":"<=","rightExpression":{"id":245,"name":"b","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":232,"src":"6859:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"6854:6:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"functionReturnParameters":236,"id":247,"nodeType":"Return","src":"6847:13:0"}},{"assignments":[250],"declarations":[{"constant":false,"id":250,"mutability":"mutable","name":"aAdjusted","nodeType":"VariableDeclaration","scope":279,"src":"6871:17:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":249,"name":"uint256","nodeType":"ElementaryTypeName","src":"6871:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"id":261,"initialValue":{"condition":{"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":253,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":251,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":230,"src":"6891:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"id":252,"name":"time","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":228,"src":"6895:4:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"6891:8:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseExpression":{"commonType":{"typeIdentifier":"t_uint40","typeString":"uint40"},"id":259,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":255,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":230,"src":"6906:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"commonType":{"typeIdentifier":"t_rational_4294967296_by_1","typeString":"int_const 4294967296"},"id":258,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"hexValue":"32","id":256,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"6910:1:0","typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"nodeType":"BinaryOperation","operator":"**","rightExpression":{"hexValue":"3332","id":257,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"6915:2:0","typeDescriptions":{"typeIdentifier":"t_rational_32_by_1","typeString":"int_const 32"},"value":"32"},"src":"6910:7:0","typeDescriptions":{"typeIdentifier":"t_rational_4294967296_by_1","typeString":"int_const 4294967296"}},"src":"6906:11:0","typeDescriptions":{"typeIdentifier":"t_uint40","typeString":"uint40"}},"id":260,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"Conditional","src":"6891:26:0","trueExpression":{"id":254,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":230,"src":"6902:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"typeDescriptions":{"typeIdentifier":"t_uint40","typeString":"uint40"}},"nodeType":"VariableDeclarationStatement","src":"6871:46:0"},{"assignments":[263],"declarations":[{"constant":false,"id":263,"mutability":"mutable","name":"bAdjusted","nodeType":"VariableDeclaration","scope":279,"src":"6927:17:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":262,"name":"uint256","nodeType":"ElementaryTypeName","src":"6927:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"id":274,"initialValue":{"condition":{"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":266,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":264,"name":"b","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":232,"src":"6947:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"id":265,"name":"time","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":228,"src":"6951:4:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"6947:8:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseExpression":{"commonType":{"typeIdentifier":"t_uint40","typeString":"uint40"},"id":272,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":268,"name":"b","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":232,"src":"6962:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"commonType":{"typeIdentifier":"t_rational_4294967296_by_1","typeString":"int_const 4294967296"},"id":271,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"leftExpression":{"hexValue":"32","id":269,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"6966:1:0","typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"nodeType":"BinaryOperation","operator":"**","rightExpression":{"hexValue":"3332","id":270,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"6971:2:0","typeDescriptions":{"typeIdentifier":"t_rational_32_by_1","typeString":"int_const 32"},"value":"32"},"src":"6966:7:0","typeDescriptions":{"typeIdentifier":"t_rational_4294967296_by_1","typeString":"int_const 4294967296"}},"src":"6962:11:0","typeDescriptions":{"typeIdentifier":"t_uint40","typeString":"uint40"}},"id":273,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"Conditional","src":"6947:26:0","trueExpression":{"id":267,"name":"b","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":232,"src":"6958:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"typeDescriptions":{"typeIdentifier":"t_uint40","typeString":"uint40"}},"nodeType":"VariableDeclarationStatement","src":"6927:46:0"},{"expression":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":277,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":275,"name":"aAdjusted","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":250,"src":"6991:9:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<=","rightExpression":{"id":276,"name":"bAdjusted","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":263,"src":"7004:9:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"6991:22:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"functionReturnParameters":236,"id":278,"nodeType":"Return","src":"6984:29:0"}]},"documentation":{"id":226,"nodeType":"StructuredDocumentation","src":"6247:423:0","text":"@notice comparator for 32-bit timestamps\n @dev safe for 0 or 1 overflows, a and b _must_ be chronologically before or equal to time\n @param time A timestamp truncated to 32 bits\n @param a A comparison timestamp from which to determine the relative position of `time`\n @param b From which to determine the relative position of `time`\n @return bool Whether `a` is chronologically <= `b`"},"id":280,"implemented":true,"kind":"function","modifiers":[],"name":"lte","nodeType":"FunctionDefinition","parameters":{"id":233,"nodeType":"ParameterList","parameters":[{"constant":false,"id":228,"mutability":"mutable","name":"time","nodeType":"VariableDeclaration","scope":280,"src":"6688:11:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":227,"name":"uint32","nodeType":"ElementaryTypeName","src":"6688:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"visibility":"internal"},{"constant":false,"id":230,"mutability":"mutable","name":"a","nodeType":"VariableDeclaration","scope":280,"src":"6701:8:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":229,"name":"uint32","nodeType":"ElementaryTypeName","src":"6701:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"visibility":"internal"},{"constant":false,"id":232,"mutability":"mutable","name":"b","nodeType":"VariableDeclaration","scope":280,"src":"6711:8:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":231,"name":"uint32","nodeType":"ElementaryTypeName","src":"6711:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"visibility":"internal"}],"src":"6687:33:0"},"returnParameters":{"id":236,"nodeType":"ParameterList","parameters":[{"constant":false,"id":235,"mutability":"mutable","name":"","nodeType":"VariableDeclaration","scope":280,"src":"6743:4:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":234,"name":"bool","nodeType":"ElementaryTypeName","src":"6743:4:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"visibility":"internal"}],"src":"6742:6:0"},"scope":734,"src":"6675:345:0","stateMutability":"pure","virtual":false,"visibility":"private"},{"body":{"id":397,"nodeType":"Block","src":"8221:818:0","statements":[{"assignments":[301],"declarations":[{"constant":false,"id":301,"mutability":"mutable","name":"l","nodeType":"VariableDeclaration","scope":397,"src":"8231:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":300,"name":"uint256","nodeType":"ElementaryTypeName","src":"8231:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"id":308,"initialValue":{"commonType":{"typeIdentifier":"t_uint16","typeString":"uint16"},"id":307,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"components":[{"commonType":{"typeIdentifier":"t_uint16","typeString":"uint16"},"id":304,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":302,"name":"index","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":291,"src":"8244:5:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"hexValue":"31","id":303,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"8252:1:0","typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"8244:9:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}}],"id":305,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"8243:11:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"nodeType":"BinaryOperation","operator":"%","rightExpression":{"id":306,"name":"cardinality","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":293,"src":"8257:11:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"src":"8243:25:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"nodeType":"VariableDeclarationStatement","src":"8231:37:0"},{"assignments":[310],"declarations":[{"constant":false,"id":310,"mutability":"mutable","name":"r","nodeType":"VariableDeclaration","scope":397,"src":"8300:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":309,"name":"uint256","nodeType":"ElementaryTypeName","src":"8300:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"id":316,"initialValue":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":315,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":313,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":311,"name":"l","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":301,"src":"8312:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"id":312,"name":"cardinality","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":293,"src":"8316:11:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"src":"8312:15:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"hexValue":"31","id":314,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"8330:1:0","typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"8312:19:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"8300:31:0"},{"assignments":[318],"declarations":[{"constant":false,"id":318,"mutability":"mutable","name":"i","nodeType":"VariableDeclaration","scope":397,"src":"8363:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":317,"name":"uint256","nodeType":"ElementaryTypeName","src":"8363:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"id":319,"nodeType":"VariableDeclarationStatement","src":"8363:9:0"},{"body":{"id":395,"nodeType":"Block","src":"8395:638:0","statements":[{"expression":{"id":328,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"id":321,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":318,"src":"8409:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":327,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"components":[{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":324,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":322,"name":"l","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":301,"src":"8414:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"id":323,"name":"r","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":310,"src":"8418:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"8414:5:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":325,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"8413:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"hexValue":"32","id":326,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"8423:1:0","typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"src":"8413:11:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"8409:15:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":329,"nodeType":"ExpressionStatement","src":"8409:15:0"},{"expression":{"id":336,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"id":330,"name":"beforeOrAt","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":296,"src":"8439:10:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation memory"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"baseExpression":{"id":331,"name":"self","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":285,"src":"8452:4:0","typeDescriptions":{"typeIdentifier":"t_array$_t_struct$_Observation_$11_storage_$65535_storage_ptr","typeString":"struct Oracle.Observation storage ref[65535] storage pointer"}},"id":335,"indexExpression":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":334,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":332,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":318,"src":"8457:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"%","rightExpression":{"id":333,"name":"cardinality","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":293,"src":"8461:11:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"src":"8457:15:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"8452:21:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_storage","typeString":"struct Oracle.Observation storage ref"}},"src":"8439:34:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation memory"}},"id":337,"nodeType":"ExpressionStatement","src":"8439:34:0"},{"condition":{"id":340,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"8584:23:0","subExpression":{"expression":{"id":338,"name":"beforeOrAt","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":296,"src":"8585:10:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation memory"}},"id":339,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"initialized","nodeType":"MemberAccess","referencedDeclaration":10,"src":"8585:22:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":349,"nodeType":"IfStatement","src":"8580:97:0","trueBody":{"id":348,"nodeType":"Block","src":"8609:68:0","statements":[{"expression":{"id":345,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"id":341,"name":"l","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":301,"src":"8627:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":344,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":342,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":318,"src":"8631:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"hexValue":"31","id":343,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"8635:1:0","typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"8631:5:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"8627:9:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":346,"nodeType":"ExpressionStatement","src":"8627:9:0"},{"id":347,"nodeType":"Continue","src":"8654:8:0"}]}},{"expression":{"id":359,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"id":350,"name":"atOrAfter","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":298,"src":"8691:9:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation memory"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"baseExpression":{"id":351,"name":"self","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":285,"src":"8703:4:0","typeDescriptions":{"typeIdentifier":"t_array$_t_struct$_Observation_$11_storage_$65535_storage_ptr","typeString":"struct Oracle.Observation storage ref[65535] storage pointer"}},"id":358,"indexExpression":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":357,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"components":[{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":354,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":352,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":318,"src":"8709:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"hexValue":"31","id":353,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"8713:1:0","typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"8709:5:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":355,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"8708:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"%","rightExpression":{"id":356,"name":"cardinality","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":293,"src":"8718:11:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"src":"8708:21:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"8703:27:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_storage","typeString":"struct Oracle.Observation storage ref"}},"src":"8691:39:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation memory"}},"id":360,"nodeType":"ExpressionStatement","src":"8691:39:0"},{"assignments":[362],"declarations":[{"constant":false,"id":362,"mutability":"mutable","name":"targetAtOrAfter","nodeType":"VariableDeclaration","scope":395,"src":"8745:20:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":361,"name":"bool","nodeType":"ElementaryTypeName","src":"8745:4:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"visibility":"internal"}],"id":369,"initialValue":{"arguments":[{"id":364,"name":"time","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":287,"src":"8772:4:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},{"expression":{"id":365,"name":"beforeOrAt","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":296,"src":"8778:10:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation memory"}},"id":366,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"blockTimestamp","nodeType":"MemberAccess","referencedDeclaration":4,"src":"8778:25:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},{"id":367,"name":"target","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":289,"src":"8805:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint32","typeString":"uint32"},{"typeIdentifier":"t_uint32","typeString":"uint32"},{"typeIdentifier":"t_uint32","typeString":"uint32"}],"id":363,"name":"lte","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":280,"src":"8768:3:0","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint32_$_t_uint32_$_t_uint32_$returns$_t_bool_$","typeString":"function (uint32,uint32,uint32) pure returns (bool)"}},"id":368,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8768:44:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"VariableDeclarationStatement","src":"8745:67:0"},{"condition":{"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":377,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":370,"name":"targetAtOrAfter","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":362,"src":"8879:15:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"arguments":[{"id":372,"name":"time","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":287,"src":"8902:4:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},{"id":373,"name":"target","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":289,"src":"8908:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},{"expression":{"id":374,"name":"atOrAfter","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":298,"src":"8916:9:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation memory"}},"id":375,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"blockTimestamp","nodeType":"MemberAccess","referencedDeclaration":4,"src":"8916:24:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint32","typeString":"uint32"},{"typeIdentifier":"t_uint32","typeString":"uint32"},{"typeIdentifier":"t_uint32","typeString":"uint32"}],"id":371,"name":"lte","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":280,"src":"8898:3:0","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint32_$_t_uint32_$_t_uint32_$returns$_t_bool_$","typeString":"function (uint32,uint32,uint32) pure returns (bool)"}},"id":376,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"8898:43:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"8879:62:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":379,"nodeType":"IfStatement","src":"8875:73:0","trueBody":{"id":378,"nodeType":"Break","src":"8943:5:0"}},{"condition":{"id":381,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"8967:16:0","subExpression":{"id":380,"name":"targetAtOrAfter","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":362,"src":"8968:15:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"expression":{"id":392,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"id":388,"name":"l","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":301,"src":"9013:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":391,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":389,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":318,"src":"9017:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"hexValue":"31","id":390,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"9021:1:0","typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"9017:5:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"9013:9:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":393,"nodeType":"ExpressionStatement","src":"9013:9:0"},"id":394,"nodeType":"IfStatement","src":"8963:59:0","trueBody":{"expression":{"id":386,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"id":382,"name":"r","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":310,"src":"8985:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":385,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":383,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":318,"src":"8989:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"hexValue":"31","id":384,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"8993:1:0","typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"8989:5:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"8985:9:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":387,"nodeType":"ExpressionStatement","src":"8985:9:0"}}]},"condition":{"hexValue":"74727565","id":320,"isConstant":false,"isLValue":false,"isPure":true,"kind":"bool","lValueRequested":false,"nodeType":"Literal","src":"8389:4:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"value":"true"},"id":396,"nodeType":"WhileStatement","src":"8382:651:0"}]},"documentation":{"id":281,"nodeType":"StructuredDocumentation","src":"7026:944:0","text":"@notice Fetches the observations beforeOrAt and atOrAfter a target, i.e. where [beforeOrAt, atOrAfter] is satisfied.\n The result may be the same observation, or adjacent observations.\n @dev The answer must be contained in the array, used when the target is located within the stored observation\n boundaries: older than the most recent observation and younger, or the same age as, the oldest observation\n @param self The stored oracle array\n @param time The current block.timestamp\n @param target The timestamp at which the reserved observation should be for\n @param index The index of the observation that was most recently written to the observations array\n @param cardinality The number of populated elements in the oracle array\n @return beforeOrAt The observation recorded before, or at, the target\n @return atOrAfter The observation recorded at, or after, the target"},"id":398,"implemented":true,"kind":"function","modifiers":[],"name":"binarySearch","nodeType":"FunctionDefinition","parameters":{"id":294,"nodeType":"ParameterList","parameters":[{"constant":false,"id":285,"mutability":"mutable","name":"self","nodeType":"VariableDeclaration","scope":398,"src":"8006:31:0","stateVariable":false,"storageLocation":"storage","typeDescriptions":{"typeIdentifier":"t_array$_t_struct$_Observation_$11_storage_$65535_storage_ptr","typeString":"struct Oracle.Observation[65535]"},"typeName":{"baseType":{"id":282,"name":"Observation","nodeType":"UserDefinedTypeName","referencedDeclaration":11,"src":"8006:11:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_storage_ptr","typeString":"struct Oracle.Observation"}},"id":284,"length":{"hexValue":"3635353335","id":283,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"8018:5:0","typeDescriptions":{"typeIdentifier":"t_rational_65535_by_1","typeString":"int_const 65535"},"value":"65535"},"nodeType":"ArrayTypeName","src":"8006:18:0","typeDescriptions":{"typeIdentifier":"t_array$_t_struct$_Observation_$11_storage_$65535_storage_ptr","typeString":"struct Oracle.Observation[65535]"}},"visibility":"internal"},{"constant":false,"id":287,"mutability":"mutable","name":"time","nodeType":"VariableDeclaration","scope":398,"src":"8047:11:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":286,"name":"uint32","nodeType":"ElementaryTypeName","src":"8047:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"visibility":"internal"},{"constant":false,"id":289,"mutability":"mutable","name":"target","nodeType":"VariableDeclaration","scope":398,"src":"8068:13:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":288,"name":"uint32","nodeType":"ElementaryTypeName","src":"8068:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"visibility":"internal"},{"constant":false,"id":291,"mutability":"mutable","name":"index","nodeType":"VariableDeclaration","scope":398,"src":"8091:12:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"},"typeName":{"id":290,"name":"uint16","nodeType":"ElementaryTypeName","src":"8091:6:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"visibility":"internal"},{"constant":false,"id":293,"mutability":"mutable","name":"cardinality","nodeType":"VariableDeclaration","scope":398,"src":"8113:18:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"},"typeName":{"id":292,"name":"uint16","nodeType":"ElementaryTypeName","src":"8113:6:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"visibility":"internal"}],"src":"7996:141:0"},"returnParameters":{"id":299,"nodeType":"ParameterList","parameters":[{"constant":false,"id":296,"mutability":"mutable","name":"beforeOrAt","nodeType":"VariableDeclaration","scope":398,"src":"8160:29:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation"},"typeName":{"id":295,"name":"Observation","nodeType":"UserDefinedTypeName","referencedDeclaration":11,"src":"8160:11:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_storage_ptr","typeString":"struct Oracle.Observation"}},"visibility":"internal"},{"constant":false,"id":298,"mutability":"mutable","name":"atOrAfter","nodeType":"VariableDeclaration","scope":398,"src":"8191:28:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation"},"typeName":{"id":297,"name":"Observation","nodeType":"UserDefinedTypeName","referencedDeclaration":11,"src":"8191:11:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_storage_ptr","typeString":"struct Oracle.Observation"}},"visibility":"internal"}],"src":"8159:61:0"},"scope":734,"src":"7975:1064:0","stateMutability":"view","virtual":false,"visibility":"private"},{"body":{"id":495,"nodeType":"Block","src":"10370:1118:0","statements":[{"expression":{"id":426,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"id":422,"name":"beforeOrAt","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":418,"src":"10443:10:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation memory"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"baseExpression":{"id":423,"name":"self","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":403,"src":"10456:4:0","typeDescriptions":{"typeIdentifier":"t_array$_t_struct$_Observation_$11_storage_$65535_storage_ptr","typeString":"struct Oracle.Observation storage ref[65535] storage pointer"}},"id":425,"indexExpression":{"id":424,"name":"index","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":411,"src":"10461:5:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"10456:11:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_storage","typeString":"struct Oracle.Observation storage ref"}},"src":"10443:24:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation memory"}},"id":427,"nodeType":"ExpressionStatement","src":"10443:24:0"},{"condition":{"arguments":[{"id":429,"name":"time","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":405,"src":"10586:4:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},{"expression":{"id":430,"name":"beforeOrAt","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":418,"src":"10592:10:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation memory"}},"id":431,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"blockTimestamp","nodeType":"MemberAccess","referencedDeclaration":4,"src":"10592:25:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},{"id":432,"name":"target","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":407,"src":"10619:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint32","typeString":"uint32"},{"typeIdentifier":"t_uint32","typeString":"uint32"},{"typeIdentifier":"t_uint32","typeString":"uint32"}],"id":428,"name":"lte","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":280,"src":"10582:3:0","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint32_$_t_uint32_$_t_uint32_$returns$_t_bool_$","typeString":"function (uint32,uint32,uint32) pure returns (bool)"}},"id":433,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"10582:44:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":455,"nodeType":"IfStatement","src":"10578:443:0","trueBody":{"id":454,"nodeType":"Block","src":"10628:393:0","statements":[{"condition":{"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":437,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"expression":{"id":434,"name":"beforeOrAt","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":418,"src":"10646:10:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation memory"}},"id":435,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"blockTimestamp","nodeType":"MemberAccess","referencedDeclaration":4,"src":"10646:25:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"id":436,"name":"target","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":407,"src":"10675:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"10646:35:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"id":452,"nodeType":"Block","src":"10860:151:0","statements":[{"expression":{"components":[{"id":443,"name":"beforeOrAt","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":418,"src":"10937:10:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation memory"}},{"arguments":[{"id":445,"name":"beforeOrAt","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":418,"src":"10959:10:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation memory"}},{"id":446,"name":"target","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":407,"src":"10971:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},{"id":447,"name":"tick","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":409,"src":"10979:4:0","typeDescriptions":{"typeIdentifier":"t_int24","typeString":"int24"}},{"id":448,"name":"liquidity","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":413,"src":"10985:9:0","typeDescriptions":{"typeIdentifier":"t_uint128","typeString":"uint128"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation memory"},{"typeIdentifier":"t_uint32","typeString":"uint32"},{"typeIdentifier":"t_int24","typeString":"int24"},{"typeIdentifier":"t_uint128","typeString":"uint128"}],"id":444,"name":"transform","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":66,"src":"10949:9:0","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_struct$_Observation_$11_memory_ptr_$_t_uint32_$_t_int24_$_t_uint128_$returns$_t_struct$_Observation_$11_memory_ptr_$","typeString":"function (struct Oracle.Observation memory,uint32,int24,uint128) pure returns (struct Oracle.Observation memory)"}},"id":449,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"10949:46:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation memory"}}],"id":450,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"10936:60:0","typeDescriptions":{"typeIdentifier":"t_tuple$_t_struct$_Observation_$11_memory_ptr_$_t_struct$_Observation_$11_memory_ptr_$","typeString":"tuple(struct Oracle.Observation memory,struct Oracle.Observation memory)"}},"functionReturnParameters":421,"id":451,"nodeType":"Return","src":"10929:67:0"}]},"id":453,"nodeType":"IfStatement","src":"10642:369:0","trueBody":{"id":442,"nodeType":"Block","src":"10683:171:0","statements":[{"expression":{"components":[{"id":438,"name":"beforeOrAt","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":418,"src":"10817:10:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation memory"}},{"id":439,"name":"atOrAfter","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":420,"src":"10829:9:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation memory"}}],"id":440,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"10816:23:0","typeDescriptions":{"typeIdentifier":"t_tuple$_t_struct$_Observation_$11_memory_ptr_$_t_struct$_Observation_$11_memory_ptr_$","typeString":"tuple(struct Oracle.Observation memory,struct Oracle.Observation memory)"}},"functionReturnParameters":421,"id":441,"nodeType":"Return","src":"10809:30:0"}]}}]}},{"expression":{"id":465,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"id":456,"name":"beforeOrAt","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":418,"src":"11084:10:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation memory"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"baseExpression":{"id":457,"name":"self","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":403,"src":"11097:4:0","typeDescriptions":{"typeIdentifier":"t_array$_t_struct$_Observation_$11_storage_$65535_storage_ptr","typeString":"struct Oracle.Observation storage ref[65535] storage pointer"}},"id":464,"indexExpression":{"commonType":{"typeIdentifier":"t_uint16","typeString":"uint16"},"id":463,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"components":[{"commonType":{"typeIdentifier":"t_uint16","typeString":"uint16"},"id":460,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":458,"name":"index","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":411,"src":"11103:5:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"hexValue":"31","id":459,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"11111:1:0","typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"11103:9:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}}],"id":461,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"11102:11:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"nodeType":"BinaryOperation","operator":"%","rightExpression":{"id":462,"name":"cardinality","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":415,"src":"11116:11:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"src":"11102:25:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"11097:31:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_storage","typeString":"struct Oracle.Observation storage ref"}},"src":"11084:44:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation memory"}},"id":466,"nodeType":"ExpressionStatement","src":"11084:44:0"},{"condition":{"id":469,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"!","prefix":true,"src":"11142:23:0","subExpression":{"expression":{"id":467,"name":"beforeOrAt","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":418,"src":"11143:10:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation memory"}},"id":468,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"initialized","nodeType":"MemberAccess","referencedDeclaration":10,"src":"11143:22:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":476,"nodeType":"IfStatement","src":"11138:49:0","trueBody":{"expression":{"id":474,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"id":470,"name":"beforeOrAt","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":418,"src":"11167:10:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation memory"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"baseExpression":{"id":471,"name":"self","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":403,"src":"11180:4:0","typeDescriptions":{"typeIdentifier":"t_array$_t_struct$_Observation_$11_storage_$65535_storage_ptr","typeString":"struct Oracle.Observation storage ref[65535] storage pointer"}},"id":473,"indexExpression":{"hexValue":"30","id":472,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"11185:1:0","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"11180:7:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_storage","typeString":"struct Oracle.Observation storage ref"}},"src":"11167:20:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation memory"}},"id":475,"nodeType":"ExpressionStatement","src":"11167:20:0"}},{"expression":{"arguments":[{"arguments":[{"id":479,"name":"time","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":405,"src":"11298:4:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},{"expression":{"id":480,"name":"beforeOrAt","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":418,"src":"11304:10:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation memory"}},"id":481,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"blockTimestamp","nodeType":"MemberAccess","referencedDeclaration":4,"src":"11304:25:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},{"id":482,"name":"target","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":407,"src":"11331:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint32","typeString":"uint32"},{"typeIdentifier":"t_uint32","typeString":"uint32"},{"typeIdentifier":"t_uint32","typeString":"uint32"}],"id":478,"name":"lte","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":280,"src":"11294:3:0","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint32_$_t_uint32_$_t_uint32_$returns$_t_bool_$","typeString":"function (uint32,uint32,uint32) pure returns (bool)"}},"id":483,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"11294:44:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},{"hexValue":"4f4c44","id":484,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"11340:5:0","typeDescriptions":{"typeIdentifier":"t_stringliteral_d30c0d219016dd7e5cf2b2c30c4d7c091820fc329f335b57cab26b9ff3384a9e","typeString":"literal_string \"OLD\""},"value":"OLD"}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"},{"typeIdentifier":"t_stringliteral_d30c0d219016dd7e5cf2b2c30c4d7c091820fc329f335b57cab26b9ff3384a9e","typeString":"literal_string \"OLD\""}],"id":477,"name":"require","nodeType":"Identifier","overloadedDeclarations":[-18,-18],"referencedDeclaration":-18,"src":"11286:7:0","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$","typeString":"function (bool,string memory) pure"}},"id":485,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"11286:60:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":486,"nodeType":"ExpressionStatement","src":"11286:60:0"},{"expression":{"arguments":[{"id":488,"name":"self","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":403,"src":"11442:4:0","typeDescriptions":{"typeIdentifier":"t_array$_t_struct$_Observation_$11_storage_$65535_storage_ptr","typeString":"struct Oracle.Observation storage ref[65535] storage pointer"}},{"id":489,"name":"time","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":405,"src":"11448:4:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},{"id":490,"name":"target","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":407,"src":"11454:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},{"id":491,"name":"index","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":411,"src":"11462:5:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},{"id":492,"name":"cardinality","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":415,"src":"11469:11:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_array$_t_struct$_Observation_$11_storage_$65535_storage_ptr","typeString":"struct Oracle.Observation storage ref[65535] storage pointer"},{"typeIdentifier":"t_uint32","typeString":"uint32"},{"typeIdentifier":"t_uint32","typeString":"uint32"},{"typeIdentifier":"t_uint16","typeString":"uint16"},{"typeIdentifier":"t_uint16","typeString":"uint16"}],"id":487,"name":"binarySearch","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":398,"src":"11429:12:0","typeDescriptions":{"typeIdentifier":"t_function_internal_view$_t_array$_t_struct$_Observation_$11_storage_$65535_storage_ptr_$_t_uint32_$_t_uint32_$_t_uint16_$_t_uint16_$returns$_t_struct$_Observation_$11_memory_ptr_$_t_struct$_Observation_$11_memory_ptr_$","typeString":"function (struct Oracle.Observation storage ref[65535] storage pointer,uint32,uint32,uint16,uint16) view returns (struct Oracle.Observation memory,struct Oracle.Observation memory)"}},"id":493,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"11429:52:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$_t_struct$_Observation_$11_memory_ptr_$_t_struct$_Observation_$11_memory_ptr_$","typeString":"tuple(struct Oracle.Observation memory,struct Oracle.Observation memory)"}},"functionReturnParameters":421,"id":494,"nodeType":"Return","src":"11422:59:0"}]},"documentation":{"id":399,"nodeType":"StructuredDocumentation","src":"9045:1013:0","text":"@notice Fetches the observations beforeOrAt and atOrAfter a given target, i.e. where [beforeOrAt, atOrAfter] is satisfied\n @dev Assumes there is at least 1 initialized observation.\n Used by observeSingle() to compute the counterfactual accumulator values as of a given block timestamp.\n @param self The stored oracle array\n @param time The current block.timestamp\n @param target The timestamp at which the reserved observation should be for\n @param tick The active tick at the time of the returned or simulated observation\n @param index The index of the observation that was most recently written to the observations array\n @param liquidity The total pool liquidity at the time of the call\n @param cardinality The number of populated elements in the oracle array\n @return beforeOrAt The observation which occurred at, or before, the given timestamp\n @return atOrAfter The observation which occurred at, or after, the given timestamp"},"id":496,"implemented":true,"kind":"function","modifiers":[],"name":"getSurroundingObservations","nodeType":"FunctionDefinition","parameters":{"id":416,"nodeType":"ParameterList","parameters":[{"constant":false,"id":403,"mutability":"mutable","name":"self","nodeType":"VariableDeclaration","scope":496,"src":"10108:31:0","stateVariable":false,"storageLocation":"storage","typeDescriptions":{"typeIdentifier":"t_array$_t_struct$_Observation_$11_storage_$65535_storage_ptr","typeString":"struct Oracle.Observation[65535]"},"typeName":{"baseType":{"id":400,"name":"Observation","nodeType":"UserDefinedTypeName","referencedDeclaration":11,"src":"10108:11:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_storage_ptr","typeString":"struct Oracle.Observation"}},"id":402,"length":{"hexValue":"3635353335","id":401,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"10120:5:0","typeDescriptions":{"typeIdentifier":"t_rational_65535_by_1","typeString":"int_const 65535"},"value":"65535"},"nodeType":"ArrayTypeName","src":"10108:18:0","typeDescriptions":{"typeIdentifier":"t_array$_t_struct$_Observation_$11_storage_$65535_storage_ptr","typeString":"struct Oracle.Observation[65535]"}},"visibility":"internal"},{"constant":false,"id":405,"mutability":"mutable","name":"time","nodeType":"VariableDeclaration","scope":496,"src":"10149:11:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":404,"name":"uint32","nodeType":"ElementaryTypeName","src":"10149:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"visibility":"internal"},{"constant":false,"id":407,"mutability":"mutable","name":"target","nodeType":"VariableDeclaration","scope":496,"src":"10170:13:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":406,"name":"uint32","nodeType":"ElementaryTypeName","src":"10170:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"visibility":"internal"},{"constant":false,"id":409,"mutability":"mutable","name":"tick","nodeType":"VariableDeclaration","scope":496,"src":"10193:10:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int24","typeString":"int24"},"typeName":{"id":408,"name":"int24","nodeType":"ElementaryTypeName","src":"10193:5:0","typeDescriptions":{"typeIdentifier":"t_int24","typeString":"int24"}},"visibility":"internal"},{"constant":false,"id":411,"mutability":"mutable","name":"index","nodeType":"VariableDeclaration","scope":496,"src":"10213:12:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"},"typeName":{"id":410,"name":"uint16","nodeType":"ElementaryTypeName","src":"10213:6:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"visibility":"internal"},{"constant":false,"id":413,"mutability":"mutable","name":"liquidity","nodeType":"VariableDeclaration","scope":496,"src":"10235:17:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint128","typeString":"uint128"},"typeName":{"id":412,"name":"uint128","nodeType":"ElementaryTypeName","src":"10235:7:0","typeDescriptions":{"typeIdentifier":"t_uint128","typeString":"uint128"}},"visibility":"internal"},{"constant":false,"id":415,"mutability":"mutable","name":"cardinality","nodeType":"VariableDeclaration","scope":496,"src":"10262:18:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"},"typeName":{"id":414,"name":"uint16","nodeType":"ElementaryTypeName","src":"10262:6:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"visibility":"internal"}],"src":"10098:188:0"},"returnParameters":{"id":421,"nodeType":"ParameterList","parameters":[{"constant":false,"id":418,"mutability":"mutable","name":"beforeOrAt","nodeType":"VariableDeclaration","scope":496,"src":"10309:29:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation"},"typeName":{"id":417,"name":"Observation","nodeType":"UserDefinedTypeName","referencedDeclaration":11,"src":"10309:11:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_storage_ptr","typeString":"struct Oracle.Observation"}},"visibility":"internal"},{"constant":false,"id":420,"mutability":"mutable","name":"atOrAfter","nodeType":"VariableDeclaration","scope":496,"src":"10340:28:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation"},"typeName":{"id":419,"name":"Observation","nodeType":"UserDefinedTypeName","referencedDeclaration":11,"src":"10340:11:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_storage_ptr","typeString":"struct Oracle.Observation"}},"visibility":"internal"}],"src":"10308:61:0"},"scope":734,"src":"10063:1425:0","stateMutability":"view","virtual":false,"visibility":"private"},{"body":{"id":646,"nodeType":"Block","src":"12902:1722:0","statements":[{"condition":{"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":522,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":520,"name":"secondsAgo","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":505,"src":"12916:10:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"hexValue":"30","id":521,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"12930:1:0","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"12916:15:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":550,"nodeType":"IfStatement","src":"12912:257:0","trueBody":{"id":549,"nodeType":"Block","src":"12933:236:0","statements":[{"assignments":[524],"declarations":[{"constant":false,"id":524,"mutability":"mutable","name":"last","nodeType":"VariableDeclaration","scope":549,"src":"12947:23:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation"},"typeName":{"id":523,"name":"Observation","nodeType":"UserDefinedTypeName","referencedDeclaration":11,"src":"12947:11:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_storage_ptr","typeString":"struct Oracle.Observation"}},"visibility":"internal"}],"id":528,"initialValue":{"baseExpression":{"id":525,"name":"self","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":501,"src":"12973:4:0","typeDescriptions":{"typeIdentifier":"t_array$_t_struct$_Observation_$11_storage_$65535_storage_ptr","typeString":"struct Oracle.Observation storage ref[65535] storage pointer"}},"id":527,"indexExpression":{"id":526,"name":"index","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":509,"src":"12978:5:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"12973:11:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_storage","typeString":"struct Oracle.Observation storage ref"}},"nodeType":"VariableDeclarationStatement","src":"12947:37:0"},{"condition":{"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":532,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"expression":{"id":529,"name":"last","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":524,"src":"13002:4:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation memory"}},"id":530,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"blockTimestamp","nodeType":"MemberAccess","referencedDeclaration":4,"src":"13002:19:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"id":531,"name":"time","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":503,"src":"13025:4:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"13002:27:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":542,"nodeType":"IfStatement","src":"12998:78:0","trueBody":{"expression":{"id":540,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"id":533,"name":"last","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":524,"src":"13031:4:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation memory"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"arguments":[{"id":535,"name":"last","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":524,"src":"13048:4:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation memory"}},{"id":536,"name":"time","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":503,"src":"13054:4:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},{"id":537,"name":"tick","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":507,"src":"13060:4:0","typeDescriptions":{"typeIdentifier":"t_int24","typeString":"int24"}},{"id":538,"name":"liquidity","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":511,"src":"13066:9:0","typeDescriptions":{"typeIdentifier":"t_uint128","typeString":"uint128"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation memory"},{"typeIdentifier":"t_uint32","typeString":"uint32"},{"typeIdentifier":"t_int24","typeString":"int24"},{"typeIdentifier":"t_uint128","typeString":"uint128"}],"id":534,"name":"transform","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":66,"src":"13038:9:0","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_struct$_Observation_$11_memory_ptr_$_t_uint32_$_t_int24_$_t_uint128_$returns$_t_struct$_Observation_$11_memory_ptr_$","typeString":"function (struct Oracle.Observation memory,uint32,int24,uint128) pure returns (struct Oracle.Observation memory)"}},"id":539,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"13038:38:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation memory"}},"src":"13031:45:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation memory"}},"id":541,"nodeType":"ExpressionStatement","src":"13031:45:0"}},{"expression":{"components":[{"expression":{"id":543,"name":"last","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":524,"src":"13098:4:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation memory"}},"id":544,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"tickCumulative","nodeType":"MemberAccess","referencedDeclaration":6,"src":"13098:19:0","typeDescriptions":{"typeIdentifier":"t_int56","typeString":"int56"}},{"expression":{"id":545,"name":"last","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":524,"src":"13119:4:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation memory"}},"id":546,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"secondsPerLiquidityCumulativeX128","nodeType":"MemberAccess","referencedDeclaration":8,"src":"13119:38:0","typeDescriptions":{"typeIdentifier":"t_uint160","typeString":"uint160"}}],"id":547,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"13097:61:0","typeDescriptions":{"typeIdentifier":"t_tuple$_t_int56_$_t_uint160_$","typeString":"tuple(int56,uint160)"}},"functionReturnParameters":519,"id":548,"nodeType":"Return","src":"13090:68:0"}]}},{"assignments":[552],"declarations":[{"constant":false,"id":552,"mutability":"mutable","name":"target","nodeType":"VariableDeclaration","scope":646,"src":"13179:13:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":551,"name":"uint32","nodeType":"ElementaryTypeName","src":"13179:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"visibility":"internal"}],"id":556,"initialValue":{"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":555,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":553,"name":"time","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":503,"src":"13195:4:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"id":554,"name":"secondsAgo","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":505,"src":"13202:10:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"13195:17:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"VariableDeclarationStatement","src":"13179:33:0"},{"assignments":[558,560],"declarations":[{"constant":false,"id":558,"mutability":"mutable","name":"beforeOrAt","nodeType":"VariableDeclaration","scope":646,"src":"13224:29:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation"},"typeName":{"id":557,"name":"Observation","nodeType":"UserDefinedTypeName","referencedDeclaration":11,"src":"13224:11:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_storage_ptr","typeString":"struct Oracle.Observation"}},"visibility":"internal"},{"constant":false,"id":560,"mutability":"mutable","name":"atOrAfter","nodeType":"VariableDeclaration","scope":646,"src":"13255:28:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation"},"typeName":{"id":559,"name":"Observation","nodeType":"UserDefinedTypeName","referencedDeclaration":11,"src":"13255:11:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_storage_ptr","typeString":"struct Oracle.Observation"}},"visibility":"internal"}],"id":570,"initialValue":{"arguments":[{"id":562,"name":"self","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":501,"src":"13327:4:0","typeDescriptions":{"typeIdentifier":"t_array$_t_struct$_Observation_$11_storage_$65535_storage_ptr","typeString":"struct Oracle.Observation storage ref[65535] storage pointer"}},{"id":563,"name":"time","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":503,"src":"13345:4:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},{"id":564,"name":"target","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":552,"src":"13363:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},{"id":565,"name":"tick","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":507,"src":"13383:4:0","typeDescriptions":{"typeIdentifier":"t_int24","typeString":"int24"}},{"id":566,"name":"index","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":509,"src":"13401:5:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},{"id":567,"name":"liquidity","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":511,"src":"13420:9:0","typeDescriptions":{"typeIdentifier":"t_uint128","typeString":"uint128"}},{"id":568,"name":"cardinality","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":513,"src":"13443:11:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_array$_t_struct$_Observation_$11_storage_$65535_storage_ptr","typeString":"struct Oracle.Observation storage ref[65535] storage pointer"},{"typeIdentifier":"t_uint32","typeString":"uint32"},{"typeIdentifier":"t_uint32","typeString":"uint32"},{"typeIdentifier":"t_int24","typeString":"int24"},{"typeIdentifier":"t_uint16","typeString":"uint16"},{"typeIdentifier":"t_uint128","typeString":"uint128"},{"typeIdentifier":"t_uint16","typeString":"uint16"}],"id":561,"name":"getSurroundingObservations","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":496,"src":"13287:26:0","typeDescriptions":{"typeIdentifier":"t_function_internal_view$_t_array$_t_struct$_Observation_$11_storage_$65535_storage_ptr_$_t_uint32_$_t_uint32_$_t_int24_$_t_uint16_$_t_uint128_$_t_uint16_$returns$_t_struct$_Observation_$11_memory_ptr_$_t_struct$_Observation_$11_memory_ptr_$","typeString":"function (struct Oracle.Observation storage ref[65535] storage pointer,uint32,uint32,int24,uint16,uint128,uint16) view returns (struct Oracle.Observation memory,struct Oracle.Observation memory)"}},"id":569,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"13287:177:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$_t_struct$_Observation_$11_memory_ptr_$_t_struct$_Observation_$11_memory_ptr_$","typeString":"tuple(struct Oracle.Observation memory,struct Oracle.Observation memory)"}},"nodeType":"VariableDeclarationStatement","src":"13223:241:0"},{"condition":{"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":574,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":571,"name":"target","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":552,"src":"13479:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"expression":{"id":572,"name":"beforeOrAt","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":558,"src":"13489:10:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation memory"}},"id":573,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"blockTimestamp","nodeType":"MemberAccess","referencedDeclaration":4,"src":"13489:25:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"13479:35:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"condition":{"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":585,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":582,"name":"target","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":552,"src":"13673:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"expression":{"id":583,"name":"atOrAfter","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":560,"src":"13683:9:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation memory"}},"id":584,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"blockTimestamp","nodeType":"MemberAccess","referencedDeclaration":4,"src":"13683:24:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"13673:34:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"id":643,"nodeType":"Block","src":"13861:757:0","statements":[{"assignments":[594],"declarations":[{"constant":false,"id":594,"mutability":"mutable","name":"observationTimeDelta","nodeType":"VariableDeclaration","scope":643,"src":"13910:27:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":593,"name":"uint32","nodeType":"ElementaryTypeName","src":"13910:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"visibility":"internal"}],"id":600,"initialValue":{"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":599,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"expression":{"id":595,"name":"atOrAfter","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":560,"src":"13940:9:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation memory"}},"id":596,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"blockTimestamp","nodeType":"MemberAccess","referencedDeclaration":4,"src":"13940:24:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"expression":{"id":597,"name":"beforeOrAt","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":558,"src":"13967:10:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation memory"}},"id":598,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"blockTimestamp","nodeType":"MemberAccess","referencedDeclaration":4,"src":"13967:25:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"13940:52:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"VariableDeclarationStatement","src":"13910:82:0"},{"assignments":[602],"declarations":[{"constant":false,"id":602,"mutability":"mutable","name":"targetDelta","nodeType":"VariableDeclaration","scope":643,"src":"14006:18:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":601,"name":"uint32","nodeType":"ElementaryTypeName","src":"14006:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"visibility":"internal"}],"id":607,"initialValue":{"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":606,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":603,"name":"target","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":552,"src":"14027:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"expression":{"id":604,"name":"beforeOrAt","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":558,"src":"14036:10:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation memory"}},"id":605,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"blockTimestamp","nodeType":"MemberAccess","referencedDeclaration":4,"src":"14036:25:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"14027:34:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"VariableDeclarationStatement","src":"14006:55:0"},{"expression":{"components":[{"commonType":{"typeIdentifier":"t_int56","typeString":"int56"},"id":621,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"expression":{"id":608,"name":"beforeOrAt","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":558,"src":"14100:10:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation memory"}},"id":609,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"tickCumulative","nodeType":"MemberAccess","referencedDeclaration":6,"src":"14100:25:0","typeDescriptions":{"typeIdentifier":"t_int56","typeString":"int56"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"commonType":{"typeIdentifier":"t_int56","typeString":"int56"},"id":620,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"components":[{"commonType":{"typeIdentifier":"t_int56","typeString":"int56"},"id":617,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"components":[{"commonType":{"typeIdentifier":"t_int56","typeString":"int56"},"id":614,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"expression":{"id":610,"name":"atOrAfter","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":560,"src":"14150:9:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation memory"}},"id":611,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"tickCumulative","nodeType":"MemberAccess","referencedDeclaration":6,"src":"14150:24:0","typeDescriptions":{"typeIdentifier":"t_int56","typeString":"int56"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"expression":{"id":612,"name":"beforeOrAt","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":558,"src":"14177:10:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation memory"}},"id":613,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"tickCumulative","nodeType":"MemberAccess","referencedDeclaration":6,"src":"14177:25:0","typeDescriptions":{"typeIdentifier":"t_int56","typeString":"int56"}},"src":"14150:52:0","typeDescriptions":{"typeIdentifier":"t_int56","typeString":"int56"}}],"id":615,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"14149:54:0","typeDescriptions":{"typeIdentifier":"t_int56","typeString":"int56"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"id":616,"name":"observationTimeDelta","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":594,"src":"14206:20:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"14149:77:0","typeDescriptions":{"typeIdentifier":"t_int56","typeString":"int56"}}],"id":618,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"14148:79:0","typeDescriptions":{"typeIdentifier":"t_int56","typeString":"int56"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"id":619,"name":"targetDelta","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":602,"src":"14250:11:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"14148:113:0","typeDescriptions":{"typeIdentifier":"t_int56","typeString":"int56"}},"src":"14100:161:0","typeDescriptions":{"typeIdentifier":"t_int56","typeString":"int56"}},{"commonType":{"typeIdentifier":"t_uint160","typeString":"uint160"},"id":640,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"expression":{"id":622,"name":"beforeOrAt","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":558,"src":"14279:10:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation memory"}},"id":623,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"secondsPerLiquidityCumulativeX128","nodeType":"MemberAccess","referencedDeclaration":8,"src":"14279:44:0","typeDescriptions":{"typeIdentifier":"t_uint160","typeString":"uint160"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"arguments":[{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":638,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"components":[{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":635,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"arguments":[{"commonType":{"typeIdentifier":"t_uint160","typeString":"uint160"},"id":632,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"expression":{"id":628,"name":"atOrAfter","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":560,"src":"14417:9:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation memory"}},"id":629,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"secondsPerLiquidityCumulativeX128","nodeType":"MemberAccess","referencedDeclaration":8,"src":"14417:43:0","typeDescriptions":{"typeIdentifier":"t_uint160","typeString":"uint160"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"expression":{"id":630,"name":"beforeOrAt","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":558,"src":"14463:10:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation memory"}},"id":631,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"secondsPerLiquidityCumulativeX128","nodeType":"MemberAccess","referencedDeclaration":8,"src":"14463:44:0","typeDescriptions":{"typeIdentifier":"t_uint160","typeString":"uint160"}},"src":"14417:90:0","typeDescriptions":{"typeIdentifier":"t_uint160","typeString":"uint160"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint160","typeString":"uint160"}],"id":627,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"14380:7:0","typeDescriptions":{"typeIdentifier":"t_type$_t_uint256_$","typeString":"type(uint256)"},"typeName":{"id":626,"name":"uint256","nodeType":"ElementaryTypeName","src":"14380:7:0","typeDescriptions":{}}},"id":633,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"14380:153:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"id":634,"name":"targetDelta","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":602,"src":"14536:11:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"14380:167:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"id":636,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"14379:169:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"id":637,"name":"observationTimeDelta","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":594,"src":"14551:20:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"14379:192:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":625,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"14346:7:0","typeDescriptions":{"typeIdentifier":"t_type$_t_uint160_$","typeString":"type(uint160)"},"typeName":{"id":624,"name":"uint160","nodeType":"ElementaryTypeName","src":"14346:7:0","typeDescriptions":{}}},"id":639,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"14346:247:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_uint160","typeString":"uint160"}},"src":"14279:314:0","typeDescriptions":{"typeIdentifier":"t_uint160","typeString":"uint160"}}],"id":641,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"14082:525:0","typeDescriptions":{"typeIdentifier":"t_tuple$_t_int56_$_t_uint160_$","typeString":"tuple(int56,uint160)"}},"functionReturnParameters":519,"id":642,"nodeType":"Return","src":"14075:532:0"}]},"id":644,"nodeType":"IfStatement","src":"13669:949:0","trueBody":{"id":592,"nodeType":"Block","src":"13709:146:0","statements":[{"expression":{"components":[{"expression":{"id":586,"name":"atOrAfter","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":560,"src":"13774:9:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation memory"}},"id":587,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"tickCumulative","nodeType":"MemberAccess","referencedDeclaration":6,"src":"13774:24:0","typeDescriptions":{"typeIdentifier":"t_int56","typeString":"int56"}},{"expression":{"id":588,"name":"atOrAfter","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":560,"src":"13800:9:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation memory"}},"id":589,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"secondsPerLiquidityCumulativeX128","nodeType":"MemberAccess","referencedDeclaration":8,"src":"13800:43:0","typeDescriptions":{"typeIdentifier":"t_uint160","typeString":"uint160"}}],"id":590,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"13773:71:0","typeDescriptions":{"typeIdentifier":"t_tuple$_t_int56_$_t_uint160_$","typeString":"tuple(int56,uint160)"}},"functionReturnParameters":519,"id":591,"nodeType":"Return","src":"13766:78:0"}]}},"id":645,"nodeType":"IfStatement","src":"13475:1143:0","trueBody":{"id":581,"nodeType":"Block","src":"13516:147:0","statements":[{"expression":{"components":[{"expression":{"id":575,"name":"beforeOrAt","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":558,"src":"13580:10:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation memory"}},"id":576,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"tickCumulative","nodeType":"MemberAccess","referencedDeclaration":6,"src":"13580:25:0","typeDescriptions":{"typeIdentifier":"t_int56","typeString":"int56"}},{"expression":{"id":577,"name":"beforeOrAt","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":558,"src":"13607:10:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation memory"}},"id":578,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"secondsPerLiquidityCumulativeX128","nodeType":"MemberAccess","referencedDeclaration":8,"src":"13607:44:0","typeDescriptions":{"typeIdentifier":"t_uint160","typeString":"uint160"}}],"id":579,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"13579:73:0","typeDescriptions":{"typeIdentifier":"t_tuple$_t_int56_$_t_uint160_$","typeString":"tuple(int56,uint160)"}},"functionReturnParameters":519,"id":580,"nodeType":"Return","src":"13572:80:0"}]}}]},"documentation":{"id":497,"nodeType":"StructuredDocumentation","src":"11494:1100:0","text":"@dev Reverts if an observation at or before the desired observation timestamp does not exist.\n 0 may be passed as `secondsAgo' to return the current cumulative values.\n If called with a timestamp falling between two observations, returns the counterfactual accumulator values\n at exactly the timestamp between the two observations.\n @param self The stored oracle array\n @param time The current block timestamp\n @param secondsAgo The amount of time to look back, in seconds, at which point to return an observation\n @param tick The current tick\n @param index The index of the observation that was most recently written to the observations array\n @param liquidity The current in-range pool liquidity\n @param cardinality The number of populated elements in the oracle array\n @return tickCumulative The tick * time elapsed since the pool was first initialized, as of `secondsAgo`\n @return secondsPerLiquidityCumulativeX128 The time elapsed / max(1, liquidity) since the pool was first initialized, as of `secondsAgo`"},"id":647,"implemented":true,"kind":"function","modifiers":[],"name":"observeSingle","nodeType":"FunctionDefinition","parameters":{"id":514,"nodeType":"ParameterList","parameters":[{"constant":false,"id":501,"mutability":"mutable","name":"self","nodeType":"VariableDeclaration","scope":647,"src":"12631:31:0","stateVariable":false,"storageLocation":"storage","typeDescriptions":{"typeIdentifier":"t_array$_t_struct$_Observation_$11_storage_$65535_storage_ptr","typeString":"struct Oracle.Observation[65535]"},"typeName":{"baseType":{"id":498,"name":"Observation","nodeType":"UserDefinedTypeName","referencedDeclaration":11,"src":"12631:11:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_storage_ptr","typeString":"struct Oracle.Observation"}},"id":500,"length":{"hexValue":"3635353335","id":499,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"12643:5:0","typeDescriptions":{"typeIdentifier":"t_rational_65535_by_1","typeString":"int_const 65535"},"value":"65535"},"nodeType":"ArrayTypeName","src":"12631:18:0","typeDescriptions":{"typeIdentifier":"t_array$_t_struct$_Observation_$11_storage_$65535_storage_ptr","typeString":"struct Oracle.Observation[65535]"}},"visibility":"internal"},{"constant":false,"id":503,"mutability":"mutable","name":"time","nodeType":"VariableDeclaration","scope":647,"src":"12672:11:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":502,"name":"uint32","nodeType":"ElementaryTypeName","src":"12672:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"visibility":"internal"},{"constant":false,"id":505,"mutability":"mutable","name":"secondsAgo","nodeType":"VariableDeclaration","scope":647,"src":"12693:17:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":504,"name":"uint32","nodeType":"ElementaryTypeName","src":"12693:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"visibility":"internal"},{"constant":false,"id":507,"mutability":"mutable","name":"tick","nodeType":"VariableDeclaration","scope":647,"src":"12720:10:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int24","typeString":"int24"},"typeName":{"id":506,"name":"int24","nodeType":"ElementaryTypeName","src":"12720:5:0","typeDescriptions":{"typeIdentifier":"t_int24","typeString":"int24"}},"visibility":"internal"},{"constant":false,"id":509,"mutability":"mutable","name":"index","nodeType":"VariableDeclaration","scope":647,"src":"12740:12:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"},"typeName":{"id":508,"name":"uint16","nodeType":"ElementaryTypeName","src":"12740:6:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"visibility":"internal"},{"constant":false,"id":511,"mutability":"mutable","name":"liquidity","nodeType":"VariableDeclaration","scope":647,"src":"12762:17:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint128","typeString":"uint128"},"typeName":{"id":510,"name":"uint128","nodeType":"ElementaryTypeName","src":"12762:7:0","typeDescriptions":{"typeIdentifier":"t_uint128","typeString":"uint128"}},"visibility":"internal"},{"constant":false,"id":513,"mutability":"mutable","name":"cardinality","nodeType":"VariableDeclaration","scope":647,"src":"12789:18:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"},"typeName":{"id":512,"name":"uint16","nodeType":"ElementaryTypeName","src":"12789:6:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"visibility":"internal"}],"src":"12621:192:0"},"returnParameters":{"id":519,"nodeType":"ParameterList","parameters":[{"constant":false,"id":516,"mutability":"mutable","name":"tickCumulative","nodeType":"VariableDeclaration","scope":647,"src":"12837:20:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int56","typeString":"int56"},"typeName":{"id":515,"name":"int56","nodeType":"ElementaryTypeName","src":"12837:5:0","typeDescriptions":{"typeIdentifier":"t_int56","typeString":"int56"}},"visibility":"internal"},{"constant":false,"id":518,"mutability":"mutable","name":"secondsPerLiquidityCumulativeX128","nodeType":"VariableDeclaration","scope":647,"src":"12859:41:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint160","typeString":"uint160"},"typeName":{"id":517,"name":"uint160","nodeType":"ElementaryTypeName","src":"12859:7:0","typeDescriptions":{"typeIdentifier":"t_uint160","typeString":"uint160"}},"visibility":"internal"}],"src":"12836:65:0"},"scope":734,"src":"12599:2025:0","stateMutability":"view","virtual":false,"visibility":"internal"},{"body":{"id":732,"nodeType":"Block","src":"15905:535:0","statements":[{"expression":{"arguments":[{"commonType":{"typeIdentifier":"t_uint16","typeString":"uint16"},"id":677,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":675,"name":"cardinality","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":665,"src":"15923:11:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"hexValue":"30","id":676,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"15937:1:0","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"15923:15:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},{"hexValue":"49","id":678,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"15940:3:0","typeDescriptions":{"typeIdentifier":"t_stringliteral_8d61ecf6e15472e15b1a0f63cd77f62aa57e6edcd3871d7a841f1056fb42b216","typeString":"literal_string \"I\""},"value":"I"}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"},{"typeIdentifier":"t_stringliteral_8d61ecf6e15472e15b1a0f63cd77f62aa57e6edcd3871d7a841f1056fb42b216","typeString":"literal_string \"I\""}],"id":674,"name":"require","nodeType":"Identifier","overloadedDeclarations":[-18,-18],"referencedDeclaration":-18,"src":"15915:7:0","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$","typeString":"function (bool,string memory) pure"}},"id":679,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"15915:29:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":680,"nodeType":"ExpressionStatement","src":"15915:29:0"},{"expression":{"id":688,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"id":681,"name":"tickCumulatives","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":669,"src":"15955:15:0","typeDescriptions":{"typeIdentifier":"t_array$_t_int56_$dyn_memory_ptr","typeString":"int56[] memory"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"arguments":[{"expression":{"id":685,"name":"secondsAgos","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":657,"src":"15985:11:0","typeDescriptions":{"typeIdentifier":"t_array$_t_uint32_$dyn_memory_ptr","typeString":"uint32[] memory"}},"id":686,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","src":"15985:18:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":684,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"NewExpression","src":"15973:11:0","typeDescriptions":{"typeIdentifier":"t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_int56_$dyn_memory_ptr_$","typeString":"function (uint256) pure returns (int56[] memory)"},"typeName":{"baseType":{"id":682,"name":"int56","nodeType":"ElementaryTypeName","src":"15977:5:0","typeDescriptions":{"typeIdentifier":"t_int56","typeString":"int56"}},"id":683,"nodeType":"ArrayTypeName","src":"15977:7:0","typeDescriptions":{"typeIdentifier":"t_array$_t_int56_$dyn_storage_ptr","typeString":"int56[]"}}},"id":687,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"15973:31:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_array$_t_int56_$dyn_memory_ptr","typeString":"int56[] memory"}},"src":"15955:49:0","typeDescriptions":{"typeIdentifier":"t_array$_t_int56_$dyn_memory_ptr","typeString":"int56[] memory"}},"id":689,"nodeType":"ExpressionStatement","src":"15955:49:0"},{"expression":{"id":697,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"id":690,"name":"secondsPerLiquidityCumulativeX128s","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":672,"src":"16014:34:0","typeDescriptions":{"typeIdentifier":"t_array$_t_uint160_$dyn_memory_ptr","typeString":"uint160[] memory"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"arguments":[{"expression":{"id":694,"name":"secondsAgos","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":657,"src":"16065:11:0","typeDescriptions":{"typeIdentifier":"t_array$_t_uint32_$dyn_memory_ptr","typeString":"uint32[] memory"}},"id":695,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","src":"16065:18:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":693,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"NewExpression","src":"16051:13:0","typeDescriptions":{"typeIdentifier":"t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint160_$dyn_memory_ptr_$","typeString":"function (uint256) pure returns (uint160[] memory)"},"typeName":{"baseType":{"id":691,"name":"uint160","nodeType":"ElementaryTypeName","src":"16055:7:0","typeDescriptions":{"typeIdentifier":"t_uint160","typeString":"uint160"}},"id":692,"nodeType":"ArrayTypeName","src":"16055:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_uint160_$dyn_storage_ptr","typeString":"uint160[]"}}},"id":696,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"16051:33:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_array$_t_uint160_$dyn_memory_ptr","typeString":"uint160[] memory"}},"src":"16014:70:0","typeDescriptions":{"typeIdentifier":"t_array$_t_uint160_$dyn_memory_ptr","typeString":"uint160[] memory"}},"id":698,"nodeType":"ExpressionStatement","src":"16014:70:0"},{"body":{"id":730,"nodeType":"Block","src":"16143:291:0","statements":[{"expression":{"id":728,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"components":[{"baseExpression":{"id":710,"name":"tickCumulatives","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":669,"src":"16158:15:0","typeDescriptions":{"typeIdentifier":"t_array$_t_int56_$dyn_memory_ptr","typeString":"int56[] memory"}},"id":712,"indexExpression":{"id":711,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":700,"src":"16174:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"16158:18:0","typeDescriptions":{"typeIdentifier":"t_int56","typeString":"int56"}},{"baseExpression":{"id":713,"name":"secondsPerLiquidityCumulativeX128s","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":672,"src":"16178:34:0","typeDescriptions":{"typeIdentifier":"t_array$_t_uint160_$dyn_memory_ptr","typeString":"uint160[] memory"}},"id":715,"indexExpression":{"id":714,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":700,"src":"16213:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"16178:37:0","typeDescriptions":{"typeIdentifier":"t_uint160","typeString":"uint160"}}],"id":716,"isConstant":false,"isInlineArray":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"TupleExpression","src":"16157:59:0","typeDescriptions":{"typeIdentifier":"t_tuple$_t_int56_$_t_uint160_$","typeString":"tuple(int56,uint160)"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"arguments":[{"id":718,"name":"self","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":652,"src":"16250:4:0","typeDescriptions":{"typeIdentifier":"t_array$_t_struct$_Observation_$11_storage_$65535_storage_ptr","typeString":"struct Oracle.Observation storage ref[65535] storage pointer"}},{"id":719,"name":"time","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":654,"src":"16272:4:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},{"baseExpression":{"id":720,"name":"secondsAgos","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":657,"src":"16294:11:0","typeDescriptions":{"typeIdentifier":"t_array$_t_uint32_$dyn_memory_ptr","typeString":"uint32[] memory"}},"id":722,"indexExpression":{"id":721,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":700,"src":"16306:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"16294:14:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},{"id":723,"name":"tick","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":659,"src":"16326:4:0","typeDescriptions":{"typeIdentifier":"t_int24","typeString":"int24"}},{"id":724,"name":"index","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":661,"src":"16348:5:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},{"id":725,"name":"liquidity","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":663,"src":"16371:9:0","typeDescriptions":{"typeIdentifier":"t_uint128","typeString":"uint128"}},{"id":726,"name":"cardinality","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":665,"src":"16398:11:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_array$_t_struct$_Observation_$11_storage_$65535_storage_ptr","typeString":"struct Oracle.Observation storage ref[65535] storage pointer"},{"typeIdentifier":"t_uint32","typeString":"uint32"},{"typeIdentifier":"t_uint32","typeString":"uint32"},{"typeIdentifier":"t_int24","typeString":"int24"},{"typeIdentifier":"t_uint16","typeString":"uint16"},{"typeIdentifier":"t_uint128","typeString":"uint128"},{"typeIdentifier":"t_uint16","typeString":"uint16"}],"id":717,"name":"observeSingle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":647,"src":"16219:13:0","typeDescriptions":{"typeIdentifier":"t_function_internal_view$_t_array$_t_struct$_Observation_$11_storage_$65535_storage_ptr_$_t_uint32_$_t_uint32_$_t_int24_$_t_uint16_$_t_uint128_$_t_uint16_$returns$_t_int56_$_t_uint160_$","typeString":"function (struct Oracle.Observation storage ref[65535] storage pointer,uint32,uint32,int24,uint16,uint128,uint16) view returns (int56,uint160)"}},"id":727,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"16219:204:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$_t_int56_$_t_uint160_$","typeString":"tuple(int56,uint160)"}},"src":"16157:266:0","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":729,"nodeType":"ExpressionStatement","src":"16157:266:0"}]},"condition":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":706,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":703,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":700,"src":"16114:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"expression":{"id":704,"name":"secondsAgos","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":657,"src":"16118:11:0","typeDescriptions":{"typeIdentifier":"t_array$_t_uint32_$dyn_memory_ptr","typeString":"uint32[] memory"}},"id":705,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","src":"16118:18:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"16114:22:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":731,"initializationExpression":{"assignments":[700],"declarations":[{"constant":false,"id":700,"mutability":"mutable","name":"i","nodeType":"VariableDeclaration","scope":731,"src":"16099:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":699,"name":"uint256","nodeType":"ElementaryTypeName","src":"16099:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"id":702,"initialValue":{"hexValue":"30","id":701,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"16111:1:0","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"16099:13:0"},"loopExpression":{"expression":{"id":708,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"16138:3:0","subExpression":{"id":707,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":700,"src":"16138:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":709,"nodeType":"ExpressionStatement","src":"16138:3:0"},"nodeType":"ForStatement","src":"16094:340:0"}]},"documentation":{"id":648,"nodeType":"StructuredDocumentation","src":"14630:943:0","text":"@notice Returns the accumulator values as of each time seconds ago from the given time in the array of `secondsAgos`\n @dev Reverts if `secondsAgos` > oldest observation\n @param self The stored oracle array\n @param time The current block.timestamp\n @param secondsAgos Each amount of time to look back, in seconds, at which point to return an observation\n @param tick The current tick\n @param index The index of the observation that was most recently written to the observations array\n @param liquidity The current in-range pool liquidity\n @param cardinality The number of populated elements in the oracle array\n @return tickCumulatives The tick * time elapsed since the pool was first initialized, as of each `secondsAgo`\n @return secondsPerLiquidityCumulativeX128s The cumulative seconds / max(1, liquidity) since the pool was first initialized, as of each `secondsAgo`"},"id":733,"implemented":true,"kind":"function","modifiers":[],"name":"observe","nodeType":"FunctionDefinition","parameters":{"id":666,"nodeType":"ParameterList","parameters":[{"constant":false,"id":652,"mutability":"mutable","name":"self","nodeType":"VariableDeclaration","scope":733,"src":"15604:31:0","stateVariable":false,"storageLocation":"storage","typeDescriptions":{"typeIdentifier":"t_array$_t_struct$_Observation_$11_storage_$65535_storage_ptr","typeString":"struct Oracle.Observation[65535]"},"typeName":{"baseType":{"id":649,"name":"Observation","nodeType":"UserDefinedTypeName","referencedDeclaration":11,"src":"15604:11:0","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_storage_ptr","typeString":"struct Oracle.Observation"}},"id":651,"length":{"hexValue":"3635353335","id":650,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"15616:5:0","typeDescriptions":{"typeIdentifier":"t_rational_65535_by_1","typeString":"int_const 65535"},"value":"65535"},"nodeType":"ArrayTypeName","src":"15604:18:0","typeDescriptions":{"typeIdentifier":"t_array$_t_struct$_Observation_$11_storage_$65535_storage_ptr","typeString":"struct Oracle.Observation[65535]"}},"visibility":"internal"},{"constant":false,"id":654,"mutability":"mutable","name":"time","nodeType":"VariableDeclaration","scope":733,"src":"15645:11:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":653,"name":"uint32","nodeType":"ElementaryTypeName","src":"15645:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"visibility":"internal"},{"constant":false,"id":657,"mutability":"mutable","name":"secondsAgos","nodeType":"VariableDeclaration","scope":733,"src":"15666:27:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_uint32_$dyn_memory_ptr","typeString":"uint32[]"},"typeName":{"baseType":{"id":655,"name":"uint32","nodeType":"ElementaryTypeName","src":"15666:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":656,"nodeType":"ArrayTypeName","src":"15666:8:0","typeDescriptions":{"typeIdentifier":"t_array$_t_uint32_$dyn_storage_ptr","typeString":"uint32[]"}},"visibility":"internal"},{"constant":false,"id":659,"mutability":"mutable","name":"tick","nodeType":"VariableDeclaration","scope":733,"src":"15703:10:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int24","typeString":"int24"},"typeName":{"id":658,"name":"int24","nodeType":"ElementaryTypeName","src":"15703:5:0","typeDescriptions":{"typeIdentifier":"t_int24","typeString":"int24"}},"visibility":"internal"},{"constant":false,"id":661,"mutability":"mutable","name":"index","nodeType":"VariableDeclaration","scope":733,"src":"15723:12:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"},"typeName":{"id":660,"name":"uint16","nodeType":"ElementaryTypeName","src":"15723:6:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"visibility":"internal"},{"constant":false,"id":663,"mutability":"mutable","name":"liquidity","nodeType":"VariableDeclaration","scope":733,"src":"15745:17:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint128","typeString":"uint128"},"typeName":{"id":662,"name":"uint128","nodeType":"ElementaryTypeName","src":"15745:7:0","typeDescriptions":{"typeIdentifier":"t_uint128","typeString":"uint128"}},"visibility":"internal"},{"constant":false,"id":665,"mutability":"mutable","name":"cardinality","nodeType":"VariableDeclaration","scope":733,"src":"15772:18:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"},"typeName":{"id":664,"name":"uint16","nodeType":"ElementaryTypeName","src":"15772:6:0","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"visibility":"internal"}],"src":"15594:202:0"},"returnParameters":{"id":673,"nodeType":"ParameterList","parameters":[{"constant":false,"id":669,"mutability":"mutable","name":"tickCumulatives","nodeType":"VariableDeclaration","scope":733,"src":"15820:30:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_int56_$dyn_memory_ptr","typeString":"int56[]"},"typeName":{"baseType":{"id":667,"name":"int56","nodeType":"ElementaryTypeName","src":"15820:5:0","typeDescriptions":{"typeIdentifier":"t_int56","typeString":"int56"}},"id":668,"nodeType":"ArrayTypeName","src":"15820:7:0","typeDescriptions":{"typeIdentifier":"t_array$_t_int56_$dyn_storage_ptr","typeString":"int56[]"}},"visibility":"internal"},{"constant":false,"id":672,"mutability":"mutable","name":"secondsPerLiquidityCumulativeX128s","nodeType":"VariableDeclaration","scope":733,"src":"15852:51:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_uint160_$dyn_memory_ptr","typeString":"uint160[]"},"typeName":{"baseType":{"id":670,"name":"uint160","nodeType":"ElementaryTypeName","src":"15852:7:0","typeDescriptions":{"typeIdentifier":"t_uint160","typeString":"uint160"}},"id":671,"nodeType":"ArrayTypeName","src":"15852:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_uint160_$dyn_storage_ptr","typeString":"uint160[]"}},"visibility":"internal"}],"src":"15819:85:0"},"scope":734,"src":"15578:862:0","stateMutability":"view","virtual":false,"visibility":"internal"}],"scope":735,"src":"683:15759:0"}],"src":"37:16406:0"},"id":0},"contracts/test/MockObservations.sol":{"ast":{"absolutePath":"contracts/test/MockObservations.sol","exportedSymbols":{"MockObservations":[916],"Oracle":[734]},"id":917,"license":"UNLICENSED","nodeType":"SourceUnit","nodes":[{"id":736,"literals":["solidity","=","0.7",".6"],"nodeType":"PragmaDirective","src":"39:23:1"},{"absolutePath":"@airdao/astra-cl-core/contracts/libraries/Oracle.sol","file":"@airdao/astra-cl-core/contracts/libraries/Oracle.sol","id":737,"nodeType":"ImportDirective","scope":917,"sourceUnit":735,"src":"117:62:1","symbolAliases":[],"unitAlias":""},{"abstract":false,"baseContracts":[],"contractDependencies":[],"contractKind":"contract","fullyImplemented":true,"id":916,"linearizedBaseContracts":[916],"name":"MockObservations","nodeType":"ContractDefinition","nodes":[{"constant":false,"id":741,"mutability":"mutable","name":"oracleObservations","nodeType":"VariableDeclaration","scope":916,"src":"213:49:1","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_array$_t_struct$_Observation_$11_storage_$4_storage","typeString":"struct Oracle.Observation[4]"},"typeName":{"baseType":{"id":738,"name":"Oracle.Observation","nodeType":"UserDefinedTypeName","referencedDeclaration":11,"src":"213:18:1","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_storage_ptr","typeString":"struct Oracle.Observation"}},"id":740,"length":{"hexValue":"34","id":739,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"232:1:1","typeDescriptions":{"typeIdentifier":"t_rational_4_by_1","typeString":"int_const 4"},"value":"4"},"nodeType":"ArrayTypeName","src":"213:21:1","typeDescriptions":{"typeIdentifier":"t_array$_t_struct$_Observation_$11_storage_$4_storage_ptr","typeString":"struct Oracle.Observation[4]"}},"visibility":"internal"},{"constant":false,"id":743,"mutability":"mutable","name":"slot0Tick","nodeType":"VariableDeclaration","scope":916,"src":"269:15:1","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int24","typeString":"int24"},"typeName":{"id":742,"name":"int24","nodeType":"ElementaryTypeName","src":"269:5:1","typeDescriptions":{"typeIdentifier":"t_int24","typeString":"int24"}},"visibility":"internal"},{"constant":false,"id":745,"mutability":"mutable","name":"slot0ObservationCardinality","nodeType":"VariableDeclaration","scope":916,"src":"290:43:1","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"},"typeName":{"id":744,"name":"uint16","nodeType":"ElementaryTypeName","src":"290:6:1","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"visibility":"internal"},{"constant":false,"id":747,"mutability":"mutable","name":"slot0ObservationIndex","nodeType":"VariableDeclaration","scope":916,"src":"339:37:1","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"},"typeName":{"id":746,"name":"uint16","nodeType":"ElementaryTypeName","src":"339:6:1","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"visibility":"internal"},{"constant":false,"functionSelector":"1a686502","id":749,"mutability":"mutable","name":"liquidity","nodeType":"VariableDeclaration","scope":916,"src":"382:24:1","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint128","typeString":"uint128"},"typeName":{"id":748,"name":"uint128","nodeType":"ElementaryTypeName","src":"382:7:1","typeDescriptions":{"typeIdentifier":"t_uint128","typeString":"uint128"}},"visibility":"public"},{"constant":false,"id":751,"mutability":"mutable","name":"lastObservationCurrentTimestamp","nodeType":"VariableDeclaration","scope":916,"src":"413:45:1","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":750,"name":"bool","nodeType":"ElementaryTypeName","src":"413:4:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"visibility":"internal"},{"body":{"id":833,"nodeType":"Block","src":"839:647:1","statements":[{"body":{"id":811,"nodeType":"Block","src":"903:327:1","statements":[{"expression":{"id":809,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"baseExpression":{"id":791,"name":"oracleObservations","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":741,"src":"917:18:1","typeDescriptions":{"typeIdentifier":"t_array$_t_struct$_Observation_$11_storage_$4_storage","typeString":"struct Oracle.Observation storage ref[4] storage ref"}},"id":793,"indexExpression":{"id":792,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":781,"src":"936:1:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"917:21:1","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_storage","typeString":"struct Oracle.Observation storage ref"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"arguments":[{"baseExpression":{"id":796,"name":"_blockTimestamps","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":755,"src":"994:16:1","typeDescriptions":{"typeIdentifier":"t_array$_t_uint32_$4_memory_ptr","typeString":"uint32[4] memory"}},"id":798,"indexExpression":{"id":797,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":781,"src":"1011:1:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"994:19:1","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},{"baseExpression":{"id":799,"name":"_tickCumulatives","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":759,"src":"1047:16:1","typeDescriptions":{"typeIdentifier":"t_array$_t_int56_$4_memory_ptr","typeString":"int56[4] memory"}},"id":801,"indexExpression":{"id":800,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":781,"src":"1064:1:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1047:19:1","typeDescriptions":{"typeIdentifier":"t_int56","typeString":"int56"}},{"baseExpression":{"id":802,"name":"_secondsPerLiquidityCumulativeX128s","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":763,"src":"1119:35:1","typeDescriptions":{"typeIdentifier":"t_array$_t_uint128_$4_memory_ptr","typeString":"uint128[4] memory"}},"id":804,"indexExpression":{"id":803,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":781,"src":"1155:1:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1119:38:1","typeDescriptions":{"typeIdentifier":"t_uint128","typeString":"uint128"}},{"baseExpression":{"id":805,"name":"_initializeds","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":767,"src":"1188:13:1","typeDescriptions":{"typeIdentifier":"t_array$_t_bool_$4_memory_ptr","typeString":"bool[4] memory"}},"id":807,"indexExpression":{"id":806,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":781,"src":"1202:1:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1188:16:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint32","typeString":"uint32"},{"typeIdentifier":"t_int56","typeString":"int56"},{"typeIdentifier":"t_uint128","typeString":"uint128"},{"typeIdentifier":"t_bool","typeString":"bool"}],"expression":{"id":794,"name":"Oracle","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":734,"src":"941:6:1","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Oracle_$734_$","typeString":"type(library Oracle)"}},"id":795,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"Observation","nodeType":"MemberAccess","referencedDeclaration":11,"src":"941:18:1","typeDescriptions":{"typeIdentifier":"t_type$_t_struct$_Observation_$11_storage_ptr_$","typeString":"type(struct Oracle.Observation storage pointer)"}},"id":808,"isConstant":false,"isLValue":false,"isPure":false,"kind":"structConstructorCall","lValueRequested":false,"names":["blockTimestamp","tickCumulative","secondsPerLiquidityCumulativeX128","initialized"],"nodeType":"FunctionCall","src":"941:278:1","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation memory"}},"src":"917:302:1","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_storage","typeString":"struct Oracle.Observation storage ref"}},"id":810,"nodeType":"ExpressionStatement","src":"917:302:1"}]},"condition":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":787,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":784,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":781,"src":"869:1:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"expression":{"id":785,"name":"_blockTimestamps","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":755,"src":"873:16:1","typeDescriptions":{"typeIdentifier":"t_array$_t_uint32_$4_memory_ptr","typeString":"uint32[4] memory"}},"id":786,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","src":"873:23:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"869:27:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":812,"initializationExpression":{"assignments":[781],"declarations":[{"constant":false,"id":781,"mutability":"mutable","name":"i","nodeType":"VariableDeclaration","scope":812,"src":"854:9:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":780,"name":"uint256","nodeType":"ElementaryTypeName","src":"854:7:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"id":783,"initialValue":{"hexValue":"30","id":782,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"866:1:1","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"854:13:1"},"loopExpression":{"expression":{"id":789,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"898:3:1","subExpression":{"id":788,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":781,"src":"898:1:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":790,"nodeType":"ExpressionStatement","src":"898:3:1"},"nodeType":"ForStatement","src":"849:381:1"},{"expression":{"id":815,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"id":813,"name":"slot0Tick","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":743,"src":"1240:9:1","typeDescriptions":{"typeIdentifier":"t_int24","typeString":"int24"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"id":814,"name":"_tick","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":769,"src":"1252:5:1","typeDescriptions":{"typeIdentifier":"t_int24","typeString":"int24"}},"src":"1240:17:1","typeDescriptions":{"typeIdentifier":"t_int24","typeString":"int24"}},"id":816,"nodeType":"ExpressionStatement","src":"1240:17:1"},{"expression":{"id":819,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"id":817,"name":"slot0ObservationCardinality","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":745,"src":"1267:27:1","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"id":818,"name":"_observationCardinality","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":771,"src":"1297:23:1","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"src":"1267:53:1","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"id":820,"nodeType":"ExpressionStatement","src":"1267:53:1"},{"expression":{"id":823,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"id":821,"name":"slot0ObservationIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":747,"src":"1330:21:1","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"id":822,"name":"_observationIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":773,"src":"1354:17:1","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"src":"1330:41:1","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"id":824,"nodeType":"ExpressionStatement","src":"1330:41:1"},{"expression":{"id":827,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"id":825,"name":"lastObservationCurrentTimestamp","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":751,"src":"1381:31:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"id":826,"name":"_lastObservationCurrentTimestamp","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":775,"src":"1415:32:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"1381:66:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":828,"nodeType":"ExpressionStatement","src":"1381:66:1"},{"expression":{"id":831,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"id":829,"name":"liquidity","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":749,"src":"1457:9:1","typeDescriptions":{"typeIdentifier":"t_uint128","typeString":"uint128"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"id":830,"name":"_liquidity","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":777,"src":"1469:10:1","typeDescriptions":{"typeIdentifier":"t_uint128","typeString":"uint128"}},"src":"1457:22:1","typeDescriptions":{"typeIdentifier":"t_uint128","typeString":"uint128"}},"id":832,"nodeType":"ExpressionStatement","src":"1457:22:1"}]},"id":834,"implemented":true,"kind":"constructor","modifiers":[],"name":"","nodeType":"FunctionDefinition","parameters":{"id":778,"nodeType":"ParameterList","parameters":[{"constant":false,"id":755,"mutability":"mutable","name":"_blockTimestamps","nodeType":"VariableDeclaration","scope":834,"src":"486:33:1","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_uint32_$4_memory_ptr","typeString":"uint32[4]"},"typeName":{"baseType":{"id":752,"name":"uint32","nodeType":"ElementaryTypeName","src":"486:6:1","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":754,"length":{"hexValue":"34","id":753,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"493:1:1","typeDescriptions":{"typeIdentifier":"t_rational_4_by_1","typeString":"int_const 4"},"value":"4"},"nodeType":"ArrayTypeName","src":"486:9:1","typeDescriptions":{"typeIdentifier":"t_array$_t_uint32_$4_storage_ptr","typeString":"uint32[4]"}},"visibility":"internal"},{"constant":false,"id":759,"mutability":"mutable","name":"_tickCumulatives","nodeType":"VariableDeclaration","scope":834,"src":"529:32:1","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_int56_$4_memory_ptr","typeString":"int56[4]"},"typeName":{"baseType":{"id":756,"name":"int56","nodeType":"ElementaryTypeName","src":"529:5:1","typeDescriptions":{"typeIdentifier":"t_int56","typeString":"int56"}},"id":758,"length":{"hexValue":"34","id":757,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"535:1:1","typeDescriptions":{"typeIdentifier":"t_rational_4_by_1","typeString":"int_const 4"},"value":"4"},"nodeType":"ArrayTypeName","src":"529:8:1","typeDescriptions":{"typeIdentifier":"t_array$_t_int56_$4_storage_ptr","typeString":"int56[4]"}},"visibility":"internal"},{"constant":false,"id":763,"mutability":"mutable","name":"_secondsPerLiquidityCumulativeX128s","nodeType":"VariableDeclaration","scope":834,"src":"571:53:1","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_uint128_$4_memory_ptr","typeString":"uint128[4]"},"typeName":{"baseType":{"id":760,"name":"uint128","nodeType":"ElementaryTypeName","src":"571:7:1","typeDescriptions":{"typeIdentifier":"t_uint128","typeString":"uint128"}},"id":762,"length":{"hexValue":"34","id":761,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"579:1:1","typeDescriptions":{"typeIdentifier":"t_rational_4_by_1","typeString":"int_const 4"},"value":"4"},"nodeType":"ArrayTypeName","src":"571:10:1","typeDescriptions":{"typeIdentifier":"t_array$_t_uint128_$4_storage_ptr","typeString":"uint128[4]"}},"visibility":"internal"},{"constant":false,"id":767,"mutability":"mutable","name":"_initializeds","nodeType":"VariableDeclaration","scope":834,"src":"634:28:1","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_bool_$4_memory_ptr","typeString":"bool[4]"},"typeName":{"baseType":{"id":764,"name":"bool","nodeType":"ElementaryTypeName","src":"634:4:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":766,"length":{"hexValue":"34","id":765,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"639:1:1","typeDescriptions":{"typeIdentifier":"t_rational_4_by_1","typeString":"int_const 4"},"value":"4"},"nodeType":"ArrayTypeName","src":"634:7:1","typeDescriptions":{"typeIdentifier":"t_array$_t_bool_$4_storage_ptr","typeString":"bool[4]"}},"visibility":"internal"},{"constant":false,"id":769,"mutability":"mutable","name":"_tick","nodeType":"VariableDeclaration","scope":834,"src":"672:11:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int24","typeString":"int24"},"typeName":{"id":768,"name":"int24","nodeType":"ElementaryTypeName","src":"672:5:1","typeDescriptions":{"typeIdentifier":"t_int24","typeString":"int24"}},"visibility":"internal"},{"constant":false,"id":771,"mutability":"mutable","name":"_observationCardinality","nodeType":"VariableDeclaration","scope":834,"src":"693:30:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"},"typeName":{"id":770,"name":"uint16","nodeType":"ElementaryTypeName","src":"693:6:1","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"visibility":"internal"},{"constant":false,"id":773,"mutability":"mutable","name":"_observationIndex","nodeType":"VariableDeclaration","scope":834,"src":"733:24:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"},"typeName":{"id":772,"name":"uint16","nodeType":"ElementaryTypeName","src":"733:6:1","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"visibility":"internal"},{"constant":false,"id":775,"mutability":"mutable","name":"_lastObservationCurrentTimestamp","nodeType":"VariableDeclaration","scope":834,"src":"767:37:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":774,"name":"bool","nodeType":"ElementaryTypeName","src":"767:4:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"visibility":"internal"},{"constant":false,"id":777,"mutability":"mutable","name":"_liquidity","nodeType":"VariableDeclaration","scope":834,"src":"814:18:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint128","typeString":"uint128"},"typeName":{"id":776,"name":"uint128","nodeType":"ElementaryTypeName","src":"814:7:1","typeDescriptions":{"typeIdentifier":"t_uint128","typeString":"uint128"}},"visibility":"internal"}],"src":"476:362:1"},"returnParameters":{"id":779,"nodeType":"ParameterList","parameters":[],"src":"839:0:1"},"scope":916,"src":"465:1021:1","stateMutability":"nonpayable","virtual":false,"visibility":"public"},{"body":{"id":860,"nodeType":"Block","src":"1585:103:1","statements":[{"expression":{"components":[{"hexValue":"30","id":851,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1603:1:1","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},{"id":852,"name":"slot0Tick","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":743,"src":"1606:9:1","typeDescriptions":{"typeIdentifier":"t_int24","typeString":"int24"}},{"id":853,"name":"slot0ObservationIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":747,"src":"1617:21:1","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},{"id":854,"name":"slot0ObservationCardinality","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":745,"src":"1640:27:1","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},{"hexValue":"30","id":855,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1669:1:1","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},{"hexValue":"30","id":856,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1672:1:1","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},{"hexValue":"66616c7365","id":857,"isConstant":false,"isLValue":false,"isPure":true,"kind":"bool","lValueRequested":false,"nodeType":"Literal","src":"1675:5:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"value":"false"}],"id":858,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"1602:79:1","typeDescriptions":{"typeIdentifier":"t_tuple$_t_rational_0_by_1_$_t_int24_$_t_uint16_$_t_uint16_$_t_rational_0_by_1_$_t_rational_0_by_1_$_t_bool_$","typeString":"tuple(int_const 0,int24,uint16,uint16,int_const 0,int_const 0,bool)"}},"functionReturnParameters":850,"id":859,"nodeType":"Return","src":"1595:86:1"}]},"functionSelector":"3850c7bd","id":861,"implemented":true,"kind":"function","modifiers":[],"name":"slot0","nodeType":"FunctionDefinition","parameters":{"id":835,"nodeType":"ParameterList","parameters":[],"src":"1506:2:1"},"returnParameters":{"id":850,"nodeType":"ParameterList","parameters":[{"constant":false,"id":837,"mutability":"mutable","name":"","nodeType":"VariableDeclaration","scope":861,"src":"1532:7:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint160","typeString":"uint160"},"typeName":{"id":836,"name":"uint160","nodeType":"ElementaryTypeName","src":"1532:7:1","typeDescriptions":{"typeIdentifier":"t_uint160","typeString":"uint160"}},"visibility":"internal"},{"constant":false,"id":839,"mutability":"mutable","name":"","nodeType":"VariableDeclaration","scope":861,"src":"1541:5:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int24","typeString":"int24"},"typeName":{"id":838,"name":"int24","nodeType":"ElementaryTypeName","src":"1541:5:1","typeDescriptions":{"typeIdentifier":"t_int24","typeString":"int24"}},"visibility":"internal"},{"constant":false,"id":841,"mutability":"mutable","name":"","nodeType":"VariableDeclaration","scope":861,"src":"1548:6:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"},"typeName":{"id":840,"name":"uint16","nodeType":"ElementaryTypeName","src":"1548:6:1","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"visibility":"internal"},{"constant":false,"id":843,"mutability":"mutable","name":"","nodeType":"VariableDeclaration","scope":861,"src":"1556:6:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"},"typeName":{"id":842,"name":"uint16","nodeType":"ElementaryTypeName","src":"1556:6:1","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"visibility":"internal"},{"constant":false,"id":845,"mutability":"mutable","name":"","nodeType":"VariableDeclaration","scope":861,"src":"1564:6:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"},"typeName":{"id":844,"name":"uint16","nodeType":"ElementaryTypeName","src":"1564:6:1","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"visibility":"internal"},{"constant":false,"id":847,"mutability":"mutable","name":"","nodeType":"VariableDeclaration","scope":861,"src":"1572:5:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":846,"name":"uint8","nodeType":"ElementaryTypeName","src":"1572:5:1","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"visibility":"internal"},{"constant":false,"id":849,"mutability":"mutable","name":"","nodeType":"VariableDeclaration","scope":861,"src":"1579:4:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":848,"name":"bool","nodeType":"ElementaryTypeName","src":"1579:4:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"visibility":"internal"}],"src":"1531:53:1"},"scope":916,"src":"1492:196:1","stateMutability":"view","virtual":false,"visibility":"external"},{"body":{"id":914,"nodeType":"Block","src":"1784:530:1","statements":[{"assignments":[877],"declarations":[{"constant":false,"id":877,"mutability":"mutable","name":"observation","nodeType":"VariableDeclaration","scope":914,"src":"1794:37:1","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation"},"typeName":{"id":876,"name":"Oracle.Observation","nodeType":"UserDefinedTypeName","referencedDeclaration":11,"src":"1794:18:1","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_storage_ptr","typeString":"struct Oracle.Observation"}},"visibility":"internal"}],"id":881,"initialValue":{"baseExpression":{"id":878,"name":"oracleObservations","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":741,"src":"1834:18:1","typeDescriptions":{"typeIdentifier":"t_array$_t_struct$_Observation_$11_storage_$4_storage","typeString":"struct Oracle.Observation storage ref[4] storage ref"}},"id":880,"indexExpression":{"id":879,"name":"index","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":863,"src":"1853:5:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1834:25:1","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_storage","typeString":"struct Oracle.Observation storage ref"}},"nodeType":"VariableDeclarationStatement","src":"1794:65:1"},{"condition":{"id":882,"name":"lastObservationCurrentTimestamp","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":751,"src":"1873:31:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":903,"nodeType":"IfStatement","src":"1869:236:1","trueBody":{"id":902,"nodeType":"Block","src":"1906:199:1","statements":[{"expression":{"id":900,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"expression":{"id":883,"name":"observation","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":877,"src":"1920:11:1","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation memory"}},"id":885,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"memberName":"blockTimestamp","nodeType":"MemberAccess","referencedDeclaration":4,"src":"1920:26:1","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":899,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"arguments":[{"expression":{"id":888,"name":"block","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-4,"src":"1972:5:1","typeDescriptions":{"typeIdentifier":"t_magic_block","typeString":"block"}},"id":889,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"timestamp","nodeType":"MemberAccess","src":"1972:15:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":887,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"1965:6:1","typeDescriptions":{"typeIdentifier":"t_type$_t_uint32_$","typeString":"type(uint32)"},"typeName":{"id":886,"name":"uint32","nodeType":"ElementaryTypeName","src":"1965:6:1","typeDescriptions":{}}},"id":890,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1965:23:1","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"components":[{"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":897,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"expression":{"baseExpression":{"id":891,"name":"oracleObservations","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":741,"src":"2008:18:1","typeDescriptions":{"typeIdentifier":"t_array$_t_struct$_Observation_$11_storage_$4_storage","typeString":"struct Oracle.Observation storage ref[4] storage ref"}},"id":893,"indexExpression":{"id":892,"name":"slot0ObservationIndex","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":747,"src":"2027:21:1","typeDescriptions":{"typeIdentifier":"t_uint16","typeString":"uint16"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2008:41:1","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_storage","typeString":"struct Oracle.Observation storage ref"}},"id":894,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"blockTimestamp","nodeType":"MemberAccess","referencedDeclaration":4,"src":"2008:56:1","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"expression":{"id":895,"name":"observation","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":877,"src":"2067:11:1","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation memory"}},"id":896,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"blockTimestamp","nodeType":"MemberAccess","referencedDeclaration":4,"src":"2067:26:1","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"2008:85:1","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}}],"id":898,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"2007:87:1","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"1965:129:1","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"1920:174:1","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":901,"nodeType":"ExpressionStatement","src":"1920:174:1"}]}},{"expression":{"components":[{"expression":{"id":904,"name":"observation","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":877,"src":"2135:11:1","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation memory"}},"id":905,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"blockTimestamp","nodeType":"MemberAccess","referencedDeclaration":4,"src":"2135:26:1","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},{"expression":{"id":906,"name":"observation","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":877,"src":"2175:11:1","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation memory"}},"id":907,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"tickCumulative","nodeType":"MemberAccess","referencedDeclaration":6,"src":"2175:26:1","typeDescriptions":{"typeIdentifier":"t_int56","typeString":"int56"}},{"expression":{"id":908,"name":"observation","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":877,"src":"2215:11:1","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation memory"}},"id":909,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"secondsPerLiquidityCumulativeX128","nodeType":"MemberAccess","referencedDeclaration":8,"src":"2215:45:1","typeDescriptions":{"typeIdentifier":"t_uint160","typeString":"uint160"}},{"expression":{"id":910,"name":"observation","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":877,"src":"2274:11:1","typeDescriptions":{"typeIdentifier":"t_struct$_Observation_$11_memory_ptr","typeString":"struct Oracle.Observation memory"}},"id":911,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"memberName":"initialized","nodeType":"MemberAccess","referencedDeclaration":10,"src":"2274:23:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"id":912,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"2121:186:1","typeDescriptions":{"typeIdentifier":"t_tuple$_t_uint32_$_t_int56_$_t_uint160_$_t_bool_$","typeString":"tuple(uint32,int56,uint160,bool)"}},"functionReturnParameters":873,"id":913,"nodeType":"Return","src":"2114:193:1"}]},"functionSelector":"252c09d7","id":915,"implemented":true,"kind":"function","modifiers":[],"name":"observations","nodeType":"FunctionDefinition","parameters":{"id":864,"nodeType":"ParameterList","parameters":[{"constant":false,"id":863,"mutability":"mutable","name":"index","nodeType":"VariableDeclaration","scope":915,"src":"1716:13:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":862,"name":"uint256","nodeType":"ElementaryTypeName","src":"1716:7:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"1715:15:1"},"returnParameters":{"id":873,"nodeType":"ParameterList","parameters":[{"constant":false,"id":866,"mutability":"mutable","name":"","nodeType":"VariableDeclaration","scope":915,"src":"1754:6:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":865,"name":"uint32","nodeType":"ElementaryTypeName","src":"1754:6:1","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"visibility":"internal"},{"constant":false,"id":868,"mutability":"mutable","name":"","nodeType":"VariableDeclaration","scope":915,"src":"1762:5:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int56","typeString":"int56"},"typeName":{"id":867,"name":"int56","nodeType":"ElementaryTypeName","src":"1762:5:1","typeDescriptions":{"typeIdentifier":"t_int56","typeString":"int56"}},"visibility":"internal"},{"constant":false,"id":870,"mutability":"mutable","name":"","nodeType":"VariableDeclaration","scope":915,"src":"1769:7:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint160","typeString":"uint160"},"typeName":{"id":869,"name":"uint160","nodeType":"ElementaryTypeName","src":"1769:7:1","typeDescriptions":{"typeIdentifier":"t_uint160","typeString":"uint160"}},"visibility":"internal"},{"constant":false,"id":872,"mutability":"mutable","name":"","nodeType":"VariableDeclaration","scope":915,"src":"1778:4:1","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":871,"name":"bool","nodeType":"ElementaryTypeName","src":"1778:4:1","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"visibility":"internal"}],"src":"1753:30:1"},"scope":916,"src":"1694:620:1","stateMutability":"view","virtual":false,"visibility":"external"}],"scope":917,"src":"181:2135:1"}],"src":"39:2278:1"},"id":1}},"contracts":{"@airdao/astra-cl-core/contracts/libraries/Oracle.sol":{"Oracle":{"abi":[],"evm":{"bytecode":{"generatedSources":[],"linkReferences":{},"object":"602d6023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea164736f6c6343000706000a","opcodes":"PUSH1 0x2D PUSH1 0x23 PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH1 0x0 BYTE PUSH1 0x73 EQ PUSH1 0x16 JUMPI INVALID JUMPDEST ADDRESS PUSH1 0x0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG1 PUSH5 0x736F6C6343 STOP SMOD MOD STOP EXP ","sourceMap":"683:15759:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;"},"deployedBytecode":{"generatedSources":[],"immutableReferences":{},"linkReferences":{},"object":"73000000000000000000000000000000000000000030146080604052600080fdfea164736f6c6343000706000a","opcodes":"PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG1 PUSH5 0x736F6C6343 STOP SMOD MOD STOP EXP ","sourceMap":"683:15759:0:-:0;;;;;;;;"},"methodIdentifiers":{}},"metadata":"{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Instances of stored oracle data, \\\"observations\\\", are collected in the oracle array Every pool is initialized with an oracle array length of 1. Anyone can pay the SSTOREs to increase the maximum length of the oracle array. New slots will be added when the array is fully populated. Observations are overwritten when the full length of the oracle array is populated. The most recent observation is available, independent of the length of the oracle array, by passing 0 to observe()\",\"kind\":\"dev\",\"methods\":{},\"title\":\"Oracle\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"Provides price and liquidity data useful for a wide variety of system designs\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"@airdao/astra-cl-core/contracts/libraries/Oracle.sol\":\"Oracle\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\"},\"optimizer\":{\"enabled\":true,\"runs\":1000000},\"remappings\":[]},\"sources\":{\"@airdao/astra-cl-core/contracts/libraries/Oracle.sol\":{\"keccak256\":\"0xf15b26d5b4229bee5de2462bb1a955e62275fe7739568aae392cbea910ce939c\",\"license\":\"BUSL-1.1\",\"urls\":[\"bzz-raw://aaea6a6dcf63e757263bf6f836671d928af7dae68251afab58380c4b8723949c\",\"dweb:/ipfs/QmSHnihjgUkmwKczcyuDNGjTzS65pmnQnjBjPXBXQpv6JF\"]}},\"version\":1}"}},"contracts/test/MockObservations.sol":{"MockObservations":{"abi":[{"inputs":[{"internalType":"uint32[4]","name":"_blockTimestamps","type":"uint32[4]"},{"internalType":"int56[4]","name":"_tickCumulatives","type":"int56[4]"},{"internalType":"uint128[4]","name":"_secondsPerLiquidityCumulativeX128s","type":"uint128[4]"},{"internalType":"bool[4]","name":"_initializeds","type":"bool[4]"},{"internalType":"int24","name":"_tick","type":"int24"},{"internalType":"uint16","name":"_observationCardinality","type":"uint16"},{"internalType":"uint16","name":"_observationIndex","type":"uint16"},{"internalType":"bool","name":"_lastObservationCurrentTimestamp","type":"bool"},{"internalType":"uint128","name":"_liquidity","type":"uint128"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"liquidity","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"observations","outputs":[{"internalType":"uint32","name":"","type":"uint32"},{"internalType":"int56","name":"","type":"int56"},{"internalType":"uint160","name":"","type":"uint160"},{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"slot0","outputs":[{"internalType":"uint160","name":"","type":"uint160"},{"internalType":"int24","name":"","type":"int24"},{"internalType":"uint16","name":"","type":"uint16"},{"internalType":"uint16","name":"","type":"uint16"},{"internalType":"uint16","name":"","type":"uint16"},{"internalType":"uint8","name":"","type":"uint8"},{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}],"evm":{"bytecode":{"generatedSources":[],"linkReferences":{},"object":"608060405234801561001057600080fd5b506040516104f43803806104f483398181016040526102a081101561003457600080fd5b5061020081015161022082015161024083015161026084015161028085015160808601946101008701946101808801949193909260005b600481101561019c5760405180608001604052808b836004811061008b57fe5b602002015163ffffffff1681526020018a83600481106100a757fe5b602002015160060b81526020018983600481106100c057fe5b60200201516001600160801b03166001600160a01b031681526020018883600481106100e857fe5b602002015115159052600082600481106100fe57fe5b825191018054602084015160408501516060909501511515600160f81b026001600160f81b036001600160a01b039096166b01000000000000000000000002600160581b600160f81b031960069390930b66ffffffffffffff166401000000000266ffffffffffffff60201b1963ffffffff90971663ffffffff1990951694909417959095169290921716929092179290921617905560010161006b565b506004805462ffffff191662ffffff60029790970b969096169590951764ffff0000001916630100000061ffff958616021761ffff60281b19166501000000000093909416929092029290921760ff60b81b1916600160b81b9215159290920291909117600160381b600160b81b0319166701000000000000006001600160801b039290921691909102179055506102b5925082915061023f90506000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c80631a68650214610046578063252c09d7146100735780633850c7bd146100d7575b600080fd5b61004e61013d565b604080516fffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6100906004803603602081101561008957600080fd5b5035610160565b6040805163ffffffff909516855260069390930b602085015273ffffffffffffffffffffffffffffffffffffffff9091168383015215156060830152519081900360800190f35b6100df61027a565b6040805173ffffffffffffffffffffffffffffffffffffffff909816885260029690960b602088015261ffff9485168787015292841660608701529216608085015260ff90911660a0840152151560c0830152519081900360e00190f35b60045467010000000000000090046fffffffffffffffffffffffffffffffff1681565b600080600080600080866004811061017457fe5b60408051608081018252929091015463ffffffff811683526401000000008104600690810b810b900b602084015273ffffffffffffffffffffffffffffffffffffffff6b0100000000000000000000008204169183019190915260ff7f0100000000000000000000000000000000000000000000000000000000000000909104811615156060830152600454919250770100000000000000000000000000000000000000000000009091041615610259578051600480546000916501000000000090910461ffff1690811061024557fe5b015463ffffffff9081169190910342031681525b80516020820151604083015160609093015191989097509195509350915050565b600454600090600281900b9061ffff650100000000008204811691630100000090041683808091929394959656fea164736f6c6343000706000a","opcodes":"PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD PUSH2 0x4F4 CODESIZE SUB DUP1 PUSH2 0x4F4 DUP4 CODECOPY DUP2 DUP2 ADD PUSH1 0x40 MSTORE PUSH2 0x2A0 DUP2 LT ISZERO PUSH2 0x34 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x200 DUP2 ADD MLOAD PUSH2 0x220 DUP3 ADD MLOAD PUSH2 0x240 DUP4 ADD MLOAD PUSH2 0x260 DUP5 ADD MLOAD PUSH2 0x280 DUP6 ADD MLOAD PUSH1 0x80 DUP7 ADD SWAP5 PUSH2 0x100 DUP8 ADD SWAP5 PUSH2 0x180 DUP9 ADD SWAP5 SWAP2 SWAP4 SWAP1 SWAP3 PUSH1 0x0 JUMPDEST PUSH1 0x4 DUP2 LT ISZERO PUSH2 0x19C JUMPI PUSH1 0x40 MLOAD DUP1 PUSH1 0x80 ADD PUSH1 0x40 MSTORE DUP1 DUP12 DUP4 PUSH1 0x4 DUP2 LT PUSH2 0x8B JUMPI INVALID JUMPDEST PUSH1 0x20 MUL ADD MLOAD PUSH4 0xFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD DUP11 DUP4 PUSH1 0x4 DUP2 LT PUSH2 0xA7 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL ADD MLOAD PUSH1 0x6 SIGNEXTEND DUP2 MSTORE PUSH1 0x20 ADD DUP10 DUP4 PUSH1 0x4 DUP2 LT PUSH2 0xC0 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL ADD MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0x80 SHL SUB AND PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 MSTORE PUSH1 0x20 ADD DUP9 DUP4 PUSH1 0x4 DUP2 LT PUSH2 0xE8 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL ADD MLOAD ISZERO ISZERO SWAP1 MSTORE PUSH1 0x0 DUP3 PUSH1 0x4 DUP2 LT PUSH2 0xFE JUMPI INVALID JUMPDEST DUP3 MLOAD SWAP2 ADD DUP1 SLOAD PUSH1 0x20 DUP5 ADD MLOAD PUSH1 0x40 DUP6 ADD MLOAD PUSH1 0x60 SWAP1 SWAP6 ADD MLOAD ISZERO ISZERO PUSH1 0x1 PUSH1 0xF8 SHL MUL PUSH1 0x1 PUSH1 0x1 PUSH1 0xF8 SHL SUB PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP7 AND PUSH12 0x10000000000000000000000 MUL PUSH1 0x1 PUSH1 0x58 SHL PUSH1 0x1 PUSH1 0xF8 SHL SUB NOT PUSH1 0x6 SWAP4 SWAP1 SWAP4 SIGNEXTEND PUSH7 0xFFFFFFFFFFFFFF AND PUSH5 0x100000000 MUL PUSH7 0xFFFFFFFFFFFFFF PUSH1 0x20 SHL NOT PUSH4 0xFFFFFFFF SWAP1 SWAP8 AND PUSH4 0xFFFFFFFF NOT SWAP1 SWAP6 AND SWAP5 SWAP1 SWAP5 OR SWAP6 SWAP1 SWAP6 AND SWAP3 SWAP1 SWAP3 OR AND SWAP3 SWAP1 SWAP3 OR SWAP3 SWAP1 SWAP3 AND OR SWAP1 SSTORE PUSH1 0x1 ADD PUSH2 0x6B JUMP JUMPDEST POP PUSH1 0x4 DUP1 SLOAD PUSH3 0xFFFFFF NOT AND PUSH3 0xFFFFFF PUSH1 0x2 SWAP8 SWAP1 SWAP8 SIGNEXTEND SWAP7 SWAP1 SWAP7 AND SWAP6 SWAP1 SWAP6 OR PUSH5 0xFFFF000000 NOT AND PUSH4 0x1000000 PUSH2 0xFFFF SWAP6 DUP7 AND MUL OR PUSH2 0xFFFF PUSH1 0x28 SHL NOT AND PUSH6 0x10000000000 SWAP4 SWAP1 SWAP5 AND SWAP3 SWAP1 SWAP3 MUL SWAP3 SWAP1 SWAP3 OR PUSH1 0xFF PUSH1 0xB8 SHL NOT AND PUSH1 0x1 PUSH1 0xB8 SHL SWAP3 ISZERO ISZERO SWAP3 SWAP1 SWAP3 MUL SWAP2 SWAP1 SWAP2 OR PUSH1 0x1 PUSH1 0x38 SHL PUSH1 0x1 PUSH1 0xB8 SHL SUB NOT AND PUSH8 0x100000000000000 PUSH1 0x1 PUSH1 0x1 PUSH1 0x80 SHL SUB SWAP3 SWAP1 SWAP3 AND SWAP2 SWAP1 SWAP2 MUL OR SWAP1 SSTORE POP PUSH2 0x2B5 SWAP3 POP DUP3 SWAP2 POP PUSH2 0x23F SWAP1 POP PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x41 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x1A686502 EQ PUSH2 0x46 JUMPI DUP1 PUSH4 0x252C09D7 EQ PUSH2 0x73 JUMPI DUP1 PUSH4 0x3850C7BD EQ PUSH2 0xD7 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x4E PUSH2 0x13D JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH16 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP1 SWAP3 AND DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH2 0x90 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x89 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH2 0x160 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH4 0xFFFFFFFF SWAP1 SWAP6 AND DUP6 MSTORE PUSH1 0x6 SWAP4 SWAP1 SWAP4 SIGNEXTEND PUSH1 0x20 DUP6 ADD MSTORE PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP1 SWAP2 AND DUP4 DUP4 ADD MSTORE ISZERO ISZERO PUSH1 0x60 DUP4 ADD MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x80 ADD SWAP1 RETURN JUMPDEST PUSH2 0xDF PUSH2 0x27A JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP1 SWAP9 AND DUP9 MSTORE PUSH1 0x2 SWAP7 SWAP1 SWAP7 SIGNEXTEND PUSH1 0x20 DUP9 ADD MSTORE PUSH2 0xFFFF SWAP5 DUP6 AND DUP8 DUP8 ADD MSTORE SWAP3 DUP5 AND PUSH1 0x60 DUP8 ADD MSTORE SWAP3 AND PUSH1 0x80 DUP6 ADD MSTORE PUSH1 0xFF SWAP1 SWAP2 AND PUSH1 0xA0 DUP5 ADD MSTORE ISZERO ISZERO PUSH1 0xC0 DUP4 ADD MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0xE0 ADD SWAP1 RETURN JUMPDEST PUSH1 0x4 SLOAD PUSH8 0x100000000000000 SWAP1 DIV PUSH16 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 DUP7 PUSH1 0x4 DUP2 LT PUSH2 0x174 JUMPI INVALID JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x80 DUP2 ADD DUP3 MSTORE SWAP3 SWAP1 SWAP2 ADD SLOAD PUSH4 0xFFFFFFFF DUP2 AND DUP4 MSTORE PUSH5 0x100000000 DUP2 DIV PUSH1 0x6 SWAP1 DUP2 SIGNEXTEND DUP2 SIGNEXTEND SWAP1 SIGNEXTEND PUSH1 0x20 DUP5 ADD MSTORE PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH12 0x10000000000000000000000 DUP3 DIV AND SWAP2 DUP4 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0xFF PUSH32 0x100000000000000000000000000000000000000000000000000000000000000 SWAP1 SWAP2 DIV DUP2 AND ISZERO ISZERO PUSH1 0x60 DUP4 ADD MSTORE PUSH1 0x4 SLOAD SWAP2 SWAP3 POP PUSH24 0x10000000000000000000000000000000000000000000000 SWAP1 SWAP2 DIV AND ISZERO PUSH2 0x259 JUMPI DUP1 MLOAD PUSH1 0x4 DUP1 SLOAD PUSH1 0x0 SWAP2 PUSH6 0x10000000000 SWAP1 SWAP2 DIV PUSH2 0xFFFF AND SWAP1 DUP2 LT PUSH2 0x245 JUMPI INVALID JUMPDEST ADD SLOAD PUSH4 0xFFFFFFFF SWAP1 DUP2 AND SWAP2 SWAP1 SWAP2 SUB TIMESTAMP SUB AND DUP2 MSTORE JUMPDEST DUP1 MLOAD PUSH1 0x20 DUP3 ADD MLOAD PUSH1 0x40 DUP4 ADD MLOAD PUSH1 0x60 SWAP1 SWAP4 ADD MLOAD SWAP2 SWAP9 SWAP1 SWAP8 POP SWAP2 SWAP6 POP SWAP4 POP SWAP2 POP POP JUMP JUMPDEST PUSH1 0x4 SLOAD PUSH1 0x0 SWAP1 PUSH1 0x2 DUP2 SWAP1 SIGNEXTEND SWAP1 PUSH2 0xFFFF PUSH6 0x10000000000 DUP3 DIV DUP2 AND SWAP2 PUSH4 0x1000000 SWAP1 DIV AND DUP4 DUP1 DUP1 SWAP2 SWAP3 SWAP4 SWAP5 SWAP6 SWAP7 JUMP INVALID LOG1 PUSH5 0x736F6C6343 STOP SMOD MOD STOP EXP ","sourceMap":"181:2135:1:-:0;;;465:1021;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;465:1021:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;854:9;849:381;873:23;869:1;:27;849:381;;;941:278;;;;;;;;994:16;1011:1;994:19;;;;;;;;;;;941:278;;;;;;1047:16;1064:1;1047:19;;;;;;;;;;;941:278;;;;;;1119:35;1155:1;1119:38;;;;;;;;;;;-1:-1:-1;;;;;941:278:1;-1:-1:-1;;;;;941:278:1;;;;;1188:13;1202:1;1188:16;;;;;;;;;;;941:278;;;;917:18;936:1;917:21;;;;;;;:302;;:21;;:302;;;;;;;;;;;;;;;;;-1:-1:-1;;;917:302:1;-1:-1:-1;;;;;;;;;;917:302:1;;;;;-1:-1:-1;;;;;;;;917:302:1;;;;;;;;;-1:-1:-1;;;;917:302:1;;;;-1:-1:-1;;917:302:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;898:3;849:381;;;-1:-1:-1;1240:9:1;:17;;-1:-1:-1;;1240:17:1;;;;;;;;;;;;;;;-1:-1:-1;;1267:53:1;;;;;;;;-1:-1:-1;;;;1330:41:1;;;;;;;;;;;;;;-1:-1:-1;;;;1381:66:1;-1:-1:-1;;;1381:66:1;;;;;;;;;;;-1:-1:-1;;;;;;;;1457:22:1;;-1:-1:-1;;;;;1457:22:1;;;;;;;;;;;-1:-1:-1;181:2135:1;;-1:-1:-1;181:2135:1;;-1:-1:-1;181:2135:1;;-1:-1:-1;;181:2135:1;;"},"deployedBytecode":{"generatedSources":[],"immutableReferences":{},"linkReferences":{},"object":"608060405234801561001057600080fd5b50600436106100415760003560e01c80631a68650214610046578063252c09d7146100735780633850c7bd146100d7575b600080fd5b61004e61013d565b604080516fffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6100906004803603602081101561008957600080fd5b5035610160565b6040805163ffffffff909516855260069390930b602085015273ffffffffffffffffffffffffffffffffffffffff9091168383015215156060830152519081900360800190f35b6100df61027a565b6040805173ffffffffffffffffffffffffffffffffffffffff909816885260029690960b602088015261ffff9485168787015292841660608701529216608085015260ff90911660a0840152151560c0830152519081900360e00190f35b60045467010000000000000090046fffffffffffffffffffffffffffffffff1681565b600080600080600080866004811061017457fe5b60408051608081018252929091015463ffffffff811683526401000000008104600690810b810b900b602084015273ffffffffffffffffffffffffffffffffffffffff6b0100000000000000000000008204169183019190915260ff7f0100000000000000000000000000000000000000000000000000000000000000909104811615156060830152600454919250770100000000000000000000000000000000000000000000009091041615610259578051600480546000916501000000000090910461ffff1690811061024557fe5b015463ffffffff9081169190910342031681525b80516020820151604083015160609093015191989097509195509350915050565b600454600090600281900b9061ffff650100000000008204811691630100000090041683808091929394959656fea164736f6c6343000706000a","opcodes":"PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x41 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x1A686502 EQ PUSH2 0x46 JUMPI DUP1 PUSH4 0x252C09D7 EQ PUSH2 0x73 JUMPI DUP1 PUSH4 0x3850C7BD EQ PUSH2 0xD7 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x4E PUSH2 0x13D JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH16 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP1 SWAP3 AND DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH2 0x90 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x89 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH2 0x160 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH4 0xFFFFFFFF SWAP1 SWAP6 AND DUP6 MSTORE PUSH1 0x6 SWAP4 SWAP1 SWAP4 SIGNEXTEND PUSH1 0x20 DUP6 ADD MSTORE PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP1 SWAP2 AND DUP4 DUP4 ADD MSTORE ISZERO ISZERO PUSH1 0x60 DUP4 ADD MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x80 ADD SWAP1 RETURN JUMPDEST PUSH2 0xDF PUSH2 0x27A JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP1 SWAP9 AND DUP9 MSTORE PUSH1 0x2 SWAP7 SWAP1 SWAP7 SIGNEXTEND PUSH1 0x20 DUP9 ADD MSTORE PUSH2 0xFFFF SWAP5 DUP6 AND DUP8 DUP8 ADD MSTORE SWAP3 DUP5 AND PUSH1 0x60 DUP8 ADD MSTORE SWAP3 AND PUSH1 0x80 DUP6 ADD MSTORE PUSH1 0xFF SWAP1 SWAP2 AND PUSH1 0xA0 DUP5 ADD MSTORE ISZERO ISZERO PUSH1 0xC0 DUP4 ADD MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0xE0 ADD SWAP1 RETURN JUMPDEST PUSH1 0x4 SLOAD PUSH8 0x100000000000000 SWAP1 DIV PUSH16 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 PUSH1 0x0 DUP1 DUP7 PUSH1 0x4 DUP2 LT PUSH2 0x174 JUMPI INVALID JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x80 DUP2 ADD DUP3 MSTORE SWAP3 SWAP1 SWAP2 ADD SLOAD PUSH4 0xFFFFFFFF DUP2 AND DUP4 MSTORE PUSH5 0x100000000 DUP2 DIV PUSH1 0x6 SWAP1 DUP2 SIGNEXTEND DUP2 SIGNEXTEND SWAP1 SIGNEXTEND PUSH1 0x20 DUP5 ADD MSTORE PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH12 0x10000000000000000000000 DUP3 DIV AND SWAP2 DUP4 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0xFF PUSH32 0x100000000000000000000000000000000000000000000000000000000000000 SWAP1 SWAP2 DIV DUP2 AND ISZERO ISZERO PUSH1 0x60 DUP4 ADD MSTORE PUSH1 0x4 SLOAD SWAP2 SWAP3 POP PUSH24 0x10000000000000000000000000000000000000000000000 SWAP1 SWAP2 DIV AND ISZERO PUSH2 0x259 JUMPI DUP1 MLOAD PUSH1 0x4 DUP1 SLOAD PUSH1 0x0 SWAP2 PUSH6 0x10000000000 SWAP1 SWAP2 DIV PUSH2 0xFFFF AND SWAP1 DUP2 LT PUSH2 0x245 JUMPI INVALID JUMPDEST ADD SLOAD PUSH4 0xFFFFFFFF SWAP1 DUP2 AND SWAP2 SWAP1 SWAP2 SUB TIMESTAMP SUB AND DUP2 MSTORE JUMPDEST DUP1 MLOAD PUSH1 0x20 DUP3 ADD MLOAD PUSH1 0x40 DUP4 ADD MLOAD PUSH1 0x60 SWAP1 SWAP4 ADD MLOAD SWAP2 SWAP9 SWAP1 SWAP8 POP SWAP2 SWAP6 POP SWAP4 POP SWAP2 POP POP JUMP JUMPDEST PUSH1 0x4 SLOAD PUSH1 0x0 SWAP1 PUSH1 0x2 DUP2 SWAP1 SIGNEXTEND SWAP1 PUSH2 0xFFFF PUSH6 0x10000000000 DUP3 DIV DUP2 AND SWAP2 PUSH4 0x1000000 SWAP1 DIV AND DUP4 DUP1 DUP1 SWAP2 SWAP3 SWAP4 SWAP5 SWAP6 SWAP7 JUMP INVALID LOG1 PUSH5 0x736F6C6343 STOP SMOD MOD STOP EXP ","sourceMap":"181:2135:1:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;382:24;;;:::i;:::-;;;;;;;;;;;;;;;;;;;1694:620;;;;;;;;;;;;;;;;-1:-1:-1;1694:620:1;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1492:196;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;382:24;;;;;;;;;:::o;1694:620::-;1754:6;1762:5;1769:7;1778:4;1794:37;1834:18;1853:5;1834:25;;;;;;;1794:65;;;;;;;;1834:25;;;;1794:65;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1873:31;1794:65;;-1:-1:-1;1873:31:1;;;;;1869:236;;;2067:26;;2027:21;;;2067:26;;2027:21;;;;;;;2008:41;;;;;;;:56;;;;;:85;;;;1972:15;1965:129;1920:174;;;1869:236;2135:26;;2175;;;;2215:45;;;;2274:23;;;;;2135:26;;2175;;-1:-1:-1;2215:45:1;;-1:-1:-1;2274:23:1;-1:-1:-1;1694:620:1;-1:-1:-1;;1694:620:1:o;1492:196::-;1606:9;;1532:7;;1606:9;;;;;1617:21;;;;;;;1640:27;;;;1532:7;;;1492:196;;;;;;:::o"},"methodIdentifiers":{"liquidity()":"1a686502","observations(uint256)":"252c09d7","slot0()":"3850c7bd"}},"metadata":"{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint32[4]\",\"name\":\"_blockTimestamps\",\"type\":\"uint32[4]\"},{\"internalType\":\"int56[4]\",\"name\":\"_tickCumulatives\",\"type\":\"int56[4]\"},{\"internalType\":\"uint128[4]\",\"name\":\"_secondsPerLiquidityCumulativeX128s\",\"type\":\"uint128[4]\"},{\"internalType\":\"bool[4]\",\"name\":\"_initializeds\",\"type\":\"bool[4]\"},{\"internalType\":\"int24\",\"name\":\"_tick\",\"type\":\"int24\"},{\"internalType\":\"uint16\",\"name\":\"_observationCardinality\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"_observationIndex\",\"type\":\"uint16\"},{\"internalType\":\"bool\",\"name\":\"_lastObservationCurrentTimestamp\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"_liquidity\",\"type\":\"uint128\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"liquidity\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"observations\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"int56\",\"name\":\"\",\"type\":\"int56\"},{\"internalType\":\"uint160\",\"name\":\"\",\"type\":\"uint160\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"slot0\",\"outputs\":[{\"internalType\":\"uint160\",\"name\":\"\",\"type\":\"uint160\"},{\"internalType\":\"int24\",\"name\":\"\",\"type\":\"int24\"},{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"},{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/test/MockObservations.sol\":\"MockObservations\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\"},\"optimizer\":{\"enabled\":true,\"runs\":1000000},\"remappings\":[]},\"sources\":{\"@airdao/astra-cl-core/contracts/libraries/Oracle.sol\":{\"keccak256\":\"0xf15b26d5b4229bee5de2462bb1a955e62275fe7739568aae392cbea910ce939c\",\"license\":\"BUSL-1.1\",\"urls\":[\"bzz-raw://aaea6a6dcf63e757263bf6f836671d928af7dae68251afab58380c4b8723949c\",\"dweb:/ipfs/QmSHnihjgUkmwKczcyuDNGjTzS65pmnQnjBjPXBXQpv6JF\"]},\"contracts/test/MockObservations.sol\":{\"keccak256\":\"0x9390abf95feea2024c7597037327e995a771e0ea37ead5304cdcf46330812ffb\",\"license\":\"UNLICENSED\",\"urls\":[\"bzz-raw://681b33e4ce70fdb01d1ac36c69d14d595b569e6366598c97943ec8a8c15f7001\",\"dweb:/ipfs/QmexDeoCApoRikELuweGci354zFWg8dXJt8bFZqE9GVff8\"]}},\"version\":1}"}}}}}