@etherisc/gif-interface
Version:
This repository holds the necessary interfaces and base contracts to interact with an existing GIF instance. The repository is not intended to be used on its own.
1,043 lines • 30.3 kB
JSON
{
"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": {
"21": "contracts/modules/IRegistry.sol",
"7": "contracts/components/IComponent.sol",
"9": "contracts/components/IProduct.sol"
},
"ast": {
"absolutePath": "contracts/components/IProduct.sol",
"exportedSymbols": {
"IComponent": [
812
],
"IProduct": [
903
],
"IRegistry": [
3538
]
},
"id": 904,
"license": "Apache-2.0",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 848,
"literals": [
"solidity",
"0.8",
".2"
],
"nodeType": "PragmaDirective",
"src": "39:22:9"
},
{
"absolutePath": "contracts/components/IComponent.sol",
"file": "./IComponent.sol",
"id": 849,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 904,
"sourceUnit": 813,
"src": "63:26:9",
"symbolAliases": [],
"unitAlias": ""
},
{
"abstract": false,
"baseContracts": [
{
"baseName": {
"id": 850,
"name": "IComponent",
"nodeType": "IdentifierPath",
"referencedDeclaration": 812,
"src": "113:10:9"
},
"id": 851,
"nodeType": "InheritanceSpecifier",
"src": "113:10:9"
}
],
"contractDependencies": [
812
],
"contractKind": "interface",
"fullyImplemented": false,
"id": 903,
"linearizedBaseContracts": [
903,
812
],
"name": "IProduct",
"nameLocation": "101:8:9",
"nodeType": "ContractDefinition",
"nodes": [
{
"anonymous": false,
"id": 855,
"name": "LogProductCreated",
"nameLocation": "137:17:9",
"nodeType": "EventDefinition",
"parameters": {
"id": 854,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 853,
"indexed": false,
"mutability": "mutable",
"name": "productAddress",
"nameLocation": "164:14:9",
"nodeType": "VariableDeclaration",
"scope": 855,
"src": "156:22:9",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 852,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "156:7:9",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"src": "155:24:9"
},
"src": "131:49:9"
},
{
"anonymous": false,
"id": 859,
"name": "LogProductProposed",
"nameLocation": "191:18:9",
"nodeType": "EventDefinition",
"parameters": {
"id": 858,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 857,
"indexed": false,
"mutability": "mutable",
"name": "componentId",
"nameLocation": "219:11:9",
"nodeType": "VariableDeclaration",
"scope": 859,
"src": "211:19:9",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 856,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "211:7:9",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "210:21:9"
},
"src": "185:47:9"
},
{
"anonymous": false,
"id": 863,
"name": "LogProductApproved",
"nameLocation": "243:18:9",
"nodeType": "EventDefinition",
"parameters": {
"id": 862,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 861,
"indexed": false,
"mutability": "mutable",
"name": "componentId",
"nameLocation": "271:11:9",
"nodeType": "VariableDeclaration",
"scope": 863,
"src": "263:19:9",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 860,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "263:7:9",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "262:21:9"
},
"src": "237:47:9"
},
{
"anonymous": false,
"id": 867,
"name": "LogProductDeclined",
"nameLocation": "295:18:9",
"nodeType": "EventDefinition",
"parameters": {
"id": 866,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 865,
"indexed": false,
"mutability": "mutable",
"name": "componentId",
"nameLocation": "323:11:9",
"nodeType": "VariableDeclaration",
"scope": 867,
"src": "315:19:9",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 864,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "315:7:9",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "314:21:9"
},
"src": "289:47:9"
},
{
"functionSelector": "21df0da7",
"id": 872,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "getToken",
"nameLocation": "351:8:9",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 868,
"nodeType": "ParameterList",
"parameters": [],
"src": "359:2:9"
},
"returnParameters": {
"id": 871,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 870,
"mutability": "mutable",
"name": "token",
"nameLocation": "392:5:9",
"nodeType": "VariableDeclaration",
"scope": 872,
"src": "384:13:9",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 869,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "384:7:9",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"src": "383:15:9"
},
"scope": 903,
"src": "342:57:9",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"functionSelector": "637d08f4",
"id": 877,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "getPolicyFlow",
"nameLocation": "413:13:9",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 873,
"nodeType": "ParameterList",
"parameters": [],
"src": "426:2:9"
},
"returnParameters": {
"id": 876,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 875,
"mutability": "mutable",
"name": "policyFlow",
"nameLocation": "459:10:9",
"nodeType": "VariableDeclaration",
"scope": 877,
"src": "451:18:9",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 874,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "451:7:9",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"src": "450:20:9"
},
"scope": 903,
"src": "404:67:9",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"functionSelector": "70d2fe53",
"id": 882,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "getRiskpoolId",
"nameLocation": "485:13:9",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 878,
"nodeType": "ParameterList",
"parameters": [],
"src": "498:2:9"
},
"returnParameters": {
"id": 881,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 880,
"mutability": "mutable",
"name": "riskpoolId",
"nameLocation": "531:10:9",
"nodeType": "VariableDeclaration",
"scope": 882,
"src": "523:18:9",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 879,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "523:7:9",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "522:20:9"
},
"scope": 903,
"src": "476:67:9",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"functionSelector": "94f64ff4",
"id": 887,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "getApplicationDataStructure",
"nameLocation": "558:27:9",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 883,
"nodeType": "ParameterList",
"parameters": [],
"src": "585:2:9"
},
"returnParameters": {
"id": 886,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 885,
"mutability": "mutable",
"name": "dataStructure",
"nameLocation": "624:13:9",
"nodeType": "VariableDeclaration",
"scope": 887,
"src": "610:27:9",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 884,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "610:6:9",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "internal"
}
],
"src": "609:29:9"
},
"scope": 903,
"src": "549:90:9",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"functionSelector": "3ec92bda",
"id": 892,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "getClaimDataStructure",
"nameLocation": "653:21:9",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 888,
"nodeType": "ParameterList",
"parameters": [],
"src": "674:2:9"
},
"returnParameters": {
"id": 891,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 890,
"mutability": "mutable",
"name": "dataStructure",
"nameLocation": "713:13:9",
"nodeType": "VariableDeclaration",
"scope": 892,
"src": "699:27:9",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 889,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "699:6:9",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "internal"
}
],
"src": "698:29:9"
},
"scope": 903,
"src": "644:84:9",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"functionSelector": "39cf5e16",
"id": 897,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "getPayoutDataStructure",
"nameLocation": "742:22:9",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 893,
"nodeType": "ParameterList",
"parameters": [],
"src": "764:2:9"
},
"returnParameters": {
"id": 896,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 895,
"mutability": "mutable",
"name": "dataStructure",
"nameLocation": "803:13:9",
"nodeType": "VariableDeclaration",
"scope": 897,
"src": "789:27:9",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 894,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "789:6:9",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "internal"
}
],
"src": "788:29:9"
},
"scope": 903,
"src": "733:85:9",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"functionSelector": "f4fdc1fa",
"id": 902,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "riskPoolCapacityCallback",
"nameLocation": "833:24:9",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 900,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 899,
"mutability": "mutable",
"name": "capacity",
"nameLocation": "866:8:9",
"nodeType": "VariableDeclaration",
"scope": 902,
"src": "858:16:9",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 898,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "858:7:9",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "857:18:9"
},
"returnParameters": {
"id": 901,
"nodeType": "ParameterList",
"parameters": [],
"src": "884:0:9"
},
"scope": 903,
"src": "824:61:9",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "external"
}
],
"scope": 904,
"src": "91:796:9"
}
],
"src": "39:849:9"
},
"bytecode": "",
"bytecodeSha1": "da39a3ee5e6b4b0d3255bfef95601890afd80709",
"compiler": {
"evm_version": "istanbul",
"optimizer": {
"enabled": true,
"runs": 200
},
"version": "0.8.2+commit.661d1103"
},
"contractName": "IProduct",
"coverageMap": {
"branches": {},
"statements": {}
},
"dependencies": [
"IComponent",
"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": "contracts/components/IProduct.sol",
"type": "interface"
}