@etherisc/terraguard-poc-contracts
Version:
Etherisc's smart contracts for the terraguard poc
1,043 lines • 30.9 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": {
"11": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IProduct.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/IProduct.sol",
"exportedSymbols": {
"IComponent": [
5218
],
"IProduct": [
5319
],
"IRegistry": [
7009
]
},
"id": 5320,
"license": "Apache-2.0",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 5264,
"literals": [
"solidity",
"0.8",
".2"
],
"nodeType": "PragmaDirective",
"src": "39:22:11"
},
{
"absolutePath": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IComponent.sol",
"file": "./IComponent.sol",
"id": 5265,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 5320,
"sourceUnit": 5219,
"src": "63:26:11",
"symbolAliases": [],
"unitAlias": ""
},
{
"abstract": false,
"baseContracts": [
{
"baseName": {
"id": 5266,
"name": "IComponent",
"nodeType": "IdentifierPath",
"referencedDeclaration": 5218,
"src": "113:10:11"
},
"id": 5267,
"nodeType": "InheritanceSpecifier",
"src": "113:10:11"
}
],
"contractDependencies": [
5218
],
"contractKind": "interface",
"fullyImplemented": false,
"id": 5319,
"linearizedBaseContracts": [
5319,
5218
],
"name": "IProduct",
"nameLocation": "101:8:11",
"nodeType": "ContractDefinition",
"nodes": [
{
"anonymous": false,
"id": 5271,
"name": "LogProductCreated",
"nameLocation": "137:17:11",
"nodeType": "EventDefinition",
"parameters": {
"id": 5270,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5269,
"indexed": false,
"mutability": "mutable",
"name": "productAddress",
"nameLocation": "164:14:11",
"nodeType": "VariableDeclaration",
"scope": 5271,
"src": "156:22:11",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 5268,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "156:7:11",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"src": "155:24:11"
},
"src": "131:49:11"
},
{
"anonymous": false,
"id": 5275,
"name": "LogProductProposed",
"nameLocation": "191:18:11",
"nodeType": "EventDefinition",
"parameters": {
"id": 5274,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5273,
"indexed": false,
"mutability": "mutable",
"name": "componentId",
"nameLocation": "219:11:11",
"nodeType": "VariableDeclaration",
"scope": 5275,
"src": "211:19:11",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 5272,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "211:7:11",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "210:21:11"
},
"src": "185:47:11"
},
{
"anonymous": false,
"id": 5279,
"name": "LogProductApproved",
"nameLocation": "243:18:11",
"nodeType": "EventDefinition",
"parameters": {
"id": 5278,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5277,
"indexed": false,
"mutability": "mutable",
"name": "componentId",
"nameLocation": "271:11:11",
"nodeType": "VariableDeclaration",
"scope": 5279,
"src": "263:19:11",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 5276,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "263:7:11",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "262:21:11"
},
"src": "237:47:11"
},
{
"anonymous": false,
"id": 5283,
"name": "LogProductDeclined",
"nameLocation": "295:18:11",
"nodeType": "EventDefinition",
"parameters": {
"id": 5282,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5281,
"indexed": false,
"mutability": "mutable",
"name": "componentId",
"nameLocation": "323:11:11",
"nodeType": "VariableDeclaration",
"scope": 5283,
"src": "315:19:11",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 5280,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "315:7:11",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "314:21:11"
},
"src": "289:47:11"
},
{
"functionSelector": "21df0da7",
"id": 5288,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "getToken",
"nameLocation": "351:8:11",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 5284,
"nodeType": "ParameterList",
"parameters": [],
"src": "359:2:11"
},
"returnParameters": {
"id": 5287,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5286,
"mutability": "mutable",
"name": "token",
"nameLocation": "392:5:11",
"nodeType": "VariableDeclaration",
"scope": 5288,
"src": "384:13:11",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 5285,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "384:7:11",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"src": "383:15:11"
},
"scope": 5319,
"src": "342:57:11",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"functionSelector": "637d08f4",
"id": 5293,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "getPolicyFlow",
"nameLocation": "413:13:11",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 5289,
"nodeType": "ParameterList",
"parameters": [],
"src": "426:2:11"
},
"returnParameters": {
"id": 5292,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5291,
"mutability": "mutable",
"name": "policyFlow",
"nameLocation": "459:10:11",
"nodeType": "VariableDeclaration",
"scope": 5293,
"src": "451:18:11",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 5290,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "451:7:11",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"src": "450:20:11"
},
"scope": 5319,
"src": "404:67:11",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"functionSelector": "70d2fe53",
"id": 5298,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "getRiskpoolId",
"nameLocation": "485:13:11",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 5294,
"nodeType": "ParameterList",
"parameters": [],
"src": "498:2:11"
},
"returnParameters": {
"id": 5297,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5296,
"mutability": "mutable",
"name": "riskpoolId",
"nameLocation": "531:10:11",
"nodeType": "VariableDeclaration",
"scope": 5298,
"src": "523:18:11",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 5295,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "523:7:11",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "522:20:11"
},
"scope": 5319,
"src": "476:67:11",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"functionSelector": "94f64ff4",
"id": 5303,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "getApplicationDataStructure",
"nameLocation": "558:27:11",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 5299,
"nodeType": "ParameterList",
"parameters": [],
"src": "585:2:11"
},
"returnParameters": {
"id": 5302,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5301,
"mutability": "mutable",
"name": "dataStructure",
"nameLocation": "624:13:11",
"nodeType": "VariableDeclaration",
"scope": 5303,
"src": "610:27:11",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 5300,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "610:6:11",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "internal"
}
],
"src": "609:29:11"
},
"scope": 5319,
"src": "549:90:11",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"functionSelector": "3ec92bda",
"id": 5308,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "getClaimDataStructure",
"nameLocation": "653:21:11",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 5304,
"nodeType": "ParameterList",
"parameters": [],
"src": "674:2:11"
},
"returnParameters": {
"id": 5307,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5306,
"mutability": "mutable",
"name": "dataStructure",
"nameLocation": "713:13:11",
"nodeType": "VariableDeclaration",
"scope": 5308,
"src": "699:27:11",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 5305,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "699:6:11",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "internal"
}
],
"src": "698:29:11"
},
"scope": 5319,
"src": "644:84:11",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"functionSelector": "39cf5e16",
"id": 5313,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "getPayoutDataStructure",
"nameLocation": "742:22:11",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 5309,
"nodeType": "ParameterList",
"parameters": [],
"src": "764:2:11"
},
"returnParameters": {
"id": 5312,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5311,
"mutability": "mutable",
"name": "dataStructure",
"nameLocation": "803:13:11",
"nodeType": "VariableDeclaration",
"scope": 5313,
"src": "789:27:11",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 5310,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "789:6:11",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "internal"
}
],
"src": "788:29:11"
},
"scope": 5319,
"src": "733:85:11",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"functionSelector": "f4fdc1fa",
"id": 5318,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "riskPoolCapacityCallback",
"nameLocation": "833:24:11",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 5316,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5315,
"mutability": "mutable",
"name": "capacity",
"nameLocation": "866:8:11",
"nodeType": "VariableDeclaration",
"scope": 5318,
"src": "858:16:11",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 5314,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "858:7:11",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "857:18:11"
},
"returnParameters": {
"id": 5317,
"nodeType": "ParameterList",
"parameters": [],
"src": "884:0:11"
},
"scope": 5319,
"src": "824:61:11",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "external"
}
],
"scope": 5320,
"src": "91:796:11"
}
],
"src": "39:849:11"
},
"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/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IProduct.sol",
"type": "interface"
}