{ "abi": [ { "inputs": [ { "internalType": "uint32[]", "name": "secondsAgos", "type": "uint32[]" } ], "name": "observe", "outputs": [ { "internalType": "int56[]", "name": "tickCumulatives", "type": "int56[]" }, { "internalType": "uint160[]", "name": "secondsPerLiquidityCumulativeX128s", "type": "uint160[]" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "int24", "name": "tickLower", "type": "int24" }, { "internalType": "int24", "name": "tickUpper", "type": "int24" } ], "name": "snapshotCumulativesInside", "outputs": [ { "internalType": "int56", "name": "tickCumulativeInside", "type": "int56" }, { "internalType": "uint160", "name": "secondsPerLiquidityInsideX128", "type": "uint160" }, { "internalType": "uint32", "name": "secondsInside", "type": "uint32" } ], "stateMutability": "view", "type": "function" } ], "bytecode": { "object": "0x", "sourceMap": "", "linkReferences": {} }, "deployedBytecode": { "object": "0x", "sourceMap": "", "linkReferences": {} }, "methodIdentifiers": { "observe(uint32[])": "883bdbfd", "snapshotCumulativesInside(int24,int24)": "a38807f2" }, "rawMetadata": "{\"compiler\":{\"version\":\"0.8.22+commit.4fc1097e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint32[]\",\"name\":\"secondsAgos\",\"type\":\"uint32[]\"}],\"name\":\"observe\",\"outputs\":[{\"internalType\":\"int56[]\",\"name\":\"tickCumulatives\",\"type\":\"int56[]\"},{\"internalType\":\"uint160[]\",\"name\":\"secondsPerLiquidityCumulativeX128s\",\"type\":\"uint160[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"int24\",\"name\":\"tickLower\",\"type\":\"int24\"},{\"internalType\":\"int24\",\"name\":\"tickUpper\",\"type\":\"int24\"}],\"name\":\"snapshotCumulativesInside\",\"outputs\":[{\"internalType\":\"int56\",\"name\":\"tickCumulativeInside\",\"type\":\"int56\"},{\"internalType\":\"uint160\",\"name\":\"secondsPerLiquidityInsideX128\",\"type\":\"uint160\"},{\"internalType\":\"uint32\",\"name\":\"secondsInside\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"observe(uint32[])\":{\"details\":\"To get a time weighted average tick or liquidity-in-range, you must call this with two values, one representing the beginning of the period and another for the end of the period. E.g., to get the last hour time-weighted average tick, you must call it with secondsAgos = [3600, 0].The time weighted average tick represents the geometric time weighted average price of the pool, in log base sqrt(1.0001) of token1 / token0. The TickMath library can be used to go from a tick value to a ratio.\",\"params\":{\"secondsAgos\":\"From how long ago each cumulative tick and liquidity value should be returned\"},\"returns\":{\"secondsPerLiquidityCumulativeX128s\":\"Cumulative seconds per liquidity-in-range value as of each `secondsAgos` from the current block timestamp\",\"tickCumulatives\":\"Cumulative tick values as of each `secondsAgos` from the current block timestamp\"}},\"snapshotCumulativesInside(int24,int24)\":{\"details\":\"Snapshots must only be compared to other snapshots, taken over a period for which a position existed. I.e., snapshots cannot be compared if a position is not held for the entire period between when the first snapshot is taken and the second snapshot is taken.\",\"params\":{\"tickLower\":\"The lower tick of the range\",\"tickUpper\":\"The upper tick of the range\"},\"returns\":{\"secondsInside\":\"The snapshot of seconds per liquidity for the range\",\"secondsPerLiquidityInsideX128\":\"The snapshot of seconds per liquidity for the range\",\"tickCumulativeInside\":\"The snapshot of the tick accumulator for the range\"}}},\"title\":\"Pool state that is not stored\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"observe(uint32[])\":{\"notice\":\"Returns the cumulative tick and liquidity as of each timestamp `secondsAgo` from the current block timestamp\"},\"snapshotCumulativesInside(int24,int24)\":{\"notice\":\"Returns a snapshot of the tick cumulative, seconds per liquidity and seconds inside a tick range\"}},\"notice\":\"Contains view functions to provide information about the pool that is computed rather than stored on the blockchain. The functions here may have variable gas costs.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"lib_uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolDerivedState.sol\":\"IUniswapV3PoolDerivedState\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"details\":{\"constantOptimizer\":true,\"cse\":true,\"deduplicate\":true,\"inliner\":true,\"jumpdestRemover\":true,\"orderLiterals\":true,\"peephole\":true,\"simpleCounterForLoopUncheckedIncrement\":true,\"yul\":true,\"yulDetails\":{\"optimizerSteps\":\"dhfoD[xarrscLMcCTU]uljmul:fDnTOcmu\",\"stackAllocation\":true}},\"runs\":999999999},\"remappings\":[\":@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/\",\":@uniswap/v3-core/=lib_uniswap/v3-core/\",\":@uniswap/v3-periphery/=lib_uniswap/v3-periphery/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":forge-std/=lib/forge-std/src/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":v3-core/=lib_uniswap/v3-core/\",\":v3-periphery/libraries/=lib_uniswap/v3-periphery/contracts/libraries/\"]},\"sources\":{\"lib_uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolDerivedState.sol\":{\"keccak256\":\"0xe603ac5b17ecdee73ba2b27efdf386c257a19c14206e87eee77e2017b742d9e5\",\"license\":\"GPL-2.0-or-later\",\"urls\":[\"bzz-raw://8febc9bdb399a4d94bb89f5377732652e2400e4a8dee808201ade6848f9004e7\",\"dweb:/ipfs/QmaKDqYYFU4d2W2iN77aDHptfbFmYZRrMYXHeGpJmM8C1c\"]}},\"version\":1}", "metadata": { "compiler": { "version": "0.8.22+commit.4fc1097e" }, "language": "Solidity", "output": { "abi": [ { "inputs": [ { "internalType": "uint32[]", "name": "secondsAgos", "type": "uint32[]" } ], "stateMutability": "view", "type": "function", "name": "observe", "outputs": [ { "internalType": "int56[]", "name": "tickCumulatives", "type": "int56[]" }, { "internalType": "uint160[]", "name": "secondsPerLiquidityCumulativeX128s", "type": "uint160[]" } ] }, { "inputs": [ { "internalType": "int24", "name": "tickLower", "type": "int24" }, { "internalType": "int24", "name": "tickUpper", "type": "int24" } ], "stateMutability": "view", "type": "function", "name": "snapshotCumulativesInside", "outputs": [ { "internalType": "int56", "name": "tickCumulativeInside", "type": "int56" }, { "internalType": "uint160", "name": "secondsPerLiquidityInsideX128", "type": "uint160" }, { "internalType": "uint32", "name": "secondsInside", "type": "uint32" } ] } ], "devdoc": { "kind": "dev", "methods": { "observe(uint32[])": { "details": "To get a time weighted average tick or liquidity-in-range, you must call this with two values, one representing the beginning of the period and another for the end of the period. E.g., to get the last hour time-weighted average tick, you must call it with secondsAgos = [3600, 0].The time weighted average tick represents the geometric time weighted average price of the pool, in log base sqrt(1.0001) of token1 / token0. The TickMath library can be used to go from a tick value to a ratio.", "params": { "secondsAgos": "From how long ago each cumulative tick and liquidity value should be returned" }, "returns": { "secondsPerLiquidityCumulativeX128s": "Cumulative seconds per liquidity-in-range value as of each `secondsAgos` from the current block timestamp", "tickCumulatives": "Cumulative tick values as of each `secondsAgos` from the current block timestamp" } }, "snapshotCumulativesInside(int24,int24)": { "details": "Snapshots must only be compared to other snapshots, taken over a period for which a position existed. I.e., snapshots cannot be compared if a position is not held for the entire period between when the first snapshot is taken and the second snapshot is taken.", "params": { "tickLower": "The lower tick of the range", "tickUpper": "The upper tick of the range" }, "returns": { "secondsInside": "The snapshot of seconds per liquidity for the range", "secondsPerLiquidityInsideX128": "The snapshot of seconds per liquidity for the range", "tickCumulativeInside": "The snapshot of the tick accumulator for the range" } } }, "version": 1 }, "userdoc": { "kind": "user", "methods": { "observe(uint32[])": { "notice": "Returns the cumulative tick and liquidity as of each timestamp `secondsAgo` from the current block timestamp" }, "snapshotCumulativesInside(int24,int24)": { "notice": "Returns a snapshot of the tick cumulative, seconds per liquidity and seconds inside a tick range" } }, "version": 1 } }, "settings": { "remappings": [ "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/", "@uniswap/v3-core/=lib_uniswap/v3-core/", "@uniswap/v3-periphery/=lib_uniswap/v3-periphery/", "ds-test/=lib/forge-std/lib/ds-test/src/", "forge-std/=lib/forge-std/src/", "openzeppelin-contracts/=lib/openzeppelin-contracts/", "v3-core/=lib_uniswap/v3-core/", "v3-periphery/libraries/=lib_uniswap/v3-periphery/contracts/libraries/" ], "optimizer": { "runs": 999999999, "details": { "peephole": true, "inliner": true, "jumpdestRemover": true, "orderLiterals": true, "deduplicate": true, "cse": true, "constantOptimizer": true, "yul": true, "yulDetails": { "stackAllocation": true, "optimizerSteps": "dhfoD[xarrscLMcCTU]uljmul:fDnTOcmu" } } }, "metadata": { "bytecodeHash": "ipfs" }, "compilationTarget": { "lib_uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolDerivedState.sol": "IUniswapV3PoolDerivedState" }, "libraries": {} }, "sources": { "lib_uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolDerivedState.sol": { "keccak256": "0xe603ac5b17ecdee73ba2b27efdf386c257a19c14206e87eee77e2017b742d9e5", "urls": [ "bzz-raw://8febc9bdb399a4d94bb89f5377732652e2400e4a8dee808201ade6848f9004e7", "dweb:/ipfs/QmaKDqYYFU4d2W2iN77aDHptfbFmYZRrMYXHeGpJmM8C1c" ], "license": "GPL-2.0-or-later" } }, "version": 1 }, "ast": { "absolutePath": "lib_uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolDerivedState.sol", "id": 44036, "exportedSymbols": { "IUniswapV3PoolDerivedState": [ 44035 ] }, "nodeType": "SourceUnit", "src": "45:2557:31", "nodes": [ { "id": 44006, "nodeType": "PragmaDirective", "src": "45:24:31", "nodes": [], "literals": [ "solidity", ">=", "0.5", ".0" ] }, { "id": 44035, "nodeType": "ContractDefinition", "src": "293:2308:31", "nodes": [ { "id": 44020, "nodeType": "FunctionDefinition", "src": "1386:180:31", "nodes": [], "documentation": { "id": 44008, "nodeType": "StructuredDocumentation", "src": "336:1045:31", "text": "@notice Returns the cumulative tick and liquidity as of each timestamp `secondsAgo` from the current block timestamp\n @dev To get a time weighted average tick or liquidity-in-range, you must call this with two values, one representing\n the beginning of the period and another for the end of the period. E.g., to get the last hour time-weighted average tick,\n you must call it with secondsAgos = [3600, 0].\n @dev The time weighted average tick represents the geometric time weighted average price of the pool, in\n log base sqrt(1.0001) of token1 / token0. The TickMath library can be used to go from a tick value to a ratio.\n @param secondsAgos From how long ago each cumulative tick and liquidity value should be returned\n @return tickCumulatives Cumulative tick values as of each `secondsAgos` from the current block timestamp\n @return secondsPerLiquidityCumulativeX128s Cumulative seconds per liquidity-in-range value as of each `secondsAgos` from the current block\n timestamp" }, "functionSelector": "883bdbfd", "implemented": false, "kind": "function", "modifiers": [], "name": "observe", "nameLocation": "1395:7:31", "parameters": { "id": 44012, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 44011, "mutability": "mutable", "name": "secondsAgos", "nameLocation": "1421:11:31", "nodeType": "VariableDeclaration", "scope": 44020, "src": "1403:29:31", "stateVariable": false, "storageLocation": "calldata", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint32_$dyn_calldata_ptr", "typeString": "uint32[]" }, "typeName": { "baseType": { "id": 44009, "name": "uint32", "nodeType": "ElementaryTypeName", "src": "1403:6:31", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" } }, "id": 44010, "nodeType": "ArrayTypeName", "src": "1403:8:31", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint32_$dyn_storage_ptr", "typeString": "uint32[]" } }, "visibility": "internal" } ], "src": "1402:31:31" }, "returnParameters": { "id": 44019, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 44015, "mutability": "mutable", "name": "tickCumulatives", "nameLocation": "1496:15:31", "nodeType": "VariableDeclaration", "scope": 44020, "src": "1481:30:31", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_array$_t_int56_$dyn_memory_ptr", "typeString": "int56[]" }, "typeName": { "baseType": { "id": 44013, "name": "int56", "nodeType": "ElementaryTypeName", "src": "1481:5:31", "typeDescriptions": { "typeIdentifier": "t_int56", "typeString": "int56" } }, "id": 44014, "nodeType": "ArrayTypeName", "src": "1481:7:31", "typeDescriptions": { "typeIdentifier": "t_array$_t_int56_$dyn_storage_ptr", "typeString": "int56[]" } }, "visibility": "internal" }, { "constant": false, "id": 44018, "mutability": "mutable", "name": "secondsPerLiquidityCumulativeX128s", "nameLocation": "1530:34:31", "nodeType": "VariableDeclaration", "scope": 44020, "src": "1513:51:31", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint160_$dyn_memory_ptr", "typeString": "uint160[]" }, "typeName": { "baseType": { "id": 44016, "name": "uint160", "nodeType": "ElementaryTypeName", "src": "1513:7:31", "typeDescriptions": { "typeIdentifier": "t_uint160", "typeString": "uint160" } }, "id": 44017, "nodeType": "ArrayTypeName", "src": "1513:9:31", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint160_$dyn_storage_ptr", "typeString": "uint160[]" } }, "visibility": "internal" } ], "src": "1480:85:31" }, "scope": 44035, "stateMutability": "view", "virtual": false, "visibility": "external" }, { "id": 44034, "nodeType": "FunctionDefinition", "src": "2348:251:31", "nodes": [], "documentation": { "id": 44021, "nodeType": "StructuredDocumentation", "src": "1572:771:31", "text": "@notice Returns a snapshot of the tick cumulative, seconds per liquidity and seconds inside a tick range\n @dev Snapshots must only be compared to other snapshots, taken over a period for which a position existed.\n I.e., snapshots cannot be compared if a position is not held for the entire period between when the first\n snapshot is taken and the second snapshot is taken.\n @param tickLower The lower tick of the range\n @param tickUpper The upper tick of the range\n @return tickCumulativeInside The snapshot of the tick accumulator for the range\n @return secondsPerLiquidityInsideX128 The snapshot of seconds per liquidity for the range\n @return secondsInside The snapshot of seconds per liquidity for the range" }, "functionSelector": "a38807f2", "implemented": false, "kind": "function", "modifiers": [], "name": "snapshotCumulativesInside", "nameLocation": "2357:25:31", "parameters": { "id": 44026, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 44023, "mutability": "mutable", "name": "tickLower", "nameLocation": "2389:9:31", "nodeType": "VariableDeclaration", "scope": 44034, "src": "2383:15:31", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_int24", "typeString": "int24" }, "typeName": { "id": 44022, "name": "int24", "nodeType": "ElementaryTypeName", "src": "2383:5:31", "typeDescriptions": { "typeIdentifier": "t_int24", "typeString": "int24" } }, "visibility": "internal" }, { "constant": false, "id": 44025, "mutability": "mutable", "name": "tickUpper", "nameLocation": "2406:9:31", "nodeType": "VariableDeclaration", "scope": 44034, "src": "2400:15:31", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_int24", "typeString": "int24" }, "typeName": { "id": 44024, "name": "int24", "nodeType": "ElementaryTypeName", "src": "2400:5:31", "typeDescriptions": { "typeIdentifier": "t_int24", "typeString": "int24" } }, "visibility": "internal" } ], "src": "2382:34:31" }, "returnParameters": { "id": 44033, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 44028, "mutability": "mutable", "name": "tickCumulativeInside", "nameLocation": "2483:20:31", "nodeType": "VariableDeclaration", "scope": 44034, "src": "2477:26:31", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_int56", "typeString": "int56" }, "typeName": { "id": 44027, "name": "int56", "nodeType": "ElementaryTypeName", "src": "2477:5:31", "typeDescriptions": { "typeIdentifier": "t_int56", "typeString": "int56" } }, "visibility": "internal" }, { "constant": false, "id": 44030, "mutability": "mutable", "name": "secondsPerLiquidityInsideX128", "nameLocation": "2525:29:31", "nodeType": "VariableDeclaration", "scope": 44034, "src": "2517:37:31", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint160", "typeString": "uint160" }, "typeName": { "id": 44029, "name": "uint160", "nodeType": "ElementaryTypeName", "src": "2517:7:31", "typeDescriptions": { "typeIdentifier": "t_uint160", "typeString": "uint160" } }, "visibility": "internal" }, { "constant": false, "id": 44032, "mutability": "mutable", "name": "secondsInside", "nameLocation": "2575:13:31", "nodeType": "VariableDeclaration", "scope": 44034, "src": "2568:20:31", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" }, "typeName": { "id": 44031, "name": "uint32", "nodeType": "ElementaryTypeName", "src": "2568:6:31", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" } }, "visibility": "internal" } ], "src": "2463:135:31" }, "scope": 44035, "stateMutability": "view", "virtual": false, "visibility": "external" } ], "abstract": false, "baseContracts": [], "canonicalName": "IUniswapV3PoolDerivedState", "contractDependencies": [], "contractKind": "interface", "documentation": { "id": 44007, "nodeType": "StructuredDocumentation", "src": "71:222:31", "text": "@title Pool state that is not stored\n @notice Contains view functions to provide information about the pool that is computed rather than stored on the\n blockchain. The functions here may have variable gas costs." }, "fullyImplemented": false, "linearizedBaseContracts": [ 44035 ], "name": "IUniswapV3PoolDerivedState", "nameLocation": "303:26:31", "scope": 44036, "usedErrors": [], "usedEvents": [] } ], "license": "GPL-2.0-or-later" }, "id": 31 }