UNPKG

@etherisc/gif-contracts

Version:

This repository holds the GIF core contracts and tools to develop, test and deploy GIF instances.

733 lines 20.7 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": { "30": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IComponent.sol", "31": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IOracle.sol", "44": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IRegistry.sol" }, "ast": { "absolutePath": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IOracle.sol", "exportedSymbols": { "IComponent": [ 22099 ], "IOracle": [ 22133 ], "IRegistry": [ 21750 ] }, "id": 22134, "license": "Apache-2.0", "nodeType": "SourceUnit", "nodes": [ { "id": 22101, "literals": [ "solidity", "0.8", ".2" ], "nodeType": "PragmaDirective", "src": "39:22:31" }, { "absolutePath": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IComponent.sol", "file": "./IComponent.sol", "id": 22102, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 22134, "sourceUnit": 22100, "src": "63:26:31", "symbolAliases": [], "unitAlias": "" }, { "abstract": false, "baseContracts": [ { "baseName": { "id": 22103, "name": "IComponent", "nodeType": "IdentifierPath", "referencedDeclaration": 22099, "src": "112:10:31" }, "id": 22104, "nodeType": "InheritanceSpecifier", "src": "112:10:31" } ], "contractDependencies": [ 22099 ], "contractKind": "interface", "fullyImplemented": false, "id": 22133, "linearizedBaseContracts": [ 22133, 22099 ], "name": "IOracle", "nameLocation": "101:7:31", "nodeType": "ContractDefinition", "nodes": [ { "anonymous": false, "id": 22108, "name": "LogOracleCreated", "nameLocation": "140:16:31", "nodeType": "EventDefinition", "parameters": { "id": 22107, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 22106, "indexed": false, "mutability": "mutable", "name": "oracleAddress", "nameLocation": "166:13:31", "nodeType": "VariableDeclaration", "scope": 22108, "src": "158:21:31", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 22105, "name": "address", "nodeType": "ElementaryTypeName", "src": "158:7:31", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" } ], "src": "157:23:31" }, "src": "134:47:31" }, { "anonymous": false, "id": 22112, "name": "LogOracleProposed", "nameLocation": "192:17:31", "nodeType": "EventDefinition", "parameters": { "id": 22111, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 22110, "indexed": false, "mutability": "mutable", "name": "componentId", "nameLocation": "219:11:31", "nodeType": "VariableDeclaration", "scope": 22112, "src": "211:19:31", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 22109, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "211:7:31", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "src": "210:21:31" }, "src": "186:46:31" }, { "anonymous": false, "id": 22116, "name": "LogOracleApproved", "nameLocation": "243:17:31", "nodeType": "EventDefinition", "parameters": { "id": 22115, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 22114, "indexed": false, "mutability": "mutable", "name": "componentId", "nameLocation": "270:11:31", "nodeType": "VariableDeclaration", "scope": 22116, "src": "262:19:31", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 22113, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "262:7:31", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "src": "261:21:31" }, "src": "237:46:31" }, { "anonymous": false, "id": 22120, "name": "LogOracleDeclined", "nameLocation": "294:17:31", "nodeType": "EventDefinition", "parameters": { "id": 22119, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 22118, "indexed": false, "mutability": "mutable", "name": "componentId", "nameLocation": "321:11:31", "nodeType": "VariableDeclaration", "scope": 22120, "src": "313:19:31", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 22117, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "313:7:31", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "src": "312:21:31" }, "src": "288:46:31" }, { "functionSelector": "ffc79065", "id": 22127, "implemented": false, "kind": "function", "modifiers": [], "name": "request", "nameLocation": "353:7:31", "nodeType": "FunctionDefinition", "parameters": { "id": 22125, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 22122, "mutability": "mutable", "name": "requestId", "nameLocation": "369:9:31", "nodeType": "VariableDeclaration", "scope": 22127, "src": "361:17:31", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 22121, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "361:7:31", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" }, { "constant": false, "id": 22124, "mutability": "mutable", "name": "input", "nameLocation": "395:5:31", "nodeType": "VariableDeclaration", "scope": 22127, "src": "380:20:31", "stateVariable": false, "storageLocation": "calldata", "typeDescriptions": { "typeIdentifier": "t_bytes_calldata_ptr", "typeString": "bytes" }, "typeName": { "id": 22123, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "380:5:31", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "visibility": "internal" } ], "src": "360:41:31" }, "returnParameters": { "id": 22126, "nodeType": "ParameterList", "parameters": [], "src": "410:0:31" }, "scope": 22133, "src": "344:67:31", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { "functionSelector": "40e58ee5", "id": 22132, "implemented": false, "kind": "function", "modifiers": [], "name": "cancel", "nameLocation": "425:6:31", "nodeType": "FunctionDefinition", "parameters": { "id": 22130, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 22129, "mutability": "mutable", "name": "requestId", "nameLocation": "440:9:31", "nodeType": "VariableDeclaration", "scope": 22132, "src": "432:17:31", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 22128, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "432:7:31", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "src": "431:19:31" }, "returnParameters": { "id": 22131, "nodeType": "ParameterList", "parameters": [], "src": "459:0:31" }, "scope": 22133, "src": "416:44:31", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" } ], "scope": 22134, "src": "91:371:31" } ], "src": "39:424:31" }, "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/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IOracle.sol", "type": "interface" }