@etherisc/depeg-contracts
Version:
Etherisc's smart contracts for a depeg insurance for stable coins.
1,646 lines (1,645 loc) • 759 kB
JSON
{
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "aggregatorAddressMainnet",
"type": "address"
},
{
"internalType": "address",
"name": "aggregatorAddressGoerli",
"type": "address"
},
{
"internalType": "uint256",
"name": "deviationLevel",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "heartbeatSeconds",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "heartbeatMarginSeconds",
"type": "uint256"
},
{
"internalType": "string",
"name": "testDescription",
"type": "string"
},
{
"internalType": "uint8",
"name": "testDecimals",
"type": "uint8"
},
{
"internalType": "uint256",
"name": "testVersion",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"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"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "previousOwner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "OwnershipTransferred",
"type": "event"
},
{
"inputs": [],
"name": "GANACHE",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "GANACHE2",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "GOERLI",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "MAINNET",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "MUMBAI",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "int256",
"name": "answer",
"type": "int256"
},
{
"internalType": "uint256",
"name": "startedAt",
"type": "uint256"
}
],
"name": "addRoundData",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "decimals",
"outputs": [
{
"internalType": "uint8",
"name": "",
"type": "uint8"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "description",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "deviation",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "roundId",
"type": "uint256"
}
],
"name": "getAnswer",
"outputs": [
{
"internalType": "int256",
"name": "",
"type": "int256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getChainlinkAggregatorAddress",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint80",
"name": "_roundId",
"type": "uint80"
}
],
"name": "getRoundData",
"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"
}
],
"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": "heartbeat",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "heartbeatMargin",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "price1",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "price2",
"type": "uint256"
}
],
"name": "isExceedingDeviation",
"outputs": [
{
"internalType": "bool",
"name": "isExceeding",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "time1",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "time2",
"type": "uint256"
}
],
"name": "isExceedingHeartbeat",
"outputs": [
{
"internalType": "bool",
"name": "isExceeding",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "isMainnet",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "isTestnet",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"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": "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"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "latestTimestamp",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "owner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "renounceOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"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"
}
],
"name": "setRoundData",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "transferOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "version",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
}
],
"allSourcePaths": {
"0": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/access/Ownable.sol",
"11": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/Context.sol",
"47": "/home/vscode/.brownie/packages/smartcontractkit/chainlink@1.10.0/contracts/src/v0.8/interfaces/AggregatorInterface.sol",
"48": "/home/vscode/.brownie/packages/smartcontractkit/chainlink@1.10.0/contracts/src/v0.8/interfaces/AggregatorV2V3Interface.sol",
"49": "/home/vscode/.brownie/packages/smartcontractkit/chainlink@1.10.0/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol",
"50": "contracts/AggregatorDataProvider.sol"
},
"ast": {
"absolutePath": "contracts/AggregatorDataProvider.sol",
"exportedSymbols": {
"AggregatorDataProvider": [
612
],
"AggregatorInterface": [
15696
],
"AggregatorV2V3Interface": [
9485
],
"AggregatorV3Interface": [
15742
],
"Context": [
15648
],
"Ownable": [
9476
]
},
"id": 613,
"license": "Apache-2.0",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1,
"literals": [
"solidity",
"0.8",
".2"
],
"nodeType": "PragmaDirective",
"src": "39:22:50"
},
{
"absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/access/Ownable.sol",
"file": "@openzeppelin/contracts/access/Ownable.sol",
"id": 2,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 613,
"sourceUnit": 9477,
"src": "63:52:50",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/vscode/.brownie/packages/smartcontractkit/chainlink@1.10.0/contracts/src/v0.8/interfaces/AggregatorV2V3Interface.sol",
"file": "@chainlink/contracts/src/v0.8/interfaces/AggregatorV2V3Interface.sol",
"id": 3,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 613,
"sourceUnit": 9486,
"src": "180:78:50",
"symbolAliases": [],
"unitAlias": ""
},
{
"abstract": false,
"baseContracts": [
{
"baseName": {
"id": 4,
"name": "Ownable",
"nodeType": "IdentifierPath",
"referencedDeclaration": 9476,
"src": "300:7:50"
},
"id": 5,
"nodeType": "InheritanceSpecifier",
"src": "300:7:50"
},
{
"baseName": {
"id": 6,
"name": "AggregatorV2V3Interface",
"nodeType": "IdentifierPath",
"referencedDeclaration": 9485,
"src": "313:23:50"
},
"id": 7,
"nodeType": "InheritanceSpecifier",
"src": "313:23:50"
}
],
"contractDependencies": [
9476,
9485,
15648,
15696,
15742
],
"contractKind": "contract",
"fullyImplemented": true,
"id": 612,
"linearizedBaseContracts": [
612,
9485,
15742,
15696,
9476,
15648
],
"name": "AggregatorDataProvider",
"nameLocation": "269:22:50",
"nodeType": "ContractDefinition",
"nodes": [
{
"canonicalName": "AggregatorDataProvider.ChainlinkRoundData",
"id": 18,
"members": [
{
"constant": false,
"id": 9,
"mutability": "mutable",
"name": "roundId",
"nameLocation": "433:7:50",
"nodeType": "VariableDeclaration",
"scope": 18,
"src": "426:14:50",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint80",
"typeString": "uint80"
},
"typeName": {
"id": 8,
"name": "uint80",
"nodeType": "ElementaryTypeName",
"src": "426:6:50",
"typeDescriptions": {
"typeIdentifier": "t_uint80",
"typeString": "uint80"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 11,
"mutability": "mutable",
"name": "answer",
"nameLocation": "457:6:50",
"nodeType": "VariableDeclaration",
"scope": 18,
"src": "450:13:50",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"typeName": {
"id": 10,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "450:6:50",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 13,
"mutability": "mutable",
"name": "startedAt",
"nameLocation": "481:9:50",
"nodeType": "VariableDeclaration",
"scope": 18,
"src": "473:17:50",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 12,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "473:7:50",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 15,
"mutability": "mutable",
"name": "updatedAt",
"nameLocation": "508:9:50",
"nodeType": "VariableDeclaration",
"scope": 18,
"src": "500:17:50",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 14,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "500:7:50",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 17,
"mutability": "mutable",
"name": "answeredInRound",
"nameLocation": "534:15:50",
"nodeType": "VariableDeclaration",
"scope": 18,
"src": "527:22:50",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint80",
"typeString": "uint80"
},
"typeName": {
"id": 16,
"name": "uint80",
"nodeType": "ElementaryTypeName",
"src": "527:6:50",
"typeDescriptions": {
"typeIdentifier": "t_uint80",
"typeString": "uint80"
}
},
"visibility": "internal"
}
],
"name": "ChainlinkRoundData",
"nameLocation": "397:18:50",
"nodeType": "StructDefinition",
"scope": 612,
"src": "390:166:50",
"visibility": "public"
},
{
"constant": true,
"functionSelector": "510547f9",
"id": 21,
"mutability": "constant",
"name": "MAINNET",
"nameLocation": "586:7:50",
"nodeType": "VariableDeclaration",
"scope": 612,
"src": "562:35:50",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 19,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "562:7:50",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": {
"hexValue": "31",
"id": 20,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "596:1:50",
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"visibility": "public"
},
{
"constant": true,
"functionSelector": "61148af0",
"id": 24,
"mutability": "constant",
"name": "GOERLI",
"nameLocation": "627:6:50",
"nodeType": "VariableDeclaration",
"scope": 612,
"src": "603:34:50",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 22,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "603:7:50",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": {
"hexValue": "35",
"id": 23,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "636:1:50",
"typeDescriptions": {
"typeIdentifier": "t_rational_5_by_1",
"typeString": "int_const 5"
},
"value": "5"
},
"visibility": "public"
},
{
"constant": true,
"functionSelector": "8746ea6c",
"id": 27,
"mutability": "constant",
"name": "GANACHE",
"nameLocation": "668:7:50",
"nodeType": "VariableDeclaration",
"scope": 612,
"src": "644:38:50",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 25,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "644:7:50",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": {
"hexValue": "31333337",
"id": 26,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "678:4:50",
"typeDescriptions": {
"typeIdentifier": "t_rational_1337_by_1",
"typeString": "int_const 1337"
},
"value": "1337"
},
"visibility": "public"
},
{
"constant": true,
"functionSelector": "0f937d17",
"id": 30,
"mutability": "constant",
"name": "GANACHE2",
"nameLocation": "712:8:50",
"nodeType": "VariableDeclaration",
"scope": 612,
"src": "688:39:50",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 28,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "688:7:50",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": {
"hexValue": "31323334",
"id": 29,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "723:4:50",
"typeDescriptions": {
"typeIdentifier": "t_rational_1234_by_1",
"typeString": "int_const 1234"
},
"value": "1234"
},
"visibility": "public"
},
{
"constant": true,
"functionSelector": "89c80d2f",
"id": 33,
"mutability": "constant",
"name": "MUMBAI",
"nameLocation": "757:6:50",
"nodeType": "VariableDeclaration",
"scope": 612,
"src": "733:38:50",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 31,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "733:7:50",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": {
"hexValue": "3830303031",
"id": 32,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "766:5:50",
"typeDescriptions": {
"typeIdentifier": "t_rational_80001_by_1",
"typeString": "int_const 80001"
},
"value": "80001"
},
"visibility": "public"
},
{
"constant": false,
"id": 36,
"mutability": "mutable",
"name": "_aggregator",
"nameLocation": "814:11:50",
"nodeType": "VariableDeclaration",
"scope": 612,
"src": "782:43:50",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_AggregatorV2V3Interface_$9485",
"typeString": "contract AggregatorV2V3Interface"
},
"typeName": {
"id": 35,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 34,
"name": "AggregatorV2V3Interface",
"nodeType": "IdentifierPath",
"referencedDeclaration": 9485,
"src": "782:23:50"
},
"referencedDeclaration": 9485,
"src": "782:23:50",
"typeDescriptions": {
"typeIdentifier": "t_contract$_AggregatorV2V3Interface_$9485",
"typeString": "contract AggregatorV2V3Interface"
}
},
"visibility": "private"
},
{
"constant": false,
"id": 38,
"mutability": "mutable",
"name": "_deviation",
"nameLocation": "848:10:50",
"nodeType": "VariableDeclaration",
"scope": 612,
"src": "832:26:50",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 37,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "832:7:50",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "private"
},
{
"constant": false,
"id": 40,
"mutability": "mutable",
"name": "_heartbeat",
"nameLocation": "880:10:50",
"nodeType": "VariableDeclaration",
"scope": 612,
"src": "864:26:50",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 39,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "864:7:50",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "private"
},
{
"constant": false,
"id": 42,
"mutability": "mutable",
"name": "_heartbeatMargin",
"nameLocation": "912:16:50",
"nodeType": "VariableDeclaration",
"scope": 612,
"src": "896:32:50",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 41,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "896:7:50",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "private"
},
{
"constant": false,
"id": 44,
"mutability": "mutable",
"name": "_description",
"nameLocation": "950:12:50",
"nodeType": "VariableDeclaration",
"scope": 612,
"src": "935:27:50",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_storage",
"typeString": "string"
},
"typeName": {
"id": 43,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "935:6:50",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "private"
},
{
"constant": false,
"id": 46,
"mutability": "mutable",
"name": "_decimals",
"nameLocation": "982:9:50",
"nodeType": "VariableDeclaration",
"scope": 612,
"src": "968:23:50",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 45,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "968:5:50",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"visibility": "private"
},
{
"constant": false,
"id": 48,
"mutability": "mutable",
"name": "_version",
"nameLocation": "1013:8:50",
"nodeType": "VariableDeclaration",
"scope": 612,
"src": "997:24:50",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 47,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "997:7:50",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "private"
},
{
"constant": false,
"id": 53,
"mutability": "mutable",
"name": "_aggregatorData",
"nameLocation": "1089:15:50",
"nodeType": "VariableDeclaration",
"scope": 612,
"src": "1028:76:50",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint80_$_t_struct$_ChainlinkRoundData_$18_storage_$",
"typeString": "mapping(uint80 => struct AggregatorDataProvider.ChainlinkRoundData)"
},
"typeName": {
"id": 52,
"keyType": {
"id": 49,
"name": "uint80",
"nodeType": "ElementaryTypeName",
"src": "1036:6:50",
"typeDescriptions": {
"typeIdentifier": "t_uint80",
"typeString": "uint80"
}
},
"nodeType": "Mapping",
"src": "1028:52:50",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_uint80_$_t_struct$_ChainlinkRoundData_$18_storage_$",
"typeString": "mapping(uint80 => struct AggregatorDataProvider.ChainlinkRoundData)"
},
"valueType": {
"id": 51,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 50,
"name": "ChainlinkRoundData",
"nodeType": "IdentifierPath",
"referencedDeclaration": 18,
"src": "1061:18:50"
},
"referencedDeclaration": 18,
"src": "1061:18:50",
"typeDescriptions": {
"typeIdentifier": "t_struct$_ChainlinkRoundData_$18_storage_ptr",
"typeString": "struct AggregatorDataProvider.ChainlinkRoundData"
}
}
},
"visibility": "private"
},
{
"constant": false,
"id": 56,
"mutability": "mutable",
"name": "_roundIds",
"nameLocation": "1128:9:50",
"nodeType": "VariableDeclaration",
"scope": 612,
"src": "1110:27:50",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint80_$dyn_storage",
"typeString": "uint80[]"
},
"typeName": {
"baseType": {
"id": 54,
"name": "uint80",
"nodeType": "ElementaryTypeName",
"src": "1110:6:50",
"typeDescriptions": {
"typeIdentifier": "t_uint80",
"typeString": "uint80"
}
},
"id": 55,
"nodeType": "ArrayTypeName",
"src": "1110:9:50",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint80_$dyn_storage_ptr",
"typeString": "uint80[]"
}
},
"visibility": "private"
},
{
"constant": false,
"id": 58,
"mutability": "mutable",
"name": "_maxRoundId",
"nameLocation": "1158:11:50",
"nodeType": "VariableDeclaration",
"scope": 612,
"src": "1143:26:50",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint80",
"typeString": "uint80"
},
"typeName": {
"id": 57,
"name": "uint80",
"nodeType": "ElementaryTypeName",
"src": "1143:6:50",
"typeDescriptions": {
"typeIdentifier": "t_uint80",
"typeString": "uint80"
}
},
"visibility": "private"
},
{
"body": {
"id": 67,
"nodeType": "Block",
"src": "1199:80:50",
"statements": [
{
"expression": {
"arguments": [
{
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 61,
"name": "isTestnet",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 611,
"src": "1217:9:50",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$",
"typeString": "function () view returns (bool)"
}
},
"id": 62,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1217:11:50",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"hexValue": "4552524f523a4144502d3030313a4e4f545f544553545f434841494e",
"id": 63,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1230:30:50",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_f577d3b8674f90f34f7d4af33168e620d308d8ed9488532b07bd2e1d9ccf8335",
"typeString": "literal_string \"ERROR:ADP-001:NOT_TEST_CHAIN\""
},
"value": "ERROR:ADP-001:NOT_TEST_CHAIN"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_f577d3b8674f90f34f7d4af33168e620d308d8ed9488532b07bd2e1d9ccf8335",
"typeString": "literal_string \"ERROR:ADP-001:NOT_TEST_CHAIN\""
}
],
"id": 60,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
"src": "1209:7:50",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 64,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1209:52:50",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 65,
"nodeType": "ExpressionStatement",
"src": "1209:52:50"
},
{
"id": 66,
"nodeType": "PlaceholderStatement",
"src": "1271:1:50"
}
]
},
"id": 68,
"name": "onlyTestnet",
"nameLocation": "1185:11:50",
"nodeType": "ModifierDefinition",
"parameters": {
"id": 59,
"nodeType": "ParameterList",
"parameters": [],
"src": "1196:2:50"
},
"src": "1176:103:50",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 163,
"nodeType": "Block",
"src": "1651:733:50",
"statements": [
{
"condition": {
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 89,
"name": "isMainnet",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 587,
"src": "1664:9:50",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$",
"typeString": "function () view returns (bool)"
}
},
"id": 90,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1664:11:50",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"condition": {
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 116,
"name": "isTestnet",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 611,
"src": "1953:9:50",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$",
"typeString": "function () view returns (bool)"
}
},
"id": 117,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1953:11:50",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"id": 132,
"nodeType": "Block",
"src": "2049:68:50",
"statements": [
{
"expression": {
"arguments": [
{
"hexValue": "4552524f523a4144502d3031303a434841494e5f4e4f545f535550504f52544554",
"id": 129,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2070:35:50",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_11c204e6c99fd9beeccbc7e5ac18a0af11ddecd3489ebb62be7e5a4bd9fcc531",
"typeString": "literal_string \"ERROR:ADP-010:CHAIN_NOT_SUPPORTET\""
},
"value": "ERROR:ADP-010:CHAIN_NOT_SUPPORTET"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_stringliteral_11c204e6c99fd9beeccbc7e5ac18a0af11ddecd3489ebb62be7e5a4bd9fcc531",
"typeString": "literal_string \"ERROR:ADP-010:CHAIN_NOT_SUPPORTET\""
}
],
"id": 128,
"name": "revert",
"nodeType": "Identifier",
"overloadedDeclarations": [
-19,
-19
],
"referencedDeclaration": -19,
"src": "2063:6:50",
"typeDescriptions": {
"typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$",
"typeString": "function (string memory) pure"
}
},
"id": 130,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2063:43:50",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 131,
"nodeType": "ExpressionStatement",
"src": "2063:43:50"
}
]
},
"id": 133,
"nodeType": "IfStatement",
"src": "1950:167:50",
"trueBody": {
"id": 127,
"nodeType": "Block",
"src": "1966:77:50",
"statements": [
{
"expression": {
"id": 125,