@etherisc/gif-contracts
Version:
This repository holds the GIF core contracts and tools to develop, test and deploy GIF instances.
1,392 lines • 2.04 MB
JSON
{
"abi": [
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint8",
"name": "version",
"type": "uint8"
}
],
"name": "Initialized",
"type": "event"
},
{
"inputs": [],
"name": "RISKPOOL_NAME",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "bundleId",
"type": "uint256"
}
],
"name": "burnBundle",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "bundleId",
"type": "uint256"
}
],
"name": "closeBundle",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "bundleId",
"type": "uint256"
},
{
"internalType": "bytes32",
"name": "processId",
"type": "bytes32"
},
{
"internalType": "uint256",
"name": "collateralAmount",
"type": "uint256"
}
],
"name": "collateralizePolicy",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"internalType": "bytes",
"name": "filter",
"type": "bytes"
},
{
"internalType": "uint256",
"name": "initialCapital",
"type": "uint256"
}
],
"name": "createBundle",
"outputs": [
{
"internalType": "uint256",
"name": "bundleId",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "bundleId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "defundBundle",
"outputs": [
{
"internalType": "uint256",
"name": "netAmount",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "bundleId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "fundBundle",
"outputs": [
{
"internalType": "uint256",
"name": "netAmount",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "registry",
"type": "address"
}
],
"name": "initialize",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "bundleId",
"type": "uint256"
}
],
"name": "lockBundle",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "bundleId",
"type": "uint256"
},
{
"internalType": "bytes32",
"name": "processId",
"type": "bytes32"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "processPayout",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "bundleId",
"type": "uint256"
},
{
"internalType": "bytes32",
"name": "processId",
"type": "bytes32"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "processPremium",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "wallet",
"type": "address"
},
{
"internalType": "address",
"name": "erc20Token",
"type": "address"
},
{
"internalType": "uint256",
"name": "collateralizationLevel",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "sumOfSumInsuredCap",
"type": "uint256"
}
],
"name": "registerRiskpool",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "bundleId",
"type": "uint256"
},
{
"internalType": "bytes32",
"name": "processId",
"type": "bytes32"
}
],
"name": "releasePolicy",
"outputs": [
{
"internalType": "uint256",
"name": "collateralAmount",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "riskpoolId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "maxNumberOfActiveBundles",
"type": "uint256"
}
],
"name": "setMaximumNumberOfActiveBundles",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "bundleId",
"type": "uint256"
}
],
"name": "unlockBundle",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"allSourcePaths": {
"10": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/proxy/utils/Initializable.sol",
"101": "contracts/tokens/BundleToken.sol",
"11": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/security/Pausable.sol",
"13": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC20/IERC20.sol",
"17": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC721/ERC721.sol",
"18": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC721/IERC721.sol",
"19": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC721/IERC721Receiver.sol",
"20": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC721/extensions/IERC721Metadata.sol",
"21": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/Address.sol",
"22": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/Context.sol",
"24": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/Strings.sol",
"25": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/introspection/ERC165.sol",
"26": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/introspection/IERC165.sol",
"27": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/structs/EnumerableSet.sol",
"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",
"33": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IRiskpool.sol",
"37": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IAccess.sol",
"38": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IBundle.sol",
"39": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IComponentEvents.sol",
"4": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/access/Ownable.sol",
"41": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IPolicy.sol",
"42": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IPool.sol",
"44": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IRegistry.sol",
"45": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/ITreasury.sol",
"51": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IRiskpoolService.sol",
"53": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/tokens/IBundleToken.sol",
"74": "contracts/modules/BundleController.sol",
"75": "contracts/modules/ComponentController.sol",
"77": "contracts/modules/PolicyController.sol",
"78": "contracts/modules/PoolController.sol",
"81": "contracts/modules/TreasuryModule.sol",
"87": "contracts/services/RiskpoolService.sol",
"88": "contracts/shared/CoreController.sol",
"90": "contracts/shared/TransferHelper.sol"
},
"ast": {
"absolutePath": "contracts/services/RiskpoolService.sol",
"exportedSymbols": {
"Address": [
26374
],
"BundleController": [
5504
],
"BundleToken": [
17246
],
"ComponentController": [
6504
],
"Context": [
24074
],
"CoreController": [
14924
],
"ERC165": [
26079
],
"ERC721": [
24987
],
"EnumerableSet": [
19390
],
"IAccess": [
21938
],
"IBundle": [
20491
],
"IBundleToken": [
24052
],
"IComponent": [
22099
],
"IComponentEvents": [
22419
],
"IERC165": [
27203
],
"IERC20": [
18510
],
"IERC721": [
23745
],
"IERC721Metadata": [
27618
],
"IERC721Receiver": [
27591
],
"IOracle": [
22133
],
"IPolicy": [
20837
],
"IPool": [
21652
],
"IProduct": [
21995
],
"IRegistry": [
21750
],
"IRiskpool": [
22366
],
"IRiskpoolService": [
24006
],
"ITreasury": [
23443
],
"Initializable": [
18432
],
"Ownable": [
20950
],
"Pausable": [
23183
],
"PolicyController": [
8529
],
"PoolController": [
9719
],
"RiskpoolService": [
14788
],
"Strings": [
23075
],
"TransferHelper": [
15170
],
"TreasuryModule": [
12127
]
},
"id": 14789,
"license": "Apache-2.0",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 14016,
"literals": [
"solidity",
"0.8",
".2"
],
"nodeType": "PragmaDirective",
"src": "39:22:87"
},
{
"absolutePath": "contracts/modules/BundleController.sol",
"file": "../modules/BundleController.sol",
"id": 14017,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 14789,
"sourceUnit": 5505,
"src": "63:41:87",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "contracts/modules/ComponentController.sol",
"file": "../modules/ComponentController.sol",
"id": 14018,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 14789,
"sourceUnit": 6505,
"src": "105:44:87",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "contracts/modules/TreasuryModule.sol",
"file": "../modules/TreasuryModule.sol",
"id": 14019,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 14789,
"sourceUnit": 12128,
"src": "150:39:87",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "contracts/shared/CoreController.sol",
"file": "../shared/CoreController.sol",
"id": 14020,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 14789,
"sourceUnit": 14925,
"src": "190:38:87",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IComponent.sol",
"file": "@etherisc/gif-interface/contracts/components/IComponent.sol",
"id": 14021,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 14789,
"sourceUnit": 22100,
"src": "230:69:87",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IBundle.sol",
"file": "@etherisc/gif-interface/contracts/modules/IBundle.sol",
"id": 14022,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 14789,
"sourceUnit": 20492,
"src": "300:63:87",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IRiskpoolService.sol",
"file": "@etherisc/gif-interface/contracts/services/IRiskpoolService.sol",
"id": 14023,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 14789,
"sourceUnit": 24007,
"src": "364:73:87",
"symbolAliases": [],
"unitAlias": ""
},
{
"abstract": false,
"baseContracts": [
{
"baseName": {
"id": 14024,
"name": "IRiskpoolService",
"nodeType": "IdentifierPath",
"referencedDeclaration": 24006,
"src": "471:16:87"
},
"id": 14025,
"nodeType": "InheritanceSpecifier",
"src": "471:16:87"
},
{
"baseName": {
"id": 14026,
"name": "CoreController",
"nodeType": "IdentifierPath",
"referencedDeclaration": 14924,
"src": "494:14:87"
},
"id": 14027,
"nodeType": "InheritanceSpecifier",
"src": "494:14:87"
}
],
"contractDependencies": [
14924,
18432,
24006,
24074
],
"contractKind": "contract",
"fullyImplemented": true,
"id": 14788,
"linearizedBaseContracts": [
14788,
14924,
18432,
24074,
24006
],
"name": "RiskpoolService",
"nameLocation": "448:15:87",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": true,
"functionSelector": "04f5f96e",
"id": 14030,
"mutability": "constant",
"name": "RISKPOOL_NAME",
"nameLocation": "539:13:87",
"nodeType": "VariableDeclaration",
"scope": 14788,
"src": "515:50:87",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 14028,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "515:7:87",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": {
"hexValue": "5269736b706f6f6c",
"id": 14029,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "555:10:87",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_379f7b8ce4ca8a02cca13e3a2339578b352fc7be5bfc0cbb47a1b3d0e1633665",
"typeString": "literal_string \"Riskpool\""
},
"value": "Riskpool"
},
"visibility": "public"
},
{
"constant": false,
"id": 14033,
"mutability": "mutable",
"name": "_component",
"nameLocation": "600:10:87",
"nodeType": "VariableDeclaration",
"scope": 14788,
"src": "572:38:87",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ComponentController_$6504",
"typeString": "contract ComponentController"
},
"typeName": {
"id": 14032,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 14031,
"name": "ComponentController",
"nodeType": "IdentifierPath",
"referencedDeclaration": 6504,
"src": "572:19:87"
},
"referencedDeclaration": 6504,
"src": "572:19:87",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ComponentController_$6504",
"typeString": "contract ComponentController"
}
},
"visibility": "private"
},
{
"constant": false,
"id": 14036,
"mutability": "mutable",
"name": "_bundle",
"nameLocation": "641:7:87",
"nodeType": "VariableDeclaration",
"scope": 14788,
"src": "616:32:87",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_BundleController_$5504",
"typeString": "contract BundleController"
},
"typeName": {
"id": 14035,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 14034,
"name": "BundleController",
"nodeType": "IdentifierPath",
"referencedDeclaration": 5504,
"src": "616:16:87"
},
"referencedDeclaration": 5504,
"src": "616:16:87",
"typeDescriptions": {
"typeIdentifier": "t_contract$_BundleController_$5504",
"typeString": "contract BundleController"
}
},
"visibility": "private"
},
{
"constant": false,
"id": 14039,
"mutability": "mutable",
"name": "_pool",
"nameLocation": "677:5:87",
"nodeType": "VariableDeclaration",
"scope": 14788,
"src": "654:28:87",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_PoolController_$9719",
"typeString": "contract PoolController"
},
"typeName": {
"id": 14038,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 14037,
"name": "PoolController",
"nodeType": "IdentifierPath",
"referencedDeclaration": 9719,
"src": "654:14:87"
},
"referencedDeclaration": 9719,
"src": "654:14:87",
"typeDescriptions": {
"typeIdentifier": "t_contract$_PoolController_$9719",
"typeString": "contract PoolController"
}
},
"visibility": "private"
},
{
"constant": false,
"id": 14042,
"mutability": "mutable",
"name": "_treasury",
"nameLocation": "711:9:87",
"nodeType": "VariableDeclaration",
"scope": 14788,
"src": "688:32:87",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_TreasuryModule_$12127",
"typeString": "contract TreasuryModule"
},
"typeName": {
"id": 14041,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 14040,
"name": "TreasuryModule",
"nodeType": "IdentifierPath",
"referencedDeclaration": 12127,
"src": "688:14:87"
},
"referencedDeclaration": 12127,
"src": "688:14:87",
"typeDescriptions": {
"typeIdentifier": "t_contract$_TreasuryModule_$12127",
"typeString": "contract TreasuryModule"
}
},
"visibility": "private"
},
{
"body": {
"id": 14077,
"nodeType": "Block",
"src": "759:427:87",
"statements": [
{
"assignments": [
14045
],
"declarations": [
{
"constant": false,
"id": 14045,
"mutability": "mutable",
"name": "componentId",
"nameLocation": "777:11:87",
"nodeType": "VariableDeclaration",
"scope": 14077,
"src": "769:19:87",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 14044,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "769:7:87",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 14051,
"initialValue": {
"arguments": [
{
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 14048,
"name": "_msgSender",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 24064,
"src": "817:10:87",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_address_$",
"typeString": "function () view returns (address)"
}
},
"id": 14049,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "817:12:87",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"expression": {
"id": 14046,
"name": "_component",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 14033,
"src": "791:10:87",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ComponentController_$6504",
"typeString": "contract ComponentController"
}
},
"id": 14047,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "getComponentId",
"nodeType": "MemberAccess",
"referencedDeclaration": 6078,
"src": "791:25:87",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$",
"typeString": "function (address) view external returns (uint256)"
}
},
"id": 14050,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "791:39:87",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "769:61:87"
},
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_enum$_ComponentType_$22002",
"typeString": "enum IComponent.ComponentType"
},
"id": 14060,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"arguments": [
{
"id": 14055,
"name": "componentId",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 14045,
"src": "889:11:87",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"id": 14053,
"name": "_component",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 14033,
"src": "861:10:87",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ComponentController_$6504",
"typeString": "contract ComponentController"
}
},
"id": 14054,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "getComponentType",
"nodeType": "MemberAccess",
"referencedDeclaration": 6125,
"src": "861:27:87",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_enum$_ComponentType_$22002_$",
"typeString": "function (uint256) view external returns (enum IComponent.ComponentType)"
}
},
"id": 14056,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "861:40:87",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_enum$_ComponentType_$22002",
"typeString": "enum IComponent.ComponentType"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"expression": {
"expression": {
"id": 14057,
"name": "IComponent",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22099,
"src": "905:10:87",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_IComponent_$22099_$",
"typeString": "type(contract IComponent)"
}
},
"id": 14058,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "ComponentType",
"nodeType": "MemberAccess",
"referencedDeclaration": 22002,
"src": "905:24:87",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_enum$_ComponentType_$22002_$",
"typeString": "type(enum IComponent.ComponentType)"
}
},
"id": 14059,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberName": "Riskpool",
"nodeType": "MemberAccess",
"referencedDeclaration": 22001,
"src": "905:33:87",
"typeDescriptions": {
"typeIdentifier": "t_enum$_ComponentType_$22002",
"typeString": "enum IComponent.ComponentType"
}
},
"src": "861:77:87",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"hexValue": "4552524f523a5250532d3030313a53454e4445525f4e4f545f5249534b504f4f4c",
"id": 14061,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "952:35:87",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_ae48b1a9c680c35d2a9f667f2fed37c9f73ddafd56231c776d44d9e8be57b7c6",
"typeString": "literal_string \"ERROR:RPS-001:SENDER_NOT_RISKPOOL\""
},
"value": "ERROR:RPS-001:SENDER_NOT_RISKPOOL"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_ae48b1a9c680c35d2a9f667f2fed37c9f73ddafd56231c776d44d9e8be57b7c6",
"typeString": "literal_string \"ERROR:RPS-001:SENDER_NOT_RISKPOOL\""
}
],
"id": 14052,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
"src": "840:7:87",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 14062,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "840:157:87",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 14063,
"nodeType": "ExpressionStatement",
"src": "840:157:87"
},
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_enum$_ComponentState_$22010",
"typeString": "enum IComponent.ComponentState"
},
"id": 14072,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"arguments": [
{
"id": 14067,
"name": "componentId",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 14045,
"src": "1057:11:87",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"id": 14065,
"name": "_component",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 14033,
"src": "1028:10:87",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ComponentController_$6504",
"typeString": "contract ComponentController"
}
},
"id": 14066,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "getComponentState",
"nodeType": "MemberAccess",
"referencedDeclaration": 6138,
"src": "1028:28:87",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_enum$_ComponentState_$22010_$",
"typeString": "function (uint256) view external returns (enum IComponent.ComponentState)"
}
},
"id": 14068,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1028:41:87",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_enum$_ComponentState_$22010",
"typeString": "enum IComponent.ComponentState"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"expression": {
"expression": {
"id": 14069,
"name": "IComponent",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22099,
"src": "1073:10:87",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_IComponent_$22099_$",
"typeString": "type(contract IComponent)"
}
},
"id": 14070,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "ComponentState",
"nodeType": "MemberAccess",
"referencedDeclaration": 22010,
"src": "1073:25:87",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_enum$_ComponentState_$22010_$",
"typeString": "type(enum IComponent.ComponentState)"
}
},
"id": 14071,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberName": "Proposed",
"nodeType": "MemberAccess",
"referencedDeclaration": 22004,
"src": "1073:34:87",
"typeDescriptions": {
"typeIdentifier": "t_enum$_ComponentState_$22010",
"typeString": "enum IComponent.ComponentState"
}
},
"src": "1028:79:87",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"hexValue": "4552524f523a5250532d3030323a5249534b504f4f4c5f4e4f545f50524f504f534544",
"id": 14073,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1121:37:87",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_0c96a51f00cf9612773d15d17720eae05a0f2c52cc3d14d5ed17e37cdf11d67e",
"typeString": "literal_string \"ERROR:RPS-002:RISKPOOL_NOT_PROPOSED\""
},
"value": "ERROR:RPS-002:RISKPOOL_NOT_PROPOSED"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_0c96a51f00cf9612773d15d17720eae05a0f2c52cc3d14d5ed17e37cdf11d67e",
"typeString": "literal_string \"ERROR:RPS-002:RISKPOOL_NOT_PROPOSED\""
}
],
"id": 14064,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
"src": "1007:7:87",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 14074,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1007:161:87",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 14075,
"nodeType": "ExpressionStatement",
"src": "1007:161:87"
},
{
"id": 14076,
"nodeType": "PlaceholderStatement",
"src": "1178:1:87"
}
]
},
"id": 14078,
"name": "onlyProposedRiskpool",
"nameLocation": "736:20:87",
"nodeType": "ModifierDefinition",
"parameters": {
"id": 14043,
"nodeType": "ParameterList",
"parameters": [],
"src": "756:2:87"
},
"src": "727:459:87",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 14113,
"nodeType": "Block",
"src": "1222:423:87",
"statements": [
{
"assignments": [
14081
],
"declarations": [
{
"constant": false,
"id": 14081,
"mutability": "mutable",
"name": "componentId",
"nameLocation": "1240:11:87",
"nodeType": "VariableDeclaration",
"scope": 14113,
"src": "1232:19:87",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 14080,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1232:7:87",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 14087,
"initialValue": {
"arguments": [
{
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 14084,
"name": "_msgSender",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 24064,
"src": "1280:10:87",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_address_$",
"typeString": "function () view returns (address)"
}
},
"id": 14085,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1280:12:87",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"expression": {
"id": 14082,
"name": "_component",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 14033,
"src": "1254:10:87",
"typeDesc