UNPKG

@etherisc/terraguard-poc-contracts

Version:

Etherisc's smart contracts for the terraguard poc

733 lines 20.6 kB
{ "abi": [ { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "bytes32", "name": "componentName", "type": "bytes32" }, { "indexed": false, "internalType": "enum IComponent.ComponentType", "name": "componentType", "type": "uint8" }, { "indexed": false, "internalType": "address", "name": "componentAddress", "type": "address" }, { "indexed": false, "internalType": "address", "name": "registryAddress", "type": "address" } ], "name": "LogComponentCreated", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "componentId", "type": "uint256" } ], "name": "LogOracleApproved", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "oracleAddress", "type": "address" } ], "name": "LogOracleCreated", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "componentId", "type": "uint256" } ], "name": "LogOracleDeclined", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "componentId", "type": "uint256" } ], "name": "LogOracleProposed", "type": "event" }, { "inputs": [], "name": "approvalCallback", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "archiveCallback", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "requestId", "type": "uint256" } ], "name": "cancel", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "declineCallback", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "getId", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getName", "outputs": [ { "internalType": "bytes32", "name": "", "type": "bytes32" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getOwner", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getRegistry", "outputs": [ { "internalType": "contract IRegistry", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getState", "outputs": [ { "internalType": "enum IComponent.ComponentState", "name": "", "type": "uint8" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getType", "outputs": [ { "internalType": "enum IComponent.ComponentType", "name": "", "type": "uint8" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "isOracle", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "isProduct", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "isRiskpool", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "pauseCallback", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "proposalCallback", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "requestId", "type": "uint256" }, { "internalType": "bytes", "name": "input", "type": "bytes" } ], "name": "request", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "resumeCallback", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "id", "type": "uint256" } ], "name": "setId", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "suspendCallback", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "unpauseCallback", "outputs": [], "stateMutability": "nonpayable", "type": "function" } ], "allSourcePaths": { "10": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IOracle.sol", "21": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IRegistry.sol", "9": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IComponent.sol" }, "ast": { "absolutePath": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IOracle.sol", "exportedSymbols": { "IComponent": [ 5218 ], "IOracle": [ 5252 ], "IRegistry": [ 7009 ] }, "id": 5253, "license": "Apache-2.0", "nodeType": "SourceUnit", "nodes": [ { "id": 5220, "literals": [ "solidity", "0.8", ".2" ], "nodeType": "PragmaDirective", "src": "39:22:10" }, { "absolutePath": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IComponent.sol", "file": "./IComponent.sol", "id": 5221, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 5253, "sourceUnit": 5219, "src": "63:26:10", "symbolAliases": [], "unitAlias": "" }, { "abstract": false, "baseContracts": [ { "baseName": { "id": 5222, "name": "IComponent", "nodeType": "IdentifierPath", "referencedDeclaration": 5218, "src": "112:10:10" }, "id": 5223, "nodeType": "InheritanceSpecifier", "src": "112:10:10" } ], "contractDependencies": [ 5218 ], "contractKind": "interface", "fullyImplemented": false, "id": 5252, "linearizedBaseContracts": [ 5252, 5218 ], "name": "IOracle", "nameLocation": "101:7:10", "nodeType": "ContractDefinition", "nodes": [ { "anonymous": false, "id": 5227, "name": "LogOracleCreated", "nameLocation": "140:16:10", "nodeType": "EventDefinition", "parameters": { "id": 5226, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 5225, "indexed": false, "mutability": "mutable", "name": "oracleAddress", "nameLocation": "166:13:10", "nodeType": "VariableDeclaration", "scope": 5227, "src": "158:21:10", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 5224, "name": "address", "nodeType": "ElementaryTypeName", "src": "158:7:10", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" } ], "src": "157:23:10" }, "src": "134:47:10" }, { "anonymous": false, "id": 5231, "name": "LogOracleProposed", "nameLocation": "192:17:10", "nodeType": "EventDefinition", "parameters": { "id": 5230, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 5229, "indexed": false, "mutability": "mutable", "name": "componentId", "nameLocation": "219:11:10", "nodeType": "VariableDeclaration", "scope": 5231, "src": "211:19:10", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5228, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "211:7:10", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "src": "210:21:10" }, "src": "186:46:10" }, { "anonymous": false, "id": 5235, "name": "LogOracleApproved", "nameLocation": "243:17:10", "nodeType": "EventDefinition", "parameters": { "id": 5234, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 5233, "indexed": false, "mutability": "mutable", "name": "componentId", "nameLocation": "270:11:10", "nodeType": "VariableDeclaration", "scope": 5235, "src": "262:19:10", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5232, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "262:7:10", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "src": "261:21:10" }, "src": "237:46:10" }, { "anonymous": false, "id": 5239, "name": "LogOracleDeclined", "nameLocation": "294:17:10", "nodeType": "EventDefinition", "parameters": { "id": 5238, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 5237, "indexed": false, "mutability": "mutable", "name": "componentId", "nameLocation": "321:11:10", "nodeType": "VariableDeclaration", "scope": 5239, "src": "313:19:10", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5236, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "313:7:10", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "src": "312:21:10" }, "src": "288:46:10" }, { "functionSelector": "ffc79065", "id": 5246, "implemented": false, "kind": "function", "modifiers": [], "name": "request", "nameLocation": "353:7:10", "nodeType": "FunctionDefinition", "parameters": { "id": 5244, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 5241, "mutability": "mutable", "name": "requestId", "nameLocation": "369:9:10", "nodeType": "VariableDeclaration", "scope": 5246, "src": "361:17:10", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5240, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "361:7:10", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" }, { "constant": false, "id": 5243, "mutability": "mutable", "name": "input", "nameLocation": "395:5:10", "nodeType": "VariableDeclaration", "scope": 5246, "src": "380:20:10", "stateVariable": false, "storageLocation": "calldata", "typeDescriptions": { "typeIdentifier": "t_bytes_calldata_ptr", "typeString": "bytes" }, "typeName": { "id": 5242, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "380:5:10", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "visibility": "internal" } ], "src": "360:41:10" }, "returnParameters": { "id": 5245, "nodeType": "ParameterList", "parameters": [], "src": "410:0:10" }, "scope": 5252, "src": "344:67:10", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { "functionSelector": "40e58ee5", "id": 5251, "implemented": false, "kind": "function", "modifiers": [], "name": "cancel", "nameLocation": "425:6:10", "nodeType": "FunctionDefinition", "parameters": { "id": 5249, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 5248, "mutability": "mutable", "name": "requestId", "nameLocation": "440:9:10", "nodeType": "VariableDeclaration", "scope": 5251, "src": "432:17:10", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5247, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "432:7:10", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "src": "431:19:10" }, "returnParameters": { "id": 5250, "nodeType": "ParameterList", "parameters": [], "src": "459:0:10" }, "scope": 5252, "src": "416:44:10", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" } ], "scope": 5253, "src": "91:371:10" } ], "src": "39:424:10" }, "bytecode": "", "bytecodeSha1": "da39a3ee5e6b4b0d3255bfef95601890afd80709", "compiler": { "evm_version": "istanbul", "optimizer": { "enabled": true, "runs": 200 }, "version": "0.8.2+commit.661d1103" }, "contractName": "IOracle", "coverageMap": { "branches": {}, "statements": {} }, "dependencies": [ "etherisc/gif-interface@3b0002a/IComponent", "etherisc/gif-interface@3b0002a/IRegistry" ], "deployedBytecode": "", "deployedSourceMap": "", "language": "Solidity", "natspec": { "kind": "dev", "methods": {}, "version": 1 }, "offset": [ 91, 462 ], "opcodes": "", "pcMap": {}, "sha1": "c7fe17eba5b49c1fa2ac46e359cd7d5b17a38115", "source": "// SPDX-License-Identifier: Apache-2.0\npragma solidity 0.8.2;\n\nimport \"./IComponent.sol\";\n\ninterface IOracle is IComponent {\n \n event LogOracleCreated (address oracleAddress);\n event LogOracleProposed (uint256 componentId);\n event LogOracleApproved (uint256 componentId);\n event LogOracleDeclined (uint256 componentId);\n \n function request(uint256 requestId, bytes calldata input) external;\n function cancel(uint256 requestId) external;\n}\n", "sourceMap": "", "sourcePath": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IOracle.sol", "type": "interface" }