@etherisc/depeg-contracts
Version:
Etherisc's smart contracts for a depeg insurance for stable coins.
1,043 lines • 31 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": {
"27": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IComponent.sol",
"29": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IProduct.sol",
"38": "/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": [
11675
],
"IProduct": [
21878
],
"IRegistry": [
21976
]
},
"id": 21879,
"license": "Apache-2.0",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 21823,
"literals": [
"solidity",
"0.8",
".2"
],
"nodeType": "PragmaDirective",
"src": "39:22:29"
},
{
"absolutePath": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IComponent.sol",
"file": "./IComponent.sol",
"id": 21824,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 21879,
"sourceUnit": 11676,
"src": "63:26:29",
"symbolAliases": [],
"unitAlias": ""
},
{
"abstract": false,
"baseContracts": [
{
"baseName": {
"id": 21825,
"name": "IComponent",
"nodeType": "IdentifierPath",
"referencedDeclaration": 11675,
"src": "113:10:29"
},
"id": 21826,
"nodeType": "InheritanceSpecifier",
"src": "113:10:29"
}
],
"contractDependencies": [
11675
],
"contractKind": "interface",
"fullyImplemented": false,
"id": 21878,
"linearizedBaseContracts": [
21878,
11675
],
"name": "IProduct",
"nameLocation": "101:8:29",
"nodeType": "ContractDefinition",
"nodes": [
{
"anonymous": false,
"id": 21830,
"name": "LogProductCreated",
"nameLocation": "137:17:29",
"nodeType": "EventDefinition",
"parameters": {
"id": 21829,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 21828,
"indexed": false,
"mutability": "mutable",
"name": "productAddress",
"nameLocation": "164:14:29",
"nodeType": "VariableDeclaration",
"scope": 21830,
"src": "156:22:29",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 21827,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "156:7:29",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"src": "155:24:29"
},
"src": "131:49:29"
},
{
"anonymous": false,
"id": 21834,
"name": "LogProductProposed",
"nameLocation": "191:18:29",
"nodeType": "EventDefinition",
"parameters": {
"id": 21833,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 21832,
"indexed": false,
"mutability": "mutable",
"name": "componentId",
"nameLocation": "219:11:29",
"nodeType": "VariableDeclaration",
"scope": 21834,
"src": "211:19:29",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 21831,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "211:7:29",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "210:21:29"
},
"src": "185:47:29"
},
{
"anonymous": false,
"id": 21838,
"name": "LogProductApproved",
"nameLocation": "243:18:29",
"nodeType": "EventDefinition",
"parameters": {
"id": 21837,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 21836,
"indexed": false,
"mutability": "mutable",
"name": "componentId",
"nameLocation": "271:11:29",
"nodeType": "VariableDeclaration",
"scope": 21838,
"src": "263:19:29",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 21835,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "263:7:29",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "262:21:29"
},
"src": "237:47:29"
},
{
"anonymous": false,
"id": 21842,
"name": "LogProductDeclined",
"nameLocation": "295:18:29",
"nodeType": "EventDefinition",
"parameters": {
"id": 21841,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 21840,
"indexed": false,
"mutability": "mutable",
"name": "componentId",
"nameLocation": "323:11:29",
"nodeType": "VariableDeclaration",
"scope": 21842,
"src": "315:19:29",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 21839,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "315:7:29",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "314:21:29"
},
"src": "289:47:29"
},
{
"functionSelector": "21df0da7",
"id": 21847,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "getToken",
"nameLocation": "351:8:29",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 21843,
"nodeType": "ParameterList",
"parameters": [],
"src": "359:2:29"
},
"returnParameters": {
"id": 21846,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 21845,
"mutability": "mutable",
"name": "token",
"nameLocation": "392:5:29",
"nodeType": "VariableDeclaration",
"scope": 21847,
"src": "384:13:29",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 21844,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "384:7:29",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"src": "383:15:29"
},
"scope": 21878,
"src": "342:57:29",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"functionSelector": "637d08f4",
"id": 21852,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "getPolicyFlow",
"nameLocation": "413:13:29",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 21848,
"nodeType": "ParameterList",
"parameters": [],
"src": "426:2:29"
},
"returnParameters": {
"id": 21851,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 21850,
"mutability": "mutable",
"name": "policyFlow",
"nameLocation": "459:10:29",
"nodeType": "VariableDeclaration",
"scope": 21852,
"src": "451:18:29",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 21849,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "451:7:29",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"src": "450:20:29"
},
"scope": 21878,
"src": "404:67:29",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"functionSelector": "70d2fe53",
"id": 21857,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "getRiskpoolId",
"nameLocation": "485:13:29",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 21853,
"nodeType": "ParameterList",
"parameters": [],
"src": "498:2:29"
},
"returnParameters": {
"id": 21856,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 21855,
"mutability": "mutable",
"name": "riskpoolId",
"nameLocation": "531:10:29",
"nodeType": "VariableDeclaration",
"scope": 21857,
"src": "523:18:29",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 21854,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "523:7:29",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "522:20:29"
},
"scope": 21878,
"src": "476:67:29",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"functionSelector": "94f64ff4",
"id": 21862,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "getApplicationDataStructure",
"nameLocation": "558:27:29",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 21858,
"nodeType": "ParameterList",
"parameters": [],
"src": "585:2:29"
},
"returnParameters": {
"id": 21861,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 21860,
"mutability": "mutable",
"name": "dataStructure",
"nameLocation": "624:13:29",
"nodeType": "VariableDeclaration",
"scope": 21862,
"src": "610:27:29",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 21859,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "610:6:29",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "internal"
}
],
"src": "609:29:29"
},
"scope": 21878,
"src": "549:90:29",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"functionSelector": "3ec92bda",
"id": 21867,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "getClaimDataStructure",
"nameLocation": "653:21:29",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 21863,
"nodeType": "ParameterList",
"parameters": [],
"src": "674:2:29"
},
"returnParameters": {
"id": 21866,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 21865,
"mutability": "mutable",
"name": "dataStructure",
"nameLocation": "713:13:29",
"nodeType": "VariableDeclaration",
"scope": 21867,
"src": "699:27:29",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 21864,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "699:6:29",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "internal"
}
],
"src": "698:29:29"
},
"scope": 21878,
"src": "644:84:29",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"functionSelector": "39cf5e16",
"id": 21872,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "getPayoutDataStructure",
"nameLocation": "742:22:29",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 21868,
"nodeType": "ParameterList",
"parameters": [],
"src": "764:2:29"
},
"returnParameters": {
"id": 21871,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 21870,
"mutability": "mutable",
"name": "dataStructure",
"nameLocation": "803:13:29",
"nodeType": "VariableDeclaration",
"scope": 21872,
"src": "789:27:29",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 21869,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "789:6:29",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "internal"
}
],
"src": "788:29:29"
},
"scope": 21878,
"src": "733:85:29",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"functionSelector": "f4fdc1fa",
"id": 21877,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "riskPoolCapacityCallback",
"nameLocation": "833:24:29",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 21875,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 21874,
"mutability": "mutable",
"name": "capacity",
"nameLocation": "866:8:29",
"nodeType": "VariableDeclaration",
"scope": 21877,
"src": "858:16:29",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 21873,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "858:7:29",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "857:18:29"
},
"returnParameters": {
"id": 21876,
"nodeType": "ParameterList",
"parameters": [],
"src": "884:0:29"
},
"scope": 21878,
"src": "824:61:29",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "external"
}
],
"scope": 21879,
"src": "91:796:29"
}
],
"src": "39:849:29"
},
"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"
}