UNPKG

@dolomite-exchange/dolomite-margin

Version:

Ethereum Smart Contracts and TypeScript library used for the DolomiteMargin trading protocol

1,196 lines 78.4 kB
{ "contractName": "TestSequencerUptimeFeedAggregator", "abi": [ { "constant": true, "inputs": [], "name": "aggregator", "outputs": [ { "internalType": "contract IChainlinkAccessControlAggregator", "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "decimals", "outputs": [ { "internalType": "uint8", "name": "", "type": "uint8" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "latestRoundData", "outputs": [ { "internalType": "uint80", "name": "roundId", "type": "uint80" }, { "internalType": "int256", "name": "answer", "type": "int256" }, { "internalType": "uint256", "name": "startedAt", "type": "uint256" }, { "internalType": "uint256", "name": "updatedAt", "type": "uint256" }, { "internalType": "uint80", "name": "answeredInRound", "type": "uint80" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "int256", "name": "__latestAnswer", "type": "int256" } ], "name": "setLatestAnswer", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" } ], "metadata": "{\"compiler\":{\"version\":\"0.5.16+commit.9c3226ce\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[],\"name\":\"aggregator\",\"outputs\":[{\"internalType\":\"contract IChainlinkAccessControlAggregator\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"latestRoundData\",\"outputs\":[{\"internalType\":\"uint80\",\"name\":\"roundId\",\"type\":\"uint80\"},{\"internalType\":\"int256\",\"name\":\"answer\",\"type\":\"int256\"},{\"internalType\":\"uint256\",\"name\":\"startedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"updatedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint80\",\"name\":\"answeredInRound\",\"type\":\"uint80\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"int256\",\"name\":\"__latestAnswer\",\"type\":\"int256\"}],\"name\":\"setLatestAnswer\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/home/cdc218/projects/dolomite/dolomite-protocol-v2/contracts/testing/TestSequencerUptimeFeedAggregator.sol\":\"TestSequencerUptimeFeedAggregator\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"/home/cdc218/projects/dolomite/dolomite-protocol-v2/contracts/external/interfaces/IChainlinkAccessControlAggregator.sol\":{\"keccak256\":\"0xbb94dc91633d6fb20e1d7e2b5ce1f11346e89a6bfc8c3ac5d163c35a3e4ad60a\",\"urls\":[\"bzz-raw://264c7c039caf44b1866769feb237010651730d546b54bb6f2b7bc77cf3b6c9c9\",\"dweb:/ipfs/QmX8TTF8E2G8TT1yig6qHC8amWDwaq1GG6iaKYTTHsYsjo\"]},\"/home/cdc218/projects/dolomite/dolomite-protocol-v2/contracts/external/interfaces/IChainlinkAggregator.sol\":{\"keccak256\":\"0x0209c9f35dbe82857a6441d8d61f271baeb5098549eabf5fc6d33503d0d3e073\",\"urls\":[\"bzz-raw://2f6af7b5198548a9a5e3d8a30203d7cd003eae93cca22b8466c10e0dcfcbc367\",\"dweb:/ipfs/Qme3bQ58ZoQLYDoJQHnvEeQZqgqyWTFBYBmMoiem7LPXmz\"]},\"/home/cdc218/projects/dolomite/dolomite-protocol-v2/contracts/testing/TestSequencerUptimeFeedAggregator.sol\":{\"keccak256\":\"0xcad29eaed8775c6b1b1d3c61d203de390fc55e62da09ec780af5631663279911\",\"urls\":[\"bzz-raw://5abfd82f915f32a698392b3f8e7fa561e6f26fa61b720d0200de3f8f7814ad0d\",\"dweb:/ipfs/QmUsVHRiBpWv3dCrW9YgRC5ZZFc6ZHPu8D7brSL4hvyLqA\"]}},\"version\":1}", "bytecode": "0x608060405234801561001057600080fd5b5061023c806100206000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c806304ea97b014610051578063245a7bfc14610066578063313ce56714610084578063feaf968c14610099575b600080fd5b61006461005f3660046100e8565b6100b2565b005b61006e6100c0565b60405161007b9190610138565b60405180910390f35b61008c6100c0565b60405161007b9190610192565b6100a16100c5565b60405161007b959493929190610146565b600055426001819055600255565b600090565b60008054600154600254839091929394565b80356100e2816101e2565b92915050565b6000602082840312156100fa57600080fd5b600061010684846100d7565b949350505050565b610117816101d1565b82525050565b610117816101a0565b610117816101c2565b610117816101bc565b602081016100e2828461010e565b60a081016101548288610126565b610161602083018761011d565b61016e604083018661011d565b61017b606083018561011d565b6101886080830184610126565b9695505050505050565b602081016100e2828461012f565b90565b73ffffffffffffffffffffffffffffffffffffffff1690565b60ff1690565b69ffffffffffffffffffff1690565b60006100e28260006100e2826101a3565b6101eb816101a0565b81146101f657600080fd5b5056fea365627a7a7231582000cc08814cddcfd3ae0b172c05c30e897758ffd364ac1e6ac6c14d54f6a755a66c6578706572696d656e74616cf564736f6c63430005100040", "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061004c5760003560e01c806304ea97b014610051578063245a7bfc14610066578063313ce56714610084578063feaf968c14610099575b600080fd5b61006461005f3660046100e8565b6100b2565b005b61006e6100c0565b60405161007b9190610138565b60405180910390f35b61008c6100c0565b60405161007b9190610192565b6100a16100c5565b60405161007b959493929190610146565b600055426001819055600255565b600090565b60008054600154600254839091929394565b80356100e2816101e2565b92915050565b6000602082840312156100fa57600080fd5b600061010684846100d7565b949350505050565b610117816101d1565b82525050565b610117816101a0565b610117816101c2565b610117816101bc565b602081016100e2828461010e565b60a081016101548288610126565b610161602083018761011d565b61016e604083018661011d565b61017b606083018561011d565b6101886080830184610126565b9695505050505050565b602081016100e2828461012f565b90565b73ffffffffffffffffffffffffffffffffffffffff1690565b60ff1690565b69ffffffffffffffffffff1690565b60006100e28260006100e2826101a3565b6101eb816101a0565b81146101f657600080fd5b5056fea365627a7a7231582000cc08814cddcfd3ae0b172c05c30e897758ffd364ac1e6ac6c14d54f6a755a66c6578706572696d656e74616cf564736f6c63430005100040", "sourceMap": "858:1085:137:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;858:1085:137;;;;;;;", "deployedSourceMap": "858:1085:137:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;858:1085:137;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1737:204;;;;;;;;;:::i;:::-;;1042:254;;;:::i;:::-;;;;;;;;;;;;;;;;1302:75;;;:::i;:::-;;;;;;;;1383:348;;;:::i;:::-;;;;;;;;;;;;1737:204;1820:13;:30;1877:15;1860:14;:32;;;1902:14;:32;1737:204::o;1042:254::-;1087:33;1042:254;:::o;1383:348::-;1454:14;1630:13;;1657:14;;1685;;1454;1383:348;;;;;:::o;5:128:-1:-;71:20;;96:32;71:20;96:32;;;56:77;;;;;140:239;;243:2;231:9;222:7;218:23;214:32;211:2;;;259:1;256;249:12;211:2;294:1;311:52;355:7;335:9;311:52;;;301:62;205:174;-1:-1;;;;205:174;386:210;511:79;584:5;511:79;;;506:3;499:92;493:103;;;603:110;684:23;701:5;684:23;;840:110;921:23;938:5;921:23;;957:107;1036:22;1052:5;1036:22;;1071:297;1231:2;1216:18;;1245:113;1220:9;1331:6;1245:113;;1375:647;1599:3;1584:19;;1614:69;1588:9;1656:6;1614:69;;;1694:70;1760:2;1749:9;1745:18;1736:6;1694:70;;;1775:72;1843:2;1832:9;1828:18;1819:6;1775:72;;;1858;1926:2;1915:9;1911:18;1902:6;1858:72;;;1941:71;2007:3;1996:9;1992:19;1983:6;1941:71;;;1570:452;;;;;;;;;2029:205;2143:2;2128:18;;2157:67;2132:9;2197:6;2157:67;;2241:71;2302:5;2285:27;2319:121;2392:42;2381:54;;2364:76;2526:81;2597:4;2586:16;;2569:38;2614:100;2686:22;2675:34;;2658:56;2721:205;;2842:79;2915:5;2933:150;3054:24;3072:5;3054:24;;3090:115;3158:23;3175:5;3158:23;;;3151:5;3148:34;3138:2;;3196:1;3193;3186:12;3138:2;3132:73;", "source": "/*\n\n Copyright 2022 Dolomite.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.5.7;\npragma experimental ABIEncoderV2;\n\nimport { IChainlinkAggregator } from \"../external/interfaces/IChainlinkAggregator.sol\";\nimport { IChainlinkAccessControlAggregator } from \"../external/interfaces/IChainlinkAccessControlAggregator.sol\";\n\n\ncontract TestSequencerUptimeFeedAggregator is IChainlinkAggregator {\n\n int256 internal _latestAnswer;\n uint256 internal _lastStartedAt;\n uint256 internal _lastUpdatedAt;\n\n function aggregator() external view returns (IChainlinkAccessControlAggregator) {\n // For the sake of simplicity, we implement the IChainlinkAccessControlAggregator interface here\n return IChainlinkAccessControlAggregator(address(0));\n }\n\n function decimals() external view returns (uint8) {\n return 0;\n }\n\n function latestRoundData()\n external\n view\n returns (\n uint80 roundId,\n int256 answer,\n uint256 startedAt,\n uint256 updatedAt,\n uint80 answeredInRound\n ) {\n return (\n 0,\n _latestAnswer,\n _lastStartedAt,\n _lastUpdatedAt,\n 0\n );\n }\n\n function setLatestAnswer(\n int256 __latestAnswer\n )\n public {\n _latestAnswer = __latestAnswer;\n _lastStartedAt = block.timestamp;\n _lastUpdatedAt = block.timestamp;\n }\n}\n", "sourcePath": "/home/cdc218/projects/dolomite/dolomite-protocol-v2/contracts/testing/TestSequencerUptimeFeedAggregator.sol", "ast": { "absolutePath": "/home/cdc218/projects/dolomite/dolomite-protocol-v2/contracts/testing/TestSequencerUptimeFeedAggregator.sol", "exportedSymbols": { "TestSequencerUptimeFeedAggregator": [ 36269 ] }, "id": 36270, "nodeType": "SourceUnit", "nodes": [ { "id": 36194, "literals": [ "solidity", "^", "0.5", ".7" ], "nodeType": "PragmaDirective", "src": "595:23:137" }, { "id": 36195, "literals": [ "experimental", "ABIEncoderV2" ], "nodeType": "PragmaDirective", "src": "619:33:137" }, { "absolutePath": "/home/cdc218/projects/dolomite/dolomite-protocol-v2/contracts/external/interfaces/IChainlinkAggregator.sol", "file": "../external/interfaces/IChainlinkAggregator.sol", "id": 36197, "nodeType": "ImportDirective", "scope": 36270, "sourceUnit": 4191, "src": "654:87:137", "symbolAliases": [ { "foreign": 36196, "local": null } ], "unitAlias": "" }, { "absolutePath": "/home/cdc218/projects/dolomite/dolomite-protocol-v2/contracts/external/interfaces/IChainlinkAccessControlAggregator.sol", "file": "../external/interfaces/IChainlinkAccessControlAggregator.sol", "id": 36199, "nodeType": "ImportDirective", "scope": 36270, "sourceUnit": 4162, "src": "742:113:137", "symbolAliases": [ { "foreign": 36198, "local": null } ], "unitAlias": "" }, { "baseContracts": [ { "arguments": null, "baseName": { "contractScope": null, "id": 36200, "name": "IChainlinkAggregator", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 4190, "src": "904:20:137", "typeDescriptions": { "typeIdentifier": "t_contract$_IChainlinkAggregator_$4190", "typeString": "contract IChainlinkAggregator" } }, "id": 36201, "nodeType": "InheritanceSpecifier", "src": "904:20:137" } ], "contractDependencies": [ 4190 ], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 36269, "linearizedBaseContracts": [ 36269, 4190 ], "name": "TestSequencerUptimeFeedAggregator", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 36203, "name": "_latestAnswer", "nodeType": "VariableDeclaration", "scope": 36269, "src": "932:29:137", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" }, "typeName": { "id": 36202, "name": "int256", "nodeType": "ElementaryTypeName", "src": "932:6:137", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 36205, "name": "_lastStartedAt", "nodeType": "VariableDeclaration", "scope": 36269, "src": "967:31:137", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 36204, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "967:7:137", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 36207, "name": "_lastUpdatedAt", "nodeType": "VariableDeclaration", "scope": 36269, "src": "1004:31:137", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 36206, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1004:7:137", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "body": { "id": 36218, "nodeType": "Block", "src": "1122:174:137", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "hexValue": "30", "id": 36214, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1286:1:137", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" } ], "id": 36213, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "1278:7:137", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": "address" }, "id": 36215, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1278:10:137", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" } ], "id": 36212, "name": "IChainlinkAccessControlAggregator", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4161, "src": "1244:33:137", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IChainlinkAccessControlAggregator_$4161_$", "typeString": "type(contract IChainlinkAccessControlAggregator)" } }, "id": 36216, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1244:45:137", "typeDescriptions": { "typeIdentifier": "t_contract$_IChainlinkAccessControlAggregator_$4161", "typeString": "contract IChainlinkAccessControlAggregator" } }, "functionReturnParameters": 36211, "id": 36217, "nodeType": "Return", "src": "1237:52:137" } ] }, "documentation": null, "id": 36219, "implemented": true, "kind": "function", "modifiers": [], "name": "aggregator", "nodeType": "FunctionDefinition", "parameters": { "id": 36208, "nodeType": "ParameterList", "parameters": [], "src": "1061:2:137" }, "returnParameters": { "id": 36211, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 36210, "name": "", "nodeType": "VariableDeclaration", "scope": 36219, "src": "1087:33:137", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_IChainlinkAccessControlAggregator_$4161", "typeString": "contract IChainlinkAccessControlAggregator" }, "typeName": { "contractScope": null, "id": 36209, "name": "IChainlinkAccessControlAggregator", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 4161, "src": "1087:33:137", "typeDescriptions": { "typeIdentifier": "t_contract$_IChainlinkAccessControlAggregator_$4161", "typeString": "contract IChainlinkAccessControlAggregator" } }, "value": null, "visibility": "internal" } ], "src": "1086:35:137" }, "scope": 36269, "src": "1042:254:137", "stateMutability": "view", "superFunction": 4171, "visibility": "external" }, { "body": { "id": 36226, "nodeType": "Block", "src": "1352:25:137", "statements": [ { "expression": { "argumentTypes": null, "hexValue": "30", "id": 36224, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1369:1:137", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "functionReturnParameters": 36223, "id": 36225, "nodeType": "Return", "src": "1362:8:137" } ] }, "documentation": null, "id": 36227, "implemented": true, "kind": "function", "modifiers": [], "name": "decimals", "nodeType": "FunctionDefinition", "parameters": { "id": 36220, "nodeType": "ParameterList", "parameters": [], "src": "1319:2:137" }, "returnParameters": { "id": 36223, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 36222, "name": "", "nodeType": "VariableDeclaration", "scope": 36227, "src": "1345:5:137", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" }, "typeName": { "id": 36221, "name": "uint8", "nodeType": "ElementaryTypeName", "src": "1345:5:137", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "value": null, "visibility": "internal" } ], "src": "1344:7:137" }, "scope": 36269, "src": "1302:75:137", "stateMutability": "view", "superFunction": 4176, "visibility": "external" }, { "body": { "id": 36247, "nodeType": "Block", "src": "1584:147:137", "statements": [ { "expression": { "argumentTypes": null, "components": [ { "argumentTypes": null, "hexValue": "30", "id": 36240, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1615:1:137", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, { "argumentTypes": null, "id": 36241, "name": "_latestAnswer", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 36203, "src": "1630:13:137", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, { "argumentTypes": null, "id": 36242, "name": "_lastStartedAt", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 36205, "src": "1657:14:137", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 36243, "name": "_lastUpdatedAt", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 36207, "src": "1685:14:137", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "hexValue": "30", "id": 36244, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1713:1:137", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" } ], "id": 36245, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "1601:123:137", "typeDescriptions": { "typeIdentifier": "t_tuple$_t_rational_0_by_1_$_t_int256_$_t_uint256_$_t_uint256_$_t_rational_0_by_1_$", "typeString": "tuple(int_const 0,int256,uint256,uint256,int_const 0)" } }, "functionReturnParameters": 36239, "id": 36246, "nodeType": "Return", "src": "1594:130:137" } ] }, "documentation": null, "id": 36248, "implemented": true, "kind": "function", "modifiers": [], "name": "latestRoundData", "nodeType": "FunctionDefinition", "parameters": { "id": 36228, "nodeType": "ParameterList", "parameters": [], "src": "1407:2:137" }, "returnParameters": { "id": 36239, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 36230, "name": "roundId", "nodeType": "VariableDeclaration", "scope": 36248, "src": "1454:14:137", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint80", "typeString": "uint80" }, "typeName": { "id": 36229, "name": "uint80", "nodeType": "ElementaryTypeName", "src": "1454:6:137", "typeDescriptions": { "typeIdentifier": "t_uint80", "typeString": "uint80" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 36232, "name": "answer", "nodeType": "VariableDeclaration", "scope": 36248, "src": "1478:13:137", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" }, "typeName": { "id": 36231, "name": "int256", "nodeType": "ElementaryTypeName", "src": "1478:6:137", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 36234, "name": "startedAt", "nodeType": "VariableDeclaration", "scope": 36248, "src": "1501:17:137", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 36233, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1501:7:137", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 36236, "name": "updatedAt", "nodeType": "VariableDeclaration", "scope": 36248, "src": "1528:17:137", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 36235, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1528:7:137", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 36238, "name": "answeredInRound", "nodeType": "VariableDeclaration", "scope": 36248, "src": "1555:22:137", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint80", "typeString": "uint80" }, "typeName": { "id": 36237, "name": "uint80", "nodeType": "ElementaryTypeName", "src": "1555:6:137", "typeDescriptions": { "typeIdentifier": "t_uint80", "typeString": "uint80" } }, "value": null, "visibility": "internal" } ], "src": "1444:139:137" }, "scope": 36269, "src": "1383:348:137", "stateMutability": "view", "superFunction": 4189, "visibility": "external" }, { "body": { "id": 36267, "nodeType": "Block", "src": "1810:131:137", "statements": [ { "expression": { "argumentTypes": null, "id": 36255, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 36253, "name": "_latestAnswer", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 36203, "src": "1820:13:137", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 36254, "name": "__latestAnswer", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 36250, "src": "1836:14:137", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, "src": "1820:30:137", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, "id": 36256, "nodeType": "ExpressionStatement", "src": "1820:30:137" }, { "expression": { "argumentTypes": null, "id": 36260, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 36257, "name": "_lastStartedAt", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 36205, "src": "1860:14:137", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 36258, "name": "block", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 38097, "src": "1877:5:137", "typeDescriptions": { "typeIdentifier": "t_magic_block", "typeString": "block" } }, "id": 36259, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "timestamp", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "1877:15:137", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "1860:32:137", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 36261, "nodeType": "ExpressionStatement", "src": "1860:32:137" }, { "expression": { "argumentTypes": null, "id": 36265, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 36262, "name": "_lastUpdatedAt", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 36207, "src": "1902:14:137", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 36263, "name": "block", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 38097, "src": "1919:5:137", "typeDescriptions": { "typeIdentifier": "t_magic_block", "typeString": "block" } }, "id": 36264, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "timestamp", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "1919:15:137", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "1902:32:137", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 36266, "nodeType": "ExpressionStatement", "src": "1902:32:137" } ] }, "documentation": null, "id": 36268, "implemented": true, "kind": "function", "modifiers": [], "name": "setLatestAnswer", "nodeType": "FunctionDefinition", "parameters": { "id": 36251, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 36250, "name": "__latestAnswer", "nodeType": "VariableDeclaration", "scope": 36268, "src": "1771:21:137", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" }, "typeName": { "id": 36249, "name": "int256", "nodeType": "ElementaryTypeName", "src": "1771:6:137", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, "value": null, "visibility": "internal" } ], "src": "1761:37:137" }, "returnParameters": { "id": 36252, "nodeType": "ParameterList", "parameters": [], "src": "1810:0:137" }, "scope": 36269, "src": "1737:204:137", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" } ], "scope": 36270, "src": "858:1085:137" } ], "src": "595:1349:137" }, "legacyAST": { "absolutePath": "/home/cdc218/projects/dolomite/dolomite-protocol-v2/contracts/testing/TestSequencerUptimeFeedAggregator.sol", "exportedSymbols": { "TestSequencerUptimeFeedAggregator": [ 36269 ] }, "id": 36270, "nodeType": "SourceUnit", "nodes": [ { "id": 36194, "literals": [ "solidity", "^", "0.5", ".7" ], "nodeType": "PragmaDirective", "src": "595:23:137" }, { "id": 36195, "literals": [ "experimental", "ABIEncoderV2" ], "nodeType": "PragmaDirective", "src": "619:33:137" }, { "absolutePath": "/home/cdc218/projects/dolomite/dolomite-protocol-v2/contracts/external/interfaces/IChainlinkAggregator.sol", "file": "../external/interfaces/IChainlinkAggregator.sol", "id": 36197, "nodeType": "ImportDirective", "scope": 36270, "sourceUnit": 4191, "src": "654:87:137", "symbolAliases": [ { "foreign": 36196, "local": null } ], "unitAlias": "" }, { "absolutePath": "/home/cdc218/projects/dolomite/dolomite-protocol-v2/contracts/external/interfaces/IChainlinkAccessControlAggregator.sol", "file": "../external/interfaces/IChainlinkAccessControlAggregator.sol", "id": 36199, "nodeType": "ImportDirective", "scope": 36270, "sourceUnit": 4162, "src": "742:113:137", "symbolAliases": [ { "foreign": 36198, "local": null } ], "unitAlias": "" }, { "baseContracts": [ { "arguments": null, "baseName": { "contractScope": null, "id": 36200, "name": "IChainlinkAggregator", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 4190, "src": "904:20:137", "typeDescriptions": { "typeIdentifier": "t_contract$_IChainlinkAggregator_$4190", "typeString": "contract IChainlinkAggregator" } }, "id": 36201, "nodeType": "InheritanceSpecifier", "src": "904:20:137" } ], "contractDependencies": [ 4190 ], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 36269, "linearizedBaseContracts": [ 36269, 4190 ], "name": "TestSequencerUptimeFeedAggregator", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 36203, "name": "_latestAnswer", "nodeType": "VariableDeclaration", "scope": 36269, "src": "932:29:137", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" }, "typeName": { "id": 36202, "name": "int256", "nodeType": "ElementaryTypeName", "src": "932:6:137", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 36205, "name": "_lastStartedAt", "nodeType": "VariableDeclaration", "scope": 36269, "src": "967:31:137", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 36204, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "967:7:137", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 36207, "name": "_lastUpdatedAt", "nodeType": "VariableDeclaration", "scope": 36269, "src": "1004:31:137", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 36206, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1004:7:137", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "body": { "id": 36218, "nodeType": "Block", "src": "1122:174:137", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": nu