UNPKG

@dolomite-exchange/dolomite-margin

Version:

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

1,104 lines 118 kB
{ "contractName": "TestChainlinkAggregator", "abi": [ { "inputs": [], "payable": false, "stateMutability": "nonpayable", "type": "constructor" }, { "constant": false, "inputs": [ { "internalType": "int256", "name": "__latestAnswer", "type": "int256" } ], "name": "setLatestAnswer", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "int192", "name": "__minAnswer", "type": "int192" } ], "name": "setMinAnswer", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "int192", "name": "__maxAnswer", "type": "int192" } ], "name": "setMaxAnswer", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "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": "minAnswer", "outputs": [ { "internalType": "int192", "name": "", "type": "int192" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "maxAnswer", "outputs": [ { "internalType": "int192", "name": "", "type": "int192" } ], "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" } ], "metadata": "{\"compiler\":{\"version\":\"0.5.16+commit.9c3226ce\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"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\":true,\"inputs\":[],\"name\":\"maxAnswer\",\"outputs\":[{\"internalType\":\"int192\",\"name\":\"\",\"type\":\"int192\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"minAnswer\",\"outputs\":[{\"internalType\":\"int192\",\"name\":\"\",\"type\":\"int192\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"int256\",\"name\":\"__latestAnswer\",\"type\":\"int256\"}],\"name\":\"setLatestAnswer\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"int192\",\"name\":\"__maxAnswer\",\"type\":\"int192\"}],\"name\":\"setMaxAnswer\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"int192\",\"name\":\"__minAnswer\",\"type\":\"int192\"}],\"name\":\"setMinAnswer\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/home/cdc218/projects/dolomite-protocol-v2/contracts/testing/TestChainlinkAggregator.sol\":\"TestChainlinkAggregator\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"/home/cdc218/projects/dolomite-protocol-v2/contracts/external/interfaces/IChainlinkAccessControlAggregator.sol\":{\"keccak256\":\"0xbb94dc91633d6fb20e1d7e2b5ce1f11346e89a6bfc8c3ac5d163c35a3e4ad60a\",\"urls\":[\"bzz-raw://264c7c039caf44b1866769feb237010651730d546b54bb6f2b7bc77cf3b6c9c9\",\"dweb:/ipfs/QmX8TTF8E2G8TT1yig6qHC8amWDwaq1GG6iaKYTTHsYsjo\"]},\"/home/cdc218/projects/dolomite-protocol-v2/contracts/external/interfaces/IChainlinkAggregator.sol\":{\"keccak256\":\"0x0209c9f35dbe82857a6441d8d61f271baeb5098549eabf5fc6d33503d0d3e073\",\"urls\":[\"bzz-raw://2f6af7b5198548a9a5e3d8a30203d7cd003eae93cca22b8466c10e0dcfcbc367\",\"dweb:/ipfs/Qme3bQ58ZoQLYDoJQHnvEeQZqgqyWTFBYBmMoiem7LPXmz\"]},\"/home/cdc218/projects/dolomite-protocol-v2/contracts/testing/TestChainlinkAggregator.sol\":{\"keccak256\":\"0x4f8dc6f29139cd5edec3946afb912ff3649cd71bd3ef17e9b3d77cd04fb22485\",\"urls\":[\"bzz-raw://36d78f072bfb5071e5e4dafbd88e4224ec0075d5ab44f2d0c0f443e7f5ba76f9\",\"dweb:/ipfs/QmPeUpyRe5jRYHhLr22JcJRMj1PKCQLfQL5LyYCUXSAEbR\"]}},\"version\":1}", "bytecode": "0x608060405234801561001057600080fd5b50600280546001600160c01b0319908116600117909155600380549091166001600160b01b031790556103ba806100486000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c8063655145301161005b57806365514530146100ea57806370da2f67146100fd578063eada48f014610105578063feaf968c1461011857610088565b806304ea97b01461008d57806322adbc78146100a2578063245a7bfc146100c0578063313ce567146100d5575b600080fd5b6100a061009b366004610248565b610131565b005b6100aa61013a565b6040516100b791906102a7565b60405180910390f35b6100c8610143565b6040516100b79190610299565b6100dd610147565b6040516100b79190610301565b6100a06100f8366004610222565b61014c565b6100aa61019c565b6100a0610113366004610222565b6101a5565b6101206101f5565b6040516100b79594939291906102b5565b60005542600155565b60025460170b90565b3090565b600890565b6003805460179290920b77ffffffffffffffffffffffffffffffffffffffffffffffff167fffffffffffffffff000000000000000000000000000000000000000000000000909216919091179055565b60035460170b90565b6002805460179290920b77ffffffffffffffffffffffffffffffffffffffffffffffff167fffffffffffffffff000000000000000000000000000000000000000000000000909216919091179055565b600080546001548290819091929394565b803561021181610357565b92915050565b80356102118161036e565b60006020828403121561023457600080fd5b60006102408484610206565b949350505050565b60006020828403121561025a57600080fd5b60006102408484610217565b61026f81610346565b82525050565b61026f8161030f565b61026f81610315565b61026f81610337565b61026f81610331565b602081016102118284610266565b602081016102118284610275565b60a081016102c38288610287565b6102d0602083018761027e565b6102dd604083018661027e565b6102ea606083018561027e565b6102f76080830184610287565b9695505050505050565b602081016102118284610290565b60170b90565b90565b73ffffffffffffffffffffffffffffffffffffffff1690565b60ff1690565b69ffffffffffffffffffff1690565b600061021182600061021182610318565b6103608161030f565b811461036b57600080fd5b50565b6103608161031556fea365627a7a7231582056dc68f1b4830283d714a16613f141d06566e9de94161a944d85b1ef70af45096c6578706572696d656e74616cf564736f6c63430005100040", "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100885760003560e01c8063655145301161005b57806365514530146100ea57806370da2f67146100fd578063eada48f014610105578063feaf968c1461011857610088565b806304ea97b01461008d57806322adbc78146100a2578063245a7bfc146100c0578063313ce567146100d5575b600080fd5b6100a061009b366004610248565b610131565b005b6100aa61013a565b6040516100b791906102a7565b60405180910390f35b6100c8610143565b6040516100b79190610299565b6100dd610147565b6040516100b79190610301565b6100a06100f8366004610222565b61014c565b6100aa61019c565b6100a0610113366004610222565b6101a5565b6101206101f5565b6040516100b79594939291906102b5565b60005542600155565b60025460170b90565b3090565b600890565b6003805460179290920b77ffffffffffffffffffffffffffffffffffffffffffffffff167fffffffffffffffff000000000000000000000000000000000000000000000000909216919091179055565b60035460170b90565b6002805460179290920b77ffffffffffffffffffffffffffffffffffffffffffffffff167fffffffffffffffff000000000000000000000000000000000000000000000000909216919091179055565b600080546001548290819091929394565b803561021181610357565b92915050565b80356102118161036e565b60006020828403121561023457600080fd5b60006102408484610206565b949350505050565b60006020828403121561025a57600080fd5b60006102408484610217565b61026f81610346565b82525050565b61026f8161030f565b61026f81610315565b61026f81610337565b61026f81610331565b602081016102118284610266565b602081016102118284610275565b60a081016102c38288610287565b6102d0602083018761027e565b6102dd604083018661027e565b6102ea606083018561027e565b6102f76080830184610287565b9695505050505050565b602081016102118284610290565b60170b90565b90565b73ffffffffffffffffffffffffffffffffffffffff1690565b60ff1690565b69ffffffffffffffffffff1690565b600061021182600061021182610318565b6103608161030f565b811461036b57600080fd5b50565b6103608161031556fea365627a7a7231582056dc68f1b4830283d714a16613f141d06566e9de94161a944d85b1ef70af45096c6578706572696d656e74616cf564736f6c63430005100040", "sourceMap": "858:1597:114:-;;;1094:128;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1125:10:114;:14;;-1:-1:-1;;;;;;1125:14:114;;;1138:1;1125:14;;;;1149:10;:66;;;;;-1:-1:-1;;;;;1149:66:114;;;858:1597;;;;;;", "deployedSourceMap": "858:1597:114:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;858:1597:114;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1228:160;;;;;;;;;:::i;:::-;;1934:86;;;:::i;:::-;;;;;;;;;;;;;;;;1590:257;;;:::i;:::-;;;;;;;;1853:75;;;:::i;:::-;;;;;;;;1492:92;;;;;;;;;:::i;2026:86::-;;;:::i;1394:92::-;;;;;;;;;:::i;2118:335::-;;;:::i;:::-;;;;;;;;;;;;1228:160;1309:13;:30;1366:15;1349:14;:32;1228:160::o;1934:86::-;2003:10;;;;1934:86;:::o;1590:257::-;1834:4;1590:257;:::o;1853:75::-;1920:1;1853:75;:::o;1492:92::-;1553:10;:24;;;;;;;;;;;;;;;;;;;1492:92::o;2026:86::-;2095:10;;;;2026:86;:::o;1394:92::-;1455:10;:24;;;;;;;;;;;;;;;;;;;1394:92::o;2118:335::-;2189:14;2365:13;;2407:14;;2189;;;2118:335;;;;;:::o;5:128:-1:-;71:20;;96:32;71:20;96:32;;;56:77;;;;;140:128;206:20;;231:32;206:20;231:32;;275:239;;378:2;366:9;357:7;353:23;349:32;346:2;;;394:1;391;384:12;346:2;429:1;446:52;490:7;470:9;446:52;;;436:62;340:174;-1:-1;;;;340:174;521:239;;624:2;612:9;603:7;599:23;595:32;592:2;;;640:1;637;630:12;592:2;675:1;692:52;736:7;716:9;692:52;;767:210;892:79;965:5;892:79;;;887:3;880:92;874:103;;;984:110;1065:23;1082:5;1065:23;;1101:110;1182:23;1199:5;1182:23;;1338:110;1419:23;1436:5;1419:23;;1455:107;1534:22;1550:5;1534:22;;1569:297;1729:2;1714:18;;1743:113;1718:9;1829:6;1743:113;;1873:209;1989:2;1974:18;;2003:69;1978:9;2045:6;2003:69;;2089:647;2313:3;2298:19;;2328:69;2302:9;2370:6;2328:69;;;2408:70;2474:2;2463:9;2459:18;2450:6;2408:70;;;2489:72;2557:2;2546:9;2542:18;2533:6;2489:72;;;2572;2640:2;2629:9;2625:18;2616:6;2572:72;;;2655:71;2721:3;2710:9;2706:19;2697:6;2655:71;;;2284:452;;;;;;;;;2743:205;2857:2;2842:18;;2871:67;2846:9;2911:6;2871:67;;2955:87;3027:2;3016:21;;2999:43;3049:71;3110:5;3093:27;3127:121;3200:42;3189:54;;3172:76;3334:81;3405:4;3394:16;;3377:38;3422:100;3494:22;3483:34;;3466:56;3529:205;;3650:79;3723:5;3741:150;3862:24;3880:5;3862:24;;3898:115;3966:23;3983:5;3966:23;;;3959:5;3956:34;3946:2;;4004:1;4001;3994:12;3946:2;3940:73;;4020:115;4088:23;4105:5;4088:23;", "source": "/*\n\n Copyright 2020 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 { IChainlinkAccessControlAggregator } from \"../external/interfaces/IChainlinkAccessControlAggregator.sol\";\nimport { IChainlinkAggregator } from \"../external/interfaces/IChainlinkAggregator.sol\";\n\n\ncontract TestChainlinkAggregator is IChainlinkAggregator, IChainlinkAccessControlAggregator {\n\n int256 internal _latestAnswer;\n uint256 internal _lastUpdatedAt;\n int192 internal _minAnswer;\n int192 internal _maxAnswer;\n\n constructor() public {\n _minAnswer = 1;\n _maxAnswer = 95780971304118053647396689196894323976171195136475135;\n }\n\n function setLatestAnswer(\n int256 __latestAnswer\n ) external {\n _latestAnswer = __latestAnswer;\n _lastUpdatedAt = block.timestamp;\n }\n\n function setMinAnswer(int192 __minAnswer) external {\n _minAnswer = __minAnswer;\n }\n\n function setMaxAnswer(int192 __maxAnswer) external {\n _maxAnswer = __maxAnswer;\n }\n\n function aggregator() external view returns (IChainlinkAccessControlAggregator) {\n // For the sake of simplicity, we implement the IChainlinkAccessControlAggregator interface here\n return IChainlinkAccessControlAggregator(address(this));\n }\n\n function decimals() external view returns (uint8) {\n return 8;\n }\n\n function minAnswer() external view returns (int192) {\n return _minAnswer;\n }\n\n function maxAnswer() external view returns (int192) {\n return _maxAnswer;\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 0,\n _lastUpdatedAt,\n 0\n );\n }\n}\n", "sourcePath": "/home/cdc218/projects/dolomite-protocol-v2/contracts/testing/TestChainlinkAggregator.sol", "ast": { "absolutePath": "/home/cdc218/projects/dolomite-protocol-v2/contracts/testing/TestChainlinkAggregator.sol", "exportedSymbols": { "TestChainlinkAggregator": [ 33065 ] }, "id": 33066, "nodeType": "SourceUnit", "nodes": [ { "id": 32943, "literals": [ "solidity", "^", "0.5", ".7" ], "nodeType": "PragmaDirective", "src": "595:23:114" }, { "id": 32944, "literals": [ "experimental", "ABIEncoderV2" ], "nodeType": "PragmaDirective", "src": "619:33:114" }, { "absolutePath": "/home/cdc218/projects/dolomite-protocol-v2/contracts/external/interfaces/IChainlinkAccessControlAggregator.sol", "file": "../external/interfaces/IChainlinkAccessControlAggregator.sol", "id": 32946, "nodeType": "ImportDirective", "scope": 33066, "sourceUnit": 4162, "src": "654:113:114", "symbolAliases": [ { "foreign": 32945, "local": null } ], "unitAlias": "" }, { "absolutePath": "/home/cdc218/projects/dolomite-protocol-v2/contracts/external/interfaces/IChainlinkAggregator.sol", "file": "../external/interfaces/IChainlinkAggregator.sol", "id": 32948, "nodeType": "ImportDirective", "scope": 33066, "sourceUnit": 4191, "src": "768:87:114", "symbolAliases": [ { "foreign": 32947, "local": null } ], "unitAlias": "" }, { "baseContracts": [ { "arguments": null, "baseName": { "contractScope": null, "id": 32949, "name": "IChainlinkAggregator", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 4190, "src": "894:20:114", "typeDescriptions": { "typeIdentifier": "t_contract$_IChainlinkAggregator_$4190", "typeString": "contract IChainlinkAggregator" } }, "id": 32950, "nodeType": "InheritanceSpecifier", "src": "894:20:114" }, { "arguments": null, "baseName": { "contractScope": null, "id": 32951, "name": "IChainlinkAccessControlAggregator", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 4161, "src": "916:33:114", "typeDescriptions": { "typeIdentifier": "t_contract$_IChainlinkAccessControlAggregator_$4161", "typeString": "contract IChainlinkAccessControlAggregator" } }, "id": 32952, "nodeType": "InheritanceSpecifier", "src": "916:33:114" } ], "contractDependencies": [ 4161, 4190 ], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 33065, "linearizedBaseContracts": [ 33065, 4161, 4190 ], "name": "TestChainlinkAggregator", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 32954, "name": "_latestAnswer", "nodeType": "VariableDeclaration", "scope": 33065, "src": "957:29:114", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" }, "typeName": { "id": 32953, "name": "int256", "nodeType": "ElementaryTypeName", "src": "957:6:114", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 32956, "name": "_lastUpdatedAt", "nodeType": "VariableDeclaration", "scope": 33065, "src": "992:31:114", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 32955, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "992:7:114", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 32958, "name": "_minAnswer", "nodeType": "VariableDeclaration", "scope": 33065, "src": "1029:26:114", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_int192", "typeString": "int192" }, "typeName": { "id": 32957, "name": "int192", "nodeType": "ElementaryTypeName", "src": "1029:6:114", "typeDescriptions": { "typeIdentifier": "t_int192", "typeString": "int192" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 32960, "name": "_maxAnswer", "nodeType": "VariableDeclaration", "scope": 33065, "src": "1061:26:114", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_int192", "typeString": "int192" }, "typeName": { "id": 32959, "name": "int192", "nodeType": "ElementaryTypeName", "src": "1061:6:114", "typeDescriptions": { "typeIdentifier": "t_int192", "typeString": "int192" } }, "value": null, "visibility": "internal" }, { "body": { "id": 32971, "nodeType": "Block", "src": "1115:107:114", "statements": [ { "expression": { "argumentTypes": null, "id": 32965, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 32963, "name": "_minAnswer", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 32958, "src": "1125:10:114", "typeDescriptions": { "typeIdentifier": "t_int192", "typeString": "int192" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "hexValue": "31", "id": 32964, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1138:1:114", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1" }, "value": "1" }, "src": "1125:14:114", "typeDescriptions": { "typeIdentifier": "t_int192", "typeString": "int192" } }, "id": 32966, "nodeType": "ExpressionStatement", "src": "1125:14:114" }, { "expression": { "argumentTypes": null, "id": 32969, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 32967, "name": "_maxAnswer", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 32960, "src": "1149:10:114", "typeDescriptions": { "typeIdentifier": "t_int192", "typeString": "int192" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "hexValue": "3935373830393731333034313138303533363437333936363839313936383934333233393736313731313935313336343735313335", "id": 32968, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1162:53:114", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_95780971304118053647396689196894323976171195136475135_by_1", "typeString": "int_const 9578...(45 digits omitted)...5135" }, "value": "95780971304118053647396689196894323976171195136475135" }, "src": "1149:66:114", "typeDescriptions": { "typeIdentifier": "t_int192", "typeString": "int192" } }, "id": 32970, "nodeType": "ExpressionStatement", "src": "1149:66:114" } ] }, "documentation": null, "id": 32972, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": { "id": 32961, "nodeType": "ParameterList", "parameters": [], "src": "1105:2:114" }, "returnParameters": { "id": 32962, "nodeType": "ParameterList", "parameters": [], "src": "1115:0:114" }, "scope": 33065, "src": "1094:128:114", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 32986, "nodeType": "Block", "src": "1299:89:114", "statements": [ { "expression": { "argumentTypes": null, "id": 32979, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 32977, "name": "_latestAnswer", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 32954, "src": "1309:13:114", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 32978, "name": "__latestAnswer", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 32974, "src": "1325:14:114", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, "src": "1309:30:114", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, "id": 32980, "nodeType": "ExpressionStatement", "src": "1309:30:114" }, { "expression": { "argumentTypes": null, "id": 32984, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 32981, "name": "_lastUpdatedAt", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 32956, "src": "1349:14:114", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 32982, "name": "block", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 38097, "src": "1366:5:114", "typeDescriptions": { "typeIdentifier": "t_magic_block", "typeString": "block" } }, "id": 32983, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "timestamp", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "1366:15:114", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "1349:32:114", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 32985, "nodeType": "ExpressionStatement", "src": "1349:32:114" } ] }, "documentation": null, "id": 32987, "implemented": true, "kind": "function", "modifiers": [], "name": "setLatestAnswer", "nodeType": "FunctionDefinition", "parameters": { "id": 32975, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 32974, "name": "__latestAnswer", "nodeType": "VariableDeclaration", "scope": 32987, "src": "1262:21:114", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" }, "typeName": { "id": 32973, "name": "int256", "nodeType": "ElementaryTypeName", "src": "1262:6:114", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, "value": null, "visibility": "internal" } ], "src": "1252:37:114" }, "returnParameters": { "id": 32976, "nodeType": "ParameterList", "parameters": [], "src": "1299:0:114" }, "scope": 33065, "src": "1228:160:114", "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" }, { "body": { "id": 32996, "nodeType": "Block", "src": "1445:41:114", "statements": [ { "expression": { "argumentTypes": null, "id": 32994, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 32992, "name": "_minAnswer", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 32958, "src": "1455:10:114", "typeDescriptions": { "typeIdentifier": "t_int192", "typeString": "int192" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 32993, "name": "__minAnswer", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 32989, "src": "1468:11:114", "typeDescriptions": { "typeIdentifier": "t_int192", "typeString": "int192" } }, "src": "1455:24:114", "typeDescriptions": { "typeIdentifier": "t_int192", "typeString": "int192" } }, "id": 32995, "nodeType": "ExpressionStatement", "src": "1455:24:114" } ] }, "documentation": null, "id": 32997, "implemented": true, "kind": "function", "modifiers": [], "name": "setMinAnswer", "nodeType": "FunctionDefinition", "parameters": { "id": 32990, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 32989, "name": "__minAnswer", "nodeType": "VariableDeclaration", "scope": 32997, "src": "1416:18:114", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_int192", "typeString": "int192" }, "typeName": { "id": 32988, "name": "int192", "nodeType": "ElementaryTypeName", "src": "1416:6:114", "typeDescriptions": { "typeIdentifier": "t_int192", "typeString": "int192" } }, "value": null, "visibility": "internal" } ], "src": "1415:20:114" }, "returnParameters": { "id": 32991, "nodeType": "ParameterList", "parameters": [], "src": "1445:0:114" }, "scope": 33065, "src": "1394:92:114", "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" }, { "body": { "id": 33006, "nodeType": "Block", "src": "1543:41:114", "statements": [ { "expression": { "argumentTypes": null, "id": 33004, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 33002, "name": "_maxAnswer", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 32960, "src": "1553:10:114", "typeDescriptions": { "typeIdentifier": "t_int192", "typeString": "int192" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 33003, "name": "__maxAnswer", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 32999, "src": "1566:11:114", "typeDescriptions": { "typeIdentifier": "t_int192", "typeString": "int192" } }, "src": "1553:24:114", "typeDescriptions": { "typeIdentifier": "t_int192", "typeString": "int192" } }, "id": 33005, "nodeType": "ExpressionStatement", "src": "1553:24:114" } ] }, "documentation": null, "id": 33007, "implemented": true, "kind": "function", "modifiers": [], "name": "setMaxAnswer", "nodeType": "FunctionDefinition", "parameters": { "id": 33000, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 32999, "name": "__maxAnswer", "nodeType": "VariableDeclaration", "scope": 33007, "src": "1514:18:114", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_int192", "typeString": "int192" }, "typeName": { "id": 32998, "name": "int192", "nodeType": "ElementaryTypeName", "src": "1514:6:114", "typeDescriptions": { "typeIdentifier": "t_int192", "typeString": "int192" } }, "value": null, "visibility": "internal" } ], "src": "1513:20:114" }, "returnParameters": { "id": 33001, "nodeType": "ParameterList", "parameters": [], "src": "1543:0:114" }, "scope": 33065, "src": "1492:92:114", "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" }, { "body": { "id": 33018, "nodeType": "Block", "src": "1670:177:114", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 33014, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 38369, "src": "1834:4:114", "typeDescriptions": { "typeIdentifier": "t_contract$_TestChainlinkAggregator_$33065", "typeString": "contract TestChainlinkAggregator" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_contract$_TestChainlinkAggregator_$33065", "typeString": "contract TestChainlinkAggregator" } ], "id": 33013, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "1826:7:114", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": "address" }, "id": 33015, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1826:13:114", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 33012, "name": "IChainlinkAccessControlAggregator", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4161, "src": "1792:33:114", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IChainlinkAccessControlAggregator_$4161_$", "typeString": "type(contract IChainlinkAccessControlAggregator)" } }, "id": 33016, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1792:48:114", "typeDescriptions": { "typeIdentifier": "t_contract$_IChainlinkAccessControlAggregator_$4161", "typeString": "contract IChainlinkAccessControlAggregator" } }, "functionReturnParameters": 33011, "id": 33017, "nodeType": "Return", "src": "1785:55:114" } ] }, "documentation": null, "id": 33019, "implemented": true, "kind": "function", "modifiers": [], "name": "aggregator", "nodeType": "FunctionDefinition", "parameters": { "id": 33008, "nodeType": "ParameterList", "parameters": [], "src": "1609:2:114" }, "returnParameters": { "id": 33011, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 33010, "name": "", "nodeType": "VariableDeclaration", "scope": 33019, "src": "1635:33:114", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_IChainlinkAccessControlAggregator_$4161", "typeString": "contract IChainlinkAccessControlAggregator" }, "typeName": { "contractScope": null, "id": 33009, "name": "IChainlinkAccessControlAggregator", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 4161, "src": "1635:33:114", "typeDescriptions": { "typeIdentifier": "t_contract$_IChainlinkAccessControlAggregator_$4161", "typeString": "contract IChainlinkAccessControlAggregator" } }, "value": null, "visibility": "internal" } ], "src": "1634:35:114" }, "scope": 33065, "src": "1590:257:114", "stateMutability": "view", "superFunction": 4171, "visibility": "external" }, { "body": { "id": 33026, "nodeType": "Block", "src": "1903:25:114", "statements": [ { "expression": { "argumentTypes": null, "hexValue": "38", "id": 33024, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1920:1:114", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_8_by_1", "typeString": "int_const 8" }, "value": "8" }, "functionReturnParameters": 33023, "id": 33025, "nodeType": "Return", "src": "1913:8:114" } ] }, "documentation": null, "id": 33027, "implemented": true, "kind": "function", "modifiers": [], "name": "decimals", "nodeType": "FunctionDefinition", "parameters": { "id": 33020, "nodeType": "ParameterList", "parameters": [], "src": "1870:2:114" }, "returnParameters": { "id": 33023, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 33022, "name": "", "nodeType": "VariableDeclaration", "scope": 33027, "src": "1896:5:1