UNPKG

moonwalkerswap-v1-core

Version:
857 lines 40.1 kB
{ "contractName": "IMoonwalkerPoolDerivedState", "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" } ], "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"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\":{\"/Users/warrenmason/Documents/UniswapV3Contracts/Core/LiveContracts/MoonwalkerSwap-v1-Core/contracts/interfaces/pool/IMoonwalkerPoolDerivedState.sol\":\"IMoonwalkerPoolDerivedState\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/warrenmason/Documents/UniswapV3Contracts/Core/LiveContracts/MoonwalkerSwap-v1-Core/contracts/interfaces/pool/IMoonwalkerPoolDerivedState.sol\":{\"keccak256\":\"0xdc30625cd50851cca3ce8898c1368c47d12749078132e28802c28213723767fe\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://bcf5c236dc728b42471b31cede6a34e49f3a2e5af813a62325d586dc3ed4da83\",\"dweb:/ipfs/Qmd2yDp6v1c7jgzYq7VSjrrDjUNfXs4ms4cKCiCyEQqpyS\"]}},\"version\":1}", "bytecode": "0x", "deployedBytecode": "0x", "immutableReferences": {}, "generatedSources": [], "deployedGeneratedSources": [], "sourceMap": "", "deployedSourceMap": "", "source": "// SPDX-License-Identifier: MIT\npragma solidity >=0.5.0;\n\n/// @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.\ninterface IMoonwalkerPoolDerivedState {\n /// @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\n function observe(uint32[] calldata secondsAgos)\n external\n view\n returns (int56[] memory tickCumulatives, uint160[] memory secondsPerLiquidityCumulativeX128s);\n\n /// @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\n function snapshotCumulativesInside(int24 tickLower, int24 tickUpper)\n external\n view\n returns (\n int56 tickCumulativeInside,\n uint160 secondsPerLiquidityInsideX128,\n uint32 secondsInside\n );\n}\n", "sourcePath": "/Users/warrenmason/Documents/UniswapV3Contracts/Core/LiveContracts/MoonwalkerSwap-v1-Core/contracts/interfaces/pool/IMoonwalkerPoolDerivedState.sol", "ast": { "absolutePath": "/Users/warrenmason/Documents/UniswapV3Contracts/Core/LiveContracts/MoonwalkerSwap-v1-Core/contracts/interfaces/pool/IMoonwalkerPoolDerivedState.sol", "exportedSymbols": { "IMoonwalkerPoolDerivedState": [ 3228 ] }, "id": 3229, "license": "MIT", "nodeType": "SourceUnit", "nodes": [ { "id": 3199, "literals": [ "solidity", ">=", "0.5", ".0" ], "nodeType": "PragmaDirective", "src": "32:24:12" }, { "abstract": false, "baseContracts": [], "contractDependencies": [], "contractKind": "interface", "documentation": { "id": 3200, "nodeType": "StructuredDocumentation", "src": "58:222:12", "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, "id": 3228, "linearizedBaseContracts": [ 3228 ], "name": "IMoonwalkerPoolDerivedState", "nodeType": "ContractDefinition", "nodes": [ { "documentation": { "id": 3201, "nodeType": "StructuredDocumentation", "src": "324:1045:12", "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", "id": 3213, "implemented": false, "kind": "function", "modifiers": [], "name": "observe", "nodeType": "FunctionDefinition", "parameters": { "id": 3205, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 3204, "mutability": "mutable", "name": "secondsAgos", "nodeType": "VariableDeclaration", "scope": 3213, "src": "1391:29:12", "stateVariable": false, "storageLocation": "calldata", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint32_$dyn_calldata_ptr", "typeString": "uint32[]" }, "typeName": { "baseType": { "id": 3202, "name": "uint32", "nodeType": "ElementaryTypeName", "src": "1391:6:12", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" } }, "id": 3203, "nodeType": "ArrayTypeName", "src": "1391:8:12", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint32_$dyn_storage_ptr", "typeString": "uint32[]" } }, "visibility": "internal" } ], "src": "1390:31:12" }, "returnParameters": { "id": 3212, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 3208, "mutability": "mutable", "name": "tickCumulatives", "nodeType": "VariableDeclaration", "scope": 3213, "src": "1469:30:12", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_array$_t_int56_$dyn_memory_ptr", "typeString": "int56[]" }, "typeName": { "baseType": { "id": 3206, "name": "int56", "nodeType": "ElementaryTypeName", "src": "1469:5:12", "typeDescriptions": { "typeIdentifier": "t_int56", "typeString": "int56" } }, "id": 3207, "nodeType": "ArrayTypeName", "src": "1469:7:12", "typeDescriptions": { "typeIdentifier": "t_array$_t_int56_$dyn_storage_ptr", "typeString": "int56[]" } }, "visibility": "internal" }, { "constant": false, "id": 3211, "mutability": "mutable", "name": "secondsPerLiquidityCumulativeX128s", "nodeType": "VariableDeclaration", "scope": 3213, "src": "1501:51:12", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint160_$dyn_memory_ptr", "typeString": "uint160[]" }, "typeName": { "baseType": { "id": 3209, "name": "uint160", "nodeType": "ElementaryTypeName", "src": "1501:7:12", "typeDescriptions": { "typeIdentifier": "t_uint160", "typeString": "uint160" } }, "id": 3210, "nodeType": "ArrayTypeName", "src": "1501:9:12", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint160_$dyn_storage_ptr", "typeString": "uint160[]" } }, "visibility": "internal" } ], "src": "1468:85:12" }, "scope": 3228, "src": "1374:180:12", "stateMutability": "view", "virtual": false, "visibility": "external" }, { "documentation": { "id": 3214, "nodeType": "StructuredDocumentation", "src": "1560:771:12", "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", "id": 3227, "implemented": false, "kind": "function", "modifiers": [], "name": "snapshotCumulativesInside", "nodeType": "FunctionDefinition", "parameters": { "id": 3219, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 3216, "mutability": "mutable", "name": "tickLower", "nodeType": "VariableDeclaration", "scope": 3227, "src": "2371:15:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_int24", "typeString": "int24" }, "typeName": { "id": 3215, "name": "int24", "nodeType": "ElementaryTypeName", "src": "2371:5:12", "typeDescriptions": { "typeIdentifier": "t_int24", "typeString": "int24" } }, "visibility": "internal" }, { "constant": false, "id": 3218, "mutability": "mutable", "name": "tickUpper", "nodeType": "VariableDeclaration", "scope": 3227, "src": "2388:15:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_int24", "typeString": "int24" }, "typeName": { "id": 3217, "name": "int24", "nodeType": "ElementaryTypeName", "src": "2388:5:12", "typeDescriptions": { "typeIdentifier": "t_int24", "typeString": "int24" } }, "visibility": "internal" } ], "src": "2370:34:12" }, "returnParameters": { "id": 3226, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 3221, "mutability": "mutable", "name": "tickCumulativeInside", "nodeType": "VariableDeclaration", "scope": 3227, "src": "2465:26:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_int56", "typeString": "int56" }, "typeName": { "id": 3220, "name": "int56", "nodeType": "ElementaryTypeName", "src": "2465:5:12", "typeDescriptions": { "typeIdentifier": "t_int56", "typeString": "int56" } }, "visibility": "internal" }, { "constant": false, "id": 3223, "mutability": "mutable", "name": "secondsPerLiquidityInsideX128", "nodeType": "VariableDeclaration", "scope": 3227, "src": "2505:37:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint160", "typeString": "uint160" }, "typeName": { "id": 3222, "name": "uint160", "nodeType": "ElementaryTypeName", "src": "2505:7:12", "typeDescriptions": { "typeIdentifier": "t_uint160", "typeString": "uint160" } }, "visibility": "internal" }, { "constant": false, "id": 3225, "mutability": "mutable", "name": "secondsInside", "nodeType": "VariableDeclaration", "scope": 3227, "src": "2556:20:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" }, "typeName": { "id": 3224, "name": "uint32", "nodeType": "ElementaryTypeName", "src": "2556:6:12", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" } }, "visibility": "internal" } ], "src": "2451:135:12" }, "scope": 3228, "src": "2336:251:12", "stateMutability": "view", "virtual": false, "visibility": "external" } ], "scope": 3229, "src": "280:2309:12" } ], "src": "32:2558:12" }, "legacyAST": { "attributes": { "absolutePath": "/Users/warrenmason/Documents/UniswapV3Contracts/Core/LiveContracts/MoonwalkerSwap-v1-Core/contracts/interfaces/pool/IMoonwalkerPoolDerivedState.sol", "exportedSymbols": { "IMoonwalkerPoolDerivedState": [ 3228 ] }, "license": "MIT" }, "children": [ { "attributes": { "literals": [ "solidity", ">=", "0.5", ".0" ] }, "id": 3199, "name": "PragmaDirective", "src": "32:24:12" }, { "attributes": { "abstract": false, "baseContracts": [ null ], "contractDependencies": [ null ], "contractKind": "interface", "fullyImplemented": false, "linearizedBaseContracts": [ 3228 ], "name": "IMoonwalkerPoolDerivedState", "scope": 3229 }, "children": [ { "attributes": { "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." }, "id": 3200, "name": "StructuredDocumentation", "src": "58:222:12" }, { "attributes": { "functionSelector": "883bdbfd", "implemented": false, "isConstructor": false, "kind": "function", "modifiers": [ null ], "name": "observe", "scope": 3228, "stateMutability": "view", "virtual": false, "visibility": "external" }, "children": [ { "attributes": { "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" }, "id": 3201, "name": "StructuredDocumentation", "src": "324:1045:12" }, { "children": [ { "attributes": { "constant": false, "mutability": "mutable", "name": "secondsAgos", "scope": 3213, "stateVariable": false, "storageLocation": "calldata", "type": "uint32[]", "visibility": "internal" }, "children": [ { "attributes": { "type": "uint32[]" }, "children": [ { "attributes": { "name": "uint32", "type": "uint32" }, "id": 3202, "name": "ElementaryTypeName", "src": "1391:6:12" } ], "id": 3203, "name": "ArrayTypeName", "src": "1391:8:12" } ], "id": 3204, "name": "VariableDeclaration", "src": "1391:29:12" } ], "id": 3205, "name": "ParameterList", "src": "1390:31:12" }, { "children": [ { "attributes": { "constant": false, "mutability": "mutable", "name": "tickCumulatives", "scope": 3213, "stateVariable": false, "storageLocation": "memory", "type": "int56[]", "visibility": "internal" }, "children": [ { "attributes": { "type": "int56[]" }, "children": [ { "attributes": { "name": "int56", "type": "int56" }, "id": 3206, "name": "ElementaryTypeName", "src": "1469:5:12" } ], "id": 3207, "name": "ArrayTypeName", "src": "1469:7:12" } ], "id": 3208, "name": "VariableDeclaration", "src": "1469:30:12" }, { "attributes": { "constant": false, "mutability": "mutable", "name": "secondsPerLiquidityCumulativeX128s", "scope": 3213, "stateVariable": false, "storageLocation": "memory", "type": "uint160[]", "visibility": "internal" }, "children": [ { "attributes": { "type": "uint160[]" }, "children": [ { "attributes": { "name": "uint160", "type": "uint160" }, "id": 3209, "name": "ElementaryTypeName", "src": "1501:7:12" } ], "id": 3210, "name": "ArrayTypeName", "src": "1501:9:12" } ], "id": 3211, "name": "VariableDeclaration", "src": "1501:51:12" } ], "id": 3212, "name": "ParameterList", "src": "1468:85:12" } ], "id": 3213, "name": "FunctionDefinition", "src": "1374:180:12" }, { "attributes": { "functionSelector": "a38807f2", "implemented": false, "isConstructor": false, "kind": "function", "modifiers": [ null ], "name": "snapshotCumulativesInside", "scope": 3228, "stateMutability": "view", "virtual": false, "visibility": "external" }, "children": [ { "attributes": { "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" }, "id": 3214, "name": "StructuredDocumentation", "src": "1560:771:12" }, { "children": [ { "attributes": { "constant": false, "mutability": "mutable", "name": "tickLower", "scope": 3227, "stateVariable": false, "storageLocation": "default", "type": "int24", "visibility": "internal" }, "children": [ { "attributes": { "name": "int24", "type": "int24" }, "id": 3215, "name": "ElementaryTypeName", "src": "2371:5:12" } ], "id": 3216, "name": "VariableDeclaration", "src": "2371:15:12" }, { "attributes": { "constant": false, "mutability": "mutable", "name": "tickUpper", "scope": 3227, "stateVariable": false, "storageLocation": "default", "type": "int24", "visibility": "internal" }, "children": [ { "attributes": { "name": "int24", "type": "int24" }, "id": 3217, "name": "ElementaryTypeName", "src": "2388:5:12" } ], "id": 3218, "name": "VariableDeclaration", "src": "2388:15:12" } ], "id": 3219, "name": "ParameterList", "src": "2370:34:12" }, { "children": [ { "attributes": { "constant": false, "mutability": "mutable", "name": "tickCumulativeInside", "scope": 3227, "stateVariable": false, "storageLocation": "default", "type": "int56", "visibility": "internal" }, "children": [ { "attributes": { "name": "int56", "type": "int56" }, "id": 3220, "name": "ElementaryTypeName", "src": "2465:5:12" } ], "id": 3221, "name": "VariableDeclaration", "src": "2465:26:12" }, { "attributes": { "constant": false, "mutability": "mutable", "name": "secondsPerLiquidityInsideX128", "scope": 3227, "stateVariable": false, "storageLocation": "default", "type": "uint160", "visibility": "internal" }, "children": [ { "attributes": { "name": "uint160", "type": "uint160" }, "id": 3222, "name": "ElementaryTypeName", "src": "2505:7:12" } ], "id": 3223, "name": "VariableDeclaration", "src": "2505:37:12" }, { "attributes": { "constant": false, "mutability": "mutable", "name": "secondsInside", "scope": 3227, "stateVariable": false, "storageLocation": "default", "type": "uint32", "visibility": "internal" }, "children": [ { "attributes": { "name": "uint32", "type": "uint32" }, "id": 3224, "name": "ElementaryTypeName", "src": "2556:6:12" } ], "id": 3225, "name": "VariableDeclaration", "src": "2556:20:12" } ], "id": 3226, "name": "ParameterList", "src": "2451:135:12" } ], "id": 3227, "name": "FunctionDefinition", "src": "2336:251:12" } ], "id": 3228, "name": "ContractDefinition", "src": "280:2309:12" } ], "id": 3229, "name": "SourceUnit", "src": "32:2558:12" }, "compiler": { "name": "solc", "version": "0.7.6+commit.7338295f.Emscripten.clang" }, "networks": {}, "schemaVersion": "3.4.1", "updatedAt": "2022-01-17T20:05:41.703Z", "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 } }