UNPKG

@etherisc/gif-contracts

Version:

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

1,043 lines 31 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": "LogProductApproved", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "productAddress", "type": "address" } ], "name": "LogProductCreated", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "componentId", "type": "uint256" } ], "name": "LogProductDeclined", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "componentId", "type": "uint256" } ], "name": "LogProductProposed", "type": "event" }, { "inputs": [], "name": "approvalCallback", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "archiveCallback", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "declineCallback", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "getApplicationDataStructure", "outputs": [ { "internalType": "string", "name": "dataStructure", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getClaimDataStructure", "outputs": [ { "internalType": "string", "name": "dataStructure", "type": "string" } ], "stateMutability": "view", "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": "getPayoutDataStructure", "outputs": [ { "internalType": "string", "name": "dataStructure", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getPolicyFlow", "outputs": [ { "internalType": "address", "name": "policyFlow", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getRegistry", "outputs": [ { "internalType": "contract IRegistry", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getRiskpoolId", "outputs": [ { "internalType": "uint256", "name": "riskpoolId", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getState", "outputs": [ { "internalType": "enum IComponent.ComponentState", "name": "", "type": "uint8" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getToken", "outputs": [ { "internalType": "address", "name": "token", "type": "address" } ], "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": [], "name": "resumeCallback", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "capacity", "type": "uint256" } ], "name": "riskPoolCapacityCallback", "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", "32": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IProduct.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/IProduct.sol", "exportedSymbols": { "IComponent": [ 22099 ], "IProduct": [ 21995 ], "IRegistry": [ 21750 ] }, "id": 21996, "license": "Apache-2.0", "nodeType": "SourceUnit", "nodes": [ { "id": 21940, "literals": [ "solidity", "0.8", ".2" ], "nodeType": "PragmaDirective", "src": "39:22:32" }, { "absolutePath": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IComponent.sol", "file": "./IComponent.sol", "id": 21941, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 21996, "sourceUnit": 22100, "src": "63:26:32", "symbolAliases": [], "unitAlias": "" }, { "abstract": false, "baseContracts": [ { "baseName": { "id": 21942, "name": "IComponent", "nodeType": "IdentifierPath", "referencedDeclaration": 22099, "src": "113:10:32" }, "id": 21943, "nodeType": "InheritanceSpecifier", "src": "113:10:32" } ], "contractDependencies": [ 22099 ], "contractKind": "interface", "fullyImplemented": false, "id": 21995, "linearizedBaseContracts": [ 21995, 22099 ], "name": "IProduct", "nameLocation": "101:8:32", "nodeType": "ContractDefinition", "nodes": [ { "anonymous": false, "id": 21947, "name": "LogProductCreated", "nameLocation": "137:17:32", "nodeType": "EventDefinition", "parameters": { "id": 21946, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 21945, "indexed": false, "mutability": "mutable", "name": "productAddress", "nameLocation": "164:14:32", "nodeType": "VariableDeclaration", "scope": 21947, "src": "156:22:32", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 21944, "name": "address", "nodeType": "ElementaryTypeName", "src": "156:7:32", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" } ], "src": "155:24:32" }, "src": "131:49:32" }, { "anonymous": false, "id": 21951, "name": "LogProductProposed", "nameLocation": "191:18:32", "nodeType": "EventDefinition", "parameters": { "id": 21950, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 21949, "indexed": false, "mutability": "mutable", "name": "componentId", "nameLocation": "219:11:32", "nodeType": "VariableDeclaration", "scope": 21951, "src": "211:19:32", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 21948, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "211:7:32", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "src": "210:21:32" }, "src": "185:47:32" }, { "anonymous": false, "id": 21955, "name": "LogProductApproved", "nameLocation": "243:18:32", "nodeType": "EventDefinition", "parameters": { "id": 21954, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 21953, "indexed": false, "mutability": "mutable", "name": "componentId", "nameLocation": "271:11:32", "nodeType": "VariableDeclaration", "scope": 21955, "src": "263:19:32", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 21952, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "263:7:32", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "src": "262:21:32" }, "src": "237:47:32" }, { "anonymous": false, "id": 21959, "name": "LogProductDeclined", "nameLocation": "295:18:32", "nodeType": "EventDefinition", "parameters": { "id": 21958, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 21957, "indexed": false, "mutability": "mutable", "name": "componentId", "nameLocation": "323:11:32", "nodeType": "VariableDeclaration", "scope": 21959, "src": "315:19:32", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 21956, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "315:7:32", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "src": "314:21:32" }, "src": "289:47:32" }, { "functionSelector": "21df0da7", "id": 21964, "implemented": false, "kind": "function", "modifiers": [], "name": "getToken", "nameLocation": "351:8:32", "nodeType": "FunctionDefinition", "parameters": { "id": 21960, "nodeType": "ParameterList", "parameters": [], "src": "359:2:32" }, "returnParameters": { "id": 21963, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 21962, "mutability": "mutable", "name": "token", "nameLocation": "392:5:32", "nodeType": "VariableDeclaration", "scope": 21964, "src": "384:13:32", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 21961, "name": "address", "nodeType": "ElementaryTypeName", "src": "384:7:32", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" } ], "src": "383:15:32" }, "scope": 21995, "src": "342:57:32", "stateMutability": "view", "virtual": false, "visibility": "external" }, { "functionSelector": "637d08f4", "id": 21969, "implemented": false, "kind": "function", "modifiers": [], "name": "getPolicyFlow", "nameLocation": "413:13:32", "nodeType": "FunctionDefinition", "parameters": { "id": 21965, "nodeType": "ParameterList", "parameters": [], "src": "426:2:32" }, "returnParameters": { "id": 21968, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 21967, "mutability": "mutable", "name": "policyFlow", "nameLocation": "459:10:32", "nodeType": "VariableDeclaration", "scope": 21969, "src": "451:18:32", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 21966, "name": "address", "nodeType": "ElementaryTypeName", "src": "451:7:32", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" } ], "src": "450:20:32" }, "scope": 21995, "src": "404:67:32", "stateMutability": "view", "virtual": false, "visibility": "external" }, { "functionSelector": "70d2fe53", "id": 21974, "implemented": false, "kind": "function", "modifiers": [], "name": "getRiskpoolId", "nameLocation": "485:13:32", "nodeType": "FunctionDefinition", "parameters": { "id": 21970, "nodeType": "ParameterList", "parameters": [], "src": "498:2:32" }, "returnParameters": { "id": 21973, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 21972, "mutability": "mutable", "name": "riskpoolId", "nameLocation": "531:10:32", "nodeType": "VariableDeclaration", "scope": 21974, "src": "523:18:32", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 21971, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "523:7:32", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "src": "522:20:32" }, "scope": 21995, "src": "476:67:32", "stateMutability": "view", "virtual": false, "visibility": "external" }, { "functionSelector": "94f64ff4", "id": 21979, "implemented": false, "kind": "function", "modifiers": [], "name": "getApplicationDataStructure", "nameLocation": "558:27:32", "nodeType": "FunctionDefinition", "parameters": { "id": 21975, "nodeType": "ParameterList", "parameters": [], "src": "585:2:32" }, "returnParameters": { "id": 21978, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 21977, "mutability": "mutable", "name": "dataStructure", "nameLocation": "624:13:32", "nodeType": "VariableDeclaration", "scope": 21979, "src": "610:27:32", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 21976, "name": "string", "nodeType": "ElementaryTypeName", "src": "610:6:32", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "visibility": "internal" } ], "src": "609:29:32" }, "scope": 21995, "src": "549:90:32", "stateMutability": "view", "virtual": false, "visibility": "external" }, { "functionSelector": "3ec92bda", "id": 21984, "implemented": false, "kind": "function", "modifiers": [], "name": "getClaimDataStructure", "nameLocation": "653:21:32", "nodeType": "FunctionDefinition", "parameters": { "id": 21980, "nodeType": "ParameterList", "parameters": [], "src": "674:2:32" }, "returnParameters": { "id": 21983, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 21982, "mutability": "mutable", "name": "dataStructure", "nameLocation": "713:13:32", "nodeType": "VariableDeclaration", "scope": 21984, "src": "699:27:32", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 21981, "name": "string", "nodeType": "ElementaryTypeName", "src": "699:6:32", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "visibility": "internal" } ], "src": "698:29:32" }, "scope": 21995, "src": "644:84:32", "stateMutability": "view", "virtual": false, "visibility": "external" }, { "functionSelector": "39cf5e16", "id": 21989, "implemented": false, "kind": "function", "modifiers": [], "name": "getPayoutDataStructure", "nameLocation": "742:22:32", "nodeType": "FunctionDefinition", "parameters": { "id": 21985, "nodeType": "ParameterList", "parameters": [], "src": "764:2:32" }, "returnParameters": { "id": 21988, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 21987, "mutability": "mutable", "name": "dataStructure", "nameLocation": "803:13:32", "nodeType": "VariableDeclaration", "scope": 21989, "src": "789:27:32", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 21986, "name": "string", "nodeType": "ElementaryTypeName", "src": "789:6:32", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "visibility": "internal" } ], "src": "788:29:32" }, "scope": 21995, "src": "733:85:32", "stateMutability": "view", "virtual": false, "visibility": "external" }, { "functionSelector": "f4fdc1fa", "id": 21994, "implemented": false, "kind": "function", "modifiers": [], "name": "riskPoolCapacityCallback", "nameLocation": "833:24:32", "nodeType": "FunctionDefinition", "parameters": { "id": 21992, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 21991, "mutability": "mutable", "name": "capacity", "nameLocation": "866:8:32", "nodeType": "VariableDeclaration", "scope": 21994, "src": "858:16:32", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 21990, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "858:7:32", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "src": "857:18:32" }, "returnParameters": { "id": 21993, "nodeType": "ParameterList", "parameters": [], "src": "884:0:32" }, "scope": 21995, "src": "824:61:32", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" } ], "scope": 21996, "src": "91:796:32" } ], "src": "39:849:32" }, "bytecode": "", "bytecodeSha1": "da39a3ee5e6b4b0d3255bfef95601890afd80709", "compiler": { "evm_version": "istanbul", "optimizer": { "enabled": true, "runs": 200 }, "version": "0.8.2+commit.661d1103" }, "contractName": "IProduct", "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, 887 ], "opcodes": "", "pcMap": {}, "sha1": "579d496b305631950477a4674f2d61f7c3ddb8b3", "source": "// SPDX-License-Identifier: Apache-2.0\npragma solidity 0.8.2;\n\nimport \"./IComponent.sol\";\n\ninterface IProduct is IComponent {\n\n event LogProductCreated (address productAddress);\n event LogProductProposed (uint256 componentId);\n event LogProductApproved (uint256 componentId);\n event LogProductDeclined (uint256 componentId);\n\n function getToken() external view returns(address token);\n function getPolicyFlow() external view returns(address policyFlow);\n function getRiskpoolId() external view returns(uint256 riskpoolId);\n\n function getApplicationDataStructure() external view returns(string memory dataStructure);\n function getClaimDataStructure() external view returns(string memory dataStructure);\n function getPayoutDataStructure() external view returns(string memory dataStructure);\n\n function riskPoolCapacityCallback(uint256 capacity) external;\n}\n", "sourceMap": "", "sourcePath": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IProduct.sol", "type": "interface" }