UNPKG

@etherisc/depeg-contracts

Version:

Etherisc's smart contracts for a depeg insurance for stable coins.

742 lines 23.9 kB
{ "abi": [ { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "int256", "name": "current", "type": "int256" }, { "indexed": true, "internalType": "uint256", "name": "roundId", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "updatedAt", "type": "uint256" } ], "name": "AnswerUpdated", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "uint256", "name": "roundId", "type": "uint256" }, { "indexed": true, "internalType": "address", "name": "startedBy", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "startedAt", "type": "uint256" } ], "name": "NewRound", "type": "event" }, { "inputs": [ { "internalType": "uint256", "name": "roundId", "type": "uint256" } ], "name": "getAnswer", "outputs": [ { "internalType": "int256", "name": "", "type": "int256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "roundId", "type": "uint256" } ], "name": "getTimestamp", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "latestAnswer", "outputs": [ { "internalType": "int256", "name": "", "type": "int256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "latestRound", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "latestTimestamp", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" } ], "allSourcePaths": { "47": "/home/vscode/.brownie/packages/smartcontractkit/chainlink@1.10.0/contracts/src/v0.8/interfaces/AggregatorInterface.sol" }, "ast": { "absolutePath": "/home/vscode/.brownie/packages/smartcontractkit/chainlink@1.10.0/contracts/src/v0.8/interfaces/AggregatorInterface.sol", "exportedSymbols": { "AggregatorInterface": [ 15696 ] }, "id": 15697, "license": "MIT", "nodeType": "SourceUnit", "nodes": [ { "id": 15650, "literals": [ "solidity", "^", "0.8", ".0" ], "nodeType": "PragmaDirective", "src": "32:23:47" }, { "abstract": false, "baseContracts": [], "contractDependencies": [], "contractKind": "interface", "fullyImplemented": false, "id": 15696, "linearizedBaseContracts": [ 15696 ], "name": "AggregatorInterface", "nameLocation": "67:19:47", "nodeType": "ContractDefinition", "nodes": [ { "functionSelector": "50d25bcd", "id": 15655, "implemented": false, "kind": "function", "modifiers": [], "name": "latestAnswer", "nameLocation": "100:12:47", "nodeType": "FunctionDefinition", "parameters": { "id": 15651, "nodeType": "ParameterList", "parameters": [], "src": "112:2:47" }, "returnParameters": { "id": 15654, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 15653, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 15655, "src": "138:6:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" }, "typeName": { "id": 15652, "name": "int256", "nodeType": "ElementaryTypeName", "src": "138:6:47", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, "visibility": "internal" } ], "src": "137:8:47" }, "scope": 15696, "src": "91:55:47", "stateMutability": "view", "virtual": false, "visibility": "external" }, { "functionSelector": "8205bf6a", "id": 15660, "implemented": false, "kind": "function", "modifiers": [], "name": "latestTimestamp", "nameLocation": "159:15:47", "nodeType": "FunctionDefinition", "parameters": { "id": 15656, "nodeType": "ParameterList", "parameters": [], "src": "174:2:47" }, "returnParameters": { "id": 15659, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 15658, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 15660, "src": "200:7:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 15657, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "200:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "src": "199:9:47" }, "scope": 15696, "src": "150:59:47", "stateMutability": "view", "virtual": false, "visibility": "external" }, { "functionSelector": "668a0f02", "id": 15665, "implemented": false, "kind": "function", "modifiers": [], "name": "latestRound", "nameLocation": "222:11:47", "nodeType": "FunctionDefinition", "parameters": { "id": 15661, "nodeType": "ParameterList", "parameters": [], "src": "233:2:47" }, "returnParameters": { "id": 15664, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 15663, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 15665, "src": "259:7:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 15662, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "259:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "src": "258:9:47" }, "scope": 15696, "src": "213:55:47", "stateMutability": "view", "virtual": false, "visibility": "external" }, { "functionSelector": "b5ab58dc", "id": 15672, "implemented": false, "kind": "function", "modifiers": [], "name": "getAnswer", "nameLocation": "281:9:47", "nodeType": "FunctionDefinition", "parameters": { "id": 15668, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 15667, "mutability": "mutable", "name": "roundId", "nameLocation": "299:7:47", "nodeType": "VariableDeclaration", "scope": 15672, "src": "291:15:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 15666, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "291:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "src": "290:17:47" }, "returnParameters": { "id": 15671, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 15670, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 15672, "src": "331:6:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" }, "typeName": { "id": 15669, "name": "int256", "nodeType": "ElementaryTypeName", "src": "331:6:47", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, "visibility": "internal" } ], "src": "330:8:47" }, "scope": 15696, "src": "272:67:47", "stateMutability": "view", "virtual": false, "visibility": "external" }, { "functionSelector": "b633620c", "id": 15679, "implemented": false, "kind": "function", "modifiers": [], "name": "getTimestamp", "nameLocation": "352:12:47", "nodeType": "FunctionDefinition", "parameters": { "id": 15675, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 15674, "mutability": "mutable", "name": "roundId", "nameLocation": "373:7:47", "nodeType": "VariableDeclaration", "scope": 15679, "src": "365:15:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 15673, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "365:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "src": "364:17:47" }, "returnParameters": { "id": 15678, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 15677, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 15679, "src": "405:7:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 15676, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "405:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "src": "404:9:47" }, "scope": 15696, "src": "343:71:47", "stateMutability": "view", "virtual": false, "visibility": "external" }, { "anonymous": false, "id": 15687, "name": "AnswerUpdated", "nameLocation": "424:13:47", "nodeType": "EventDefinition", "parameters": { "id": 15686, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 15681, "indexed": true, "mutability": "mutable", "name": "current", "nameLocation": "453:7:47", "nodeType": "VariableDeclaration", "scope": 15687, "src": "438:22:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" }, "typeName": { "id": 15680, "name": "int256", "nodeType": "ElementaryTypeName", "src": "438:6:47", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, "visibility": "internal" }, { "constant": false, "id": 15683, "indexed": true, "mutability": "mutable", "name": "roundId", "nameLocation": "478:7:47", "nodeType": "VariableDeclaration", "scope": 15687, "src": "462:23:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 15682, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "462:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" }, { "constant": false, "id": 15685, "indexed": false, "mutability": "mutable", "name": "updatedAt", "nameLocation": "495:9:47", "nodeType": "VariableDeclaration", "scope": 15687, "src": "487:17:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 15684, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "487:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "src": "437:68:47" }, "src": "418:88:47" }, { "anonymous": false, "id": 15695, "name": "NewRound", "nameLocation": "516:8:47", "nodeType": "EventDefinition", "parameters": { "id": 15694, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 15689, "indexed": true, "mutability": "mutable", "name": "roundId", "nameLocation": "541:7:47", "nodeType": "VariableDeclaration", "scope": 15695, "src": "525:23:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 15688, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "525:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" }, { "constant": false, "id": 15691, "indexed": true, "mutability": "mutable", "name": "startedBy", "nameLocation": "566:9:47", "nodeType": "VariableDeclaration", "scope": 15695, "src": "550:25:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 15690, "name": "address", "nodeType": "ElementaryTypeName", "src": "550:7:47", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" }, { "constant": false, "id": 15693, "indexed": false, "mutability": "mutable", "name": "startedAt", "nameLocation": "585:9:47", "nodeType": "VariableDeclaration", "scope": 15695, "src": "577:17:47", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 15692, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "577:7:47", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "src": "524:71:47" }, "src": "510:86:47" } ], "scope": 15697, "src": "57:541:47" } ], "src": "32:567:47" }, "bytecode": "", "bytecodeSha1": "da39a3ee5e6b4b0d3255bfef95601890afd80709", "compiler": { "evm_version": "istanbul", "optimizer": { "enabled": true, "runs": 200 }, "version": "0.8.2+commit.661d1103" }, "contractName": "AggregatorInterface", "coverageMap": { "branches": {}, "statements": {} }, "dependencies": [], "deployedBytecode": "", "deployedSourceMap": "", "language": "Solidity", "natspec": { "kind": "dev", "methods": {}, "version": 1 }, "offset": [ 57, 598 ], "opcodes": "", "pcMap": {}, "sha1": "4aaf435b766360187b94b2beaabd8a5e63e6896b", "source": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface AggregatorInterface {\n function latestAnswer() external view returns (int256);\n\n function latestTimestamp() external view returns (uint256);\n\n function latestRound() external view returns (uint256);\n\n function getAnswer(uint256 roundId) external view returns (int256);\n\n function getTimestamp(uint256 roundId) external view returns (uint256);\n\n event AnswerUpdated(int256 indexed current, uint256 indexed roundId, uint256 updatedAt);\n\n event NewRound(uint256 indexed roundId, address indexed startedBy, uint256 startedAt);\n}\n", "sourceMap": "", "sourcePath": "/home/vscode/.brownie/packages/smartcontractkit/chainlink@1.10.0/contracts/src/v0.8/interfaces/AggregatorInterface.sol", "type": "interface" }