UNPKG

@dolomite-exchange/dolomite-margin

Version:

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

760 lines 28.5 kB
{ "contractName": "IChainlinkAggregator", "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" } ], "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\"}],\"devdoc\":{\"author\":\"Dolomite * Gets the latest price from the Chainlink Oracle Network. Amount of decimals depends on the base.\",\"methods\":{},\"title\":\"IChainlinkAggregator\"},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/home/cdc218/projects/dolomite/dolomite-protocol-v2/contracts/external/interfaces/IChainlinkAggregator.sol\":\"IChainlinkAggregator\"},\"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\"]}},\"version\":1}", "bytecode": "0x", "deployedBytecode": "0x", "sourceMap": "", "deployedSourceMap": "", "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 \"./IChainlinkAccessControlAggregator.sol\";\n\n\n/**\n * @title IChainlinkAggregator\n * @author Dolomite\n *\n * Gets the latest price from the Chainlink Oracle Network. Amount of decimals depends on the base.\n */\ncontract IChainlinkAggregator {\n\n function aggregator() external view returns (IChainlinkAccessControlAggregator);\n\n function decimals() external view returns (uint8);\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}\n", "sourcePath": "/home/cdc218/projects/dolomite/dolomite-protocol-v2/contracts/external/interfaces/IChainlinkAggregator.sol", "ast": { "absolutePath": "/home/cdc218/projects/dolomite/dolomite-protocol-v2/contracts/external/interfaces/IChainlinkAggregator.sol", "exportedSymbols": { "IChainlinkAggregator": [ 4190 ] }, "id": 4191, "nodeType": "SourceUnit", "nodes": [ { "id": 4163, "literals": [ "solidity", "^", "0.5", ".7" ], "nodeType": "PragmaDirective", "src": "595:23:19" }, { "id": 4164, "literals": [ "experimental", "ABIEncoderV2" ], "nodeType": "PragmaDirective", "src": "619:33:19" }, { "absolutePath": "/home/cdc218/projects/dolomite/dolomite-protocol-v2/contracts/external/interfaces/IChainlinkAccessControlAggregator.sol", "file": "./IChainlinkAccessControlAggregator.sol", "id": 4166, "nodeType": "ImportDirective", "scope": 4191, "sourceUnit": 4162, "src": "654:92:19", "symbolAliases": [ { "foreign": 4165, "local": null } ], "unitAlias": "" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": "@title IChainlinkAggregator\n@author Dolomite\n * Gets the latest price from the Chainlink Oracle Network. Amount of decimals depends on the base.", "fullyImplemented": false, "id": 4190, "linearizedBaseContracts": [ 4190 ], "name": "IChainlinkAggregator", "nodeType": "ContractDefinition", "nodes": [ { "body": null, "documentation": null, "id": 4171, "implemented": false, "kind": "function", "modifiers": [], "name": "aggregator", "nodeType": "FunctionDefinition", "parameters": { "id": 4167, "nodeType": "ParameterList", "parameters": [], "src": "967:2:19" }, "returnParameters": { "id": 4170, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4169, "name": "", "nodeType": "VariableDeclaration", "scope": 4171, "src": "993:33:19", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_IChainlinkAccessControlAggregator_$4161", "typeString": "contract IChainlinkAccessControlAggregator" }, "typeName": { "contractScope": null, "id": 4168, "name": "IChainlinkAccessControlAggregator", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 4161, "src": "993:33:19", "typeDescriptions": { "typeIdentifier": "t_contract$_IChainlinkAccessControlAggregator_$4161", "typeString": "contract IChainlinkAccessControlAggregator" } }, "value": null, "visibility": "internal" } ], "src": "992:35:19" }, "scope": 4190, "src": "948:80:19", "stateMutability": "view", "superFunction": null, "visibility": "external" }, { "body": null, "documentation": null, "id": 4176, "implemented": false, "kind": "function", "modifiers": [], "name": "decimals", "nodeType": "FunctionDefinition", "parameters": { "id": 4172, "nodeType": "ParameterList", "parameters": [], "src": "1051:2:19" }, "returnParameters": { "id": 4175, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4174, "name": "", "nodeType": "VariableDeclaration", "scope": 4176, "src": "1077:5:19", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" }, "typeName": { "id": 4173, "name": "uint8", "nodeType": "ElementaryTypeName", "src": "1077:5:19", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "value": null, "visibility": "internal" } ], "src": "1076:7:19" }, "scope": 4190, "src": "1034:50:19", "stateMutability": "view", "superFunction": null, "visibility": "external" }, { "body": null, "documentation": null, "id": 4189, "implemented": false, "kind": "function", "modifiers": [], "name": "latestRoundData", "nodeType": "FunctionDefinition", "parameters": { "id": 4177, "nodeType": "ParameterList", "parameters": [], "src": "1114:2:19" }, "returnParameters": { "id": 4188, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4179, "name": "roundId", "nodeType": "VariableDeclaration", "scope": 4189, "src": "1177:14:19", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint80", "typeString": "uint80" }, "typeName": { "id": 4178, "name": "uint80", "nodeType": "ElementaryTypeName", "src": "1177:6:19", "typeDescriptions": { "typeIdentifier": "t_uint80", "typeString": "uint80" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 4181, "name": "answer", "nodeType": "VariableDeclaration", "scope": 4189, "src": "1205:13:19", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" }, "typeName": { "id": 4180, "name": "int256", "nodeType": "ElementaryTypeName", "src": "1205:6:19", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 4183, "name": "startedAt", "nodeType": "VariableDeclaration", "scope": 4189, "src": "1232:17:19", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4182, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1232:7:19", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 4185, "name": "updatedAt", "nodeType": "VariableDeclaration", "scope": 4189, "src": "1263:17:19", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4184, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1263:7:19", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 4187, "name": "answeredInRound", "nodeType": "VariableDeclaration", "scope": 4189, "src": "1294:22:19", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint80", "typeString": "uint80" }, "typeName": { "id": 4186, "name": "uint80", "nodeType": "ElementaryTypeName", "src": "1294:6:19", "typeDescriptions": { "typeIdentifier": "t_uint80", "typeString": "uint80" } }, "value": null, "visibility": "internal" } ], "src": "1163:163:19" }, "scope": 4190, "src": "1090:237:19", "stateMutability": "view", "superFunction": null, "visibility": "external" } ], "scope": 4191, "src": "911:418:19" } ], "src": "595:735:19" }, "legacyAST": { "absolutePath": "/home/cdc218/projects/dolomite/dolomite-protocol-v2/contracts/external/interfaces/IChainlinkAggregator.sol", "exportedSymbols": { "IChainlinkAggregator": [ 4190 ] }, "id": 4191, "nodeType": "SourceUnit", "nodes": [ { "id": 4163, "literals": [ "solidity", "^", "0.5", ".7" ], "nodeType": "PragmaDirective", "src": "595:23:19" }, { "id": 4164, "literals": [ "experimental", "ABIEncoderV2" ], "nodeType": "PragmaDirective", "src": "619:33:19" }, { "absolutePath": "/home/cdc218/projects/dolomite/dolomite-protocol-v2/contracts/external/interfaces/IChainlinkAccessControlAggregator.sol", "file": "./IChainlinkAccessControlAggregator.sol", "id": 4166, "nodeType": "ImportDirective", "scope": 4191, "sourceUnit": 4162, "src": "654:92:19", "symbolAliases": [ { "foreign": 4165, "local": null } ], "unitAlias": "" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": "@title IChainlinkAggregator\n@author Dolomite\n * Gets the latest price from the Chainlink Oracle Network. Amount of decimals depends on the base.", "fullyImplemented": false, "id": 4190, "linearizedBaseContracts": [ 4190 ], "name": "IChainlinkAggregator", "nodeType": "ContractDefinition", "nodes": [ { "body": null, "documentation": null, "id": 4171, "implemented": false, "kind": "function", "modifiers": [], "name": "aggregator", "nodeType": "FunctionDefinition", "parameters": { "id": 4167, "nodeType": "ParameterList", "parameters": [], "src": "967:2:19" }, "returnParameters": { "id": 4170, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4169, "name": "", "nodeType": "VariableDeclaration", "scope": 4171, "src": "993:33:19", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_IChainlinkAccessControlAggregator_$4161", "typeString": "contract IChainlinkAccessControlAggregator" }, "typeName": { "contractScope": null, "id": 4168, "name": "IChainlinkAccessControlAggregator", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 4161, "src": "993:33:19", "typeDescriptions": { "typeIdentifier": "t_contract$_IChainlinkAccessControlAggregator_$4161", "typeString": "contract IChainlinkAccessControlAggregator" } }, "value": null, "visibility": "internal" } ], "src": "992:35:19" }, "scope": 4190, "src": "948:80:19", "stateMutability": "view", "superFunction": null, "visibility": "external" }, { "body": null, "documentation": null, "id": 4176, "implemented": false, "kind": "function", "modifiers": [], "name": "decimals", "nodeType": "FunctionDefinition", "parameters": { "id": 4172, "nodeType": "ParameterList", "parameters": [], "src": "1051:2:19" }, "returnParameters": { "id": 4175, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4174, "name": "", "nodeType": "VariableDeclaration", "scope": 4176, "src": "1077:5:19", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" }, "typeName": { "id": 4173, "name": "uint8", "nodeType": "ElementaryTypeName", "src": "1077:5:19", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "value": null, "visibility": "internal" } ], "src": "1076:7:19" }, "scope": 4190, "src": "1034:50:19", "stateMutability": "view", "superFunction": null, "visibility": "external" }, { "body": null, "documentation": null, "id": 4189, "implemented": false, "kind": "function", "modifiers": [], "name": "latestRoundData", "nodeType": "FunctionDefinition", "parameters": { "id": 4177, "nodeType": "ParameterList", "parameters": [], "src": "1114:2:19" }, "returnParameters": { "id": 4188, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4179, "name": "roundId", "nodeType": "VariableDeclaration", "scope": 4189, "src": "1177:14:19", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint80", "typeString": "uint80" }, "typeName": { "id": 4178, "name": "uint80", "nodeType": "ElementaryTypeName", "src": "1177:6:19", "typeDescriptions": { "typeIdentifier": "t_uint80", "typeString": "uint80" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 4181, "name": "answer", "nodeType": "VariableDeclaration", "scope": 4189, "src": "1205:13:19", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" }, "typeName": { "id": 4180, "name": "int256", "nodeType": "ElementaryTypeName", "src": "1205:6:19", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 4183, "name": "startedAt", "nodeType": "VariableDeclaration", "scope": 4189, "src": "1232:17:19", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4182, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1232:7:19", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 4185, "name": "updatedAt", "nodeType": "VariableDeclaration", "scope": 4189, "src": "1263:17:19", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4184, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1263:7:19", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 4187, "name": "answeredInRound", "nodeType": "VariableDeclaration", "scope": 4189, "src": "1294:22:19", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint80", "typeString": "uint80" }, "typeName": { "id": 4186, "name": "uint80", "nodeType": "ElementaryTypeName", "src": "1294:6:19", "typeDescriptions": { "typeIdentifier": "t_uint80", "typeString": "uint80" } }, "value": null, "visibility": "internal" } ], "src": "1163:163:19" }, "scope": 4190, "src": "1090:237:19", "stateMutability": "view", "superFunction": null, "visibility": "external" } ], "scope": 4191, "src": "911:418:19" } ], "src": "595:735:19" }, "compiler": { "name": "solc", "version": "0.5.16+commit.9c3226ce.Emscripten.clang" }, "networks": {}, "schemaVersion": "3.0.23", "updatedAt": "2026-03-02T16:38:28.529Z", "devdoc": { "author": "Dolomite * Gets the latest price from the Chainlink Oracle Network. Amount of decimals depends on the base.", "methods": {}, "title": "IChainlinkAggregator" }, "userdoc": { "methods": {} } }