UNPKG

@etherisc/gif-contracts

Version:

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

1,628 lines (1,627 loc) 1.58 MB
{ "abi": [ { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint8", "name": "version", "type": "uint8" } ], "name": "Initialized", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "riskpoolId", "type": "uint256" }, { "indexed": false, "internalType": "bytes32", "name": "processId", "type": "bytes32" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "LogRiskpoolCollateralReleased", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "riskpoolId", "type": "uint256" }, { "indexed": false, "internalType": "bytes32", "name": "processId", "type": "bytes32" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "LogRiskpoolCollateralizationFailed", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "riskpoolId", "type": "uint256" }, { "indexed": false, "internalType": "bytes32", "name": "processId", "type": "bytes32" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "LogRiskpoolCollateralizationSucceeded", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "riskpoolId", "type": "uint256" }, { "indexed": false, "internalType": "address", "name": "wallet", "type": "address" }, { "indexed": false, "internalType": "address", "name": "erc20Token", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "collateralizationLevel", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "sumOfSumInsuredCap", "type": "uint256" } ], "name": "LogRiskpoolRegistered", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "bytes32", "name": "processId", "type": "bytes32" }, { "indexed": false, "internalType": "uint256", "name": "sumInsured", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "collateral", "type": "uint256" } ], "name": "LogRiskpoolRequiredCollateral", "type": "event" }, { "inputs": [], "name": "COLLATERALIZATION_LEVEL_CAP", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "DEFAULT_MAX_NUMBER_OF_ACTIVE_BUNDLES", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "FULL_COLLATERALIZATION_LEVEL", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "riskpoolId", "type": "uint256" } ], "name": "activeBundles", "outputs": [ { "internalType": "uint256", "name": "numberOfActiveBundles", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "riskpoolId", "type": "uint256" }, { "internalType": "uint256", "name": "bundleId", "type": "uint256" } ], "name": "addBundleIdToActiveSet", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "riskpoolId", "type": "uint256" }, { "internalType": "uint256", "name": "sumInsuredAmount", "type": "uint256" } ], "name": "calculateCollateral", "outputs": [ { "internalType": "uint256", "name": "collateralAmount", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "riskpoolId", "type": "uint256" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "defund", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "riskpoolId", "type": "uint256" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "fund", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "riskpoolId", "type": "uint256" }, { "internalType": "uint256", "name": "bundleIdx", "type": "uint256" } ], "name": "getActiveBundleId", "outputs": [ { "internalType": "uint256", "name": "bundleId", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getFullCollateralizationLevel", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "pure", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "riskpoolId", "type": "uint256" } ], "name": "getMaximumNumberOfActiveBundles", "outputs": [ { "internalType": "uint256", "name": "maximumNumberOfActiveBundles", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "productId", "type": "uint256" } ], "name": "getRiskPoolForProduct", "outputs": [ { "internalType": "uint256", "name": "riskpoolId", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "riskpoolId", "type": "uint256" } ], "name": "getRiskpool", "outputs": [ { "components": [ { "internalType": "uint256", "name": "id", "type": "uint256" }, { "internalType": "address", "name": "wallet", "type": "address" }, { "internalType": "address", "name": "erc20Token", "type": "address" }, { "internalType": "uint256", "name": "collateralizationLevel", "type": "uint256" }, { "internalType": "uint256", "name": "sumOfSumInsuredCap", "type": "uint256" }, { "internalType": "uint256", "name": "sumOfSumInsuredAtRisk", "type": "uint256" }, { "internalType": "uint256", "name": "capital", "type": "uint256" }, { "internalType": "uint256", "name": "lockedCapital", "type": "uint256" }, { "internalType": "uint256", "name": "balance", "type": "uint256" }, { "internalType": "uint256", "name": "createdAt", "type": "uint256" }, { "internalType": "uint256", "name": "updatedAt", "type": "uint256" } ], "internalType": "struct IPool.Pool", "name": "riskPool", "type": "tuple" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "registry", "type": "address" } ], "name": "initialize", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "bytes32", "name": "processId", "type": "bytes32" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "processPayout", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "bytes32", "name": "processId", "type": "bytes32" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "processPremium", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "riskpoolId", "type": "uint256" }, { "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": "bytes32", "name": "processId", "type": "bytes32" } ], "name": "release", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "riskpoolId", "type": "uint256" }, { "internalType": "uint256", "name": "bundleId", "type": "uint256" } ], "name": "removeBundleIdFromActiveSet", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "riskpools", "outputs": [ { "internalType": "uint256", "name": "idx", "type": "uint256" } ], "stateMutability": "view", "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": "productId", "type": "uint256" }, { "internalType": "uint256", "name": "riskpoolId", "type": "uint256" } ], "name": "setRiskpoolForProduct", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "bytes32", "name": "processId", "type": "bytes32" } ], "name": "underwrite", "outputs": [ { "internalType": "bool", "name": "success", "type": "bool" } ], "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", "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", "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", "88": "contracts/shared/CoreController.sol" }, "ast": { "absolutePath": "contracts/modules/PoolController.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 ], "IERC721": [ 23745 ], "IERC721Metadata": [ 27618 ], "IERC721Receiver": [ 27591 ], "IOracle": [ 22133 ], "IPolicy": [ 20837 ], "IPool": [ 21652 ], "IProduct": [ 21995 ], "IRegistry": [ 21750 ], "IRiskpool": [ 22366 ], "Initializable": [ 18432 ], "Ownable": [ 20950 ], "PolicyController": [ 8529 ], "PoolController": [ 9719 ], "Strings": [ 23075 ] }, "id": 9720, "license": "Apache-2.0", "nodeType": "SourceUnit", "nodes": [ { "id": 8531, "literals": [ "solidity", "0.8", ".2" ], "nodeType": "PragmaDirective", "src": "39:22:78" }, { "absolutePath": "contracts/modules/ComponentController.sol", "file": "./ComponentController.sol", "id": 8532, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 9720, "sourceUnit": 6505, "src": "63:35:78", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "contracts/modules/PolicyController.sol", "file": "./PolicyController.sol", "id": 8533, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 9720, "sourceUnit": 8530, "src": "99:32:78", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "contracts/modules/BundleController.sol", "file": "./BundleController.sol", "id": 8534, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 9720, "sourceUnit": 5505, "src": "132:32:78", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "contracts/shared/CoreController.sol", "file": "../shared/CoreController.sol", "id": 8535, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 9720, "sourceUnit": 14925, "src": "165:38:78", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IPool.sol", "file": "@etherisc/gif-interface/contracts/modules/IPool.sol", "id": 8536, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 9720, "sourceUnit": 21653, "src": "205:61:78", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IComponent.sol", "file": "@etherisc/gif-interface/contracts/components/IComponent.sol", "id": 8537, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 9720, "sourceUnit": 22100, "src": "267:69:78", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IRiskpool.sol", "file": "@etherisc/gif-interface/contracts/components/IRiskpool.sol", "id": 8538, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 9720, "sourceUnit": 22367, "src": "337:68:78", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/structs/EnumerableSet.sol", "file": "@openzeppelin/contracts/utils/structs/EnumerableSet.sol", "id": 8539, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 9720, "sourceUnit": 19391, "src": "408:65:78", "symbolAliases": [], "unitAlias": "" }, { "abstract": false, "baseContracts": [ { "baseName": { "id": 8540, "name": "IPool", "nodeType": "IdentifierPath", "referencedDeclaration": 21652, "src": "506:5:78" }, "id": 8541, "nodeType": "InheritanceSpecifier", "src": "506:5:78" }, { "baseName": { "id": 8542, "name": "CoreController", "nodeType": "IdentifierPath", "referencedDeclaration": 14924, "src": "517:14:78" }, "id": 8543, "nodeType": "InheritanceSpecifier", "src": "517:14:78" } ], "contractDependencies": [ 14924, 18432, 21652, 24074 ], "contractKind": "contract", "fullyImplemented": true, "id": 9719, "linearizedBaseContracts": [ 9719, 14924, 18432, 24074, 21652 ], "name": "PoolController", "nameLocation": "484:14:78", "nodeType": "ContractDefinition", "nodes": [ { "id": 8547, "libraryName": { "id": 8544, "name": "EnumerableSet", "nodeType": "IdentifierPath", "referencedDeclaration": 19390, "src": "545:13:78" }, "nodeType": "UsingForDirective", "src": "539:46:78", "typeName": { "id": 8546, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 8545, "name": "EnumerableSet.UintSet", "nodeType": "IdentifierPath", "referencedDeclaration": 19260, "src": "563:21:78" }, "referencedDeclaration": 19260, "src": "563:21:78", "typeDescriptions": { "typeIdentifier": "t_struct$_UintSet_$19260_storage_ptr", "typeString": "struct EnumerableSet.UintSet" } } }, { "constant": true, "functionSelector": "45fe1c6d", "id": 8552, "mutability": "constant", "name": "FULL_COLLATERALIZATION_LEVEL", "nameLocation": "774:28:78", "nodeType": "VariableDeclaration", "scope": 9719, "src": "750:61:78", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8548, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "750:7:78", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": { "commonType": { "typeIdentifier": "t_rational_1000000000000000000_by_1", "typeString": "int_const 1000000000000000000" }, "id": 8551, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "leftExpression": { "hexValue": "3130", "id": 8549, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "805:2:78", "typeDescriptions": { "typeIdentifier": "t_rational_10_by_1", "typeString": "int_const 10" }, "value": "10" }, "nodeType": "BinaryOperation", "operator": "**", "rightExpression": { "hexValue": "3138", "id": 8550, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "809:2:78", "typeDescriptions": { "typeIdentifier": "t_rational_18_by_1", "typeString": "int_const 18" }, "value": "18" }, "src": "805:6:78", "typeDescriptions": { "typeIdentifier": "t_rational_1000000000000000000_by_1", "typeString": "int_const 1000000000000000000" } }, "visibility": "public" }, { "constant": true, "functionSelector": "da68771a", "id": 8557, "mutability": "constant", "name": "COLLATERALIZATION_LEVEL_CAP", "nameLocation": "896:27:78", "nodeType": "VariableDeclaration", "scope": 9719, "src": "872:86:78", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8553, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "872:7:78", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 8556, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "leftExpression": { "hexValue": "32", "id": 8554, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "926:1:78", "typeDescriptions": { "typeIdentifier": "t_rational_2_by_1", "typeString": "int_const 2" }, "value": "2" }, "nodeType": "BinaryOperation", "operator": "*", "rightExpression": { "id": 8555, "name": "FULL_COLLATERALIZATION_LEVEL", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8552, "src": "930:28:78", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "926:32:78", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "public" }, { "constant": true, "functionSelector": "edb5be30", "id": 8560, "mutability": "constant", "name": "DEFAULT_MAX_NUMBER_OF_ACTIVE_BUNDLES", "nameLocation": "989:36:78", "nodeType": "VariableDeclaration", "scope": 9719, "src": "965:64:78", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 8558, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "965:7:78", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": { "hexValue": "31", "id": 8559, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1028:1:78", "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1" }, "value": "1" }, "visibility": "public" }, { "constant": false, "id": 8564, "mutability": "mutable", "name": "_collateralAmount", "nameLocation": "1111:17:78", "nodeType": "VariableDeclaration", "scope": 9719, "src": "1036:92:78", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", "typeString": "mapping(bytes32 => uint256)" }, "typeName": { "id": 8563, "keyType": { "id": 8561, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "1044:7:78", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "nodeType": "Mapping", "src": "1036:66:78", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", "typeString": "mapping(bytes32 => uint256)" }, "valueType": { "id": 8562, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1071:7:78", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } }, "visibility": "private" }, { "constant": false, "id": 8568, "mutability": "mutable", "name": "_riskpoolIdForProductId", "nameLocation": "1204:23:78", "nodeType": "VariableDeclaration", "scope": 9719, "src": "1135:92:78", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", "typeString": "mapping(uint256 => uint256)" }, "typeName": { "id": 8567, "keyType": { "id": 8565, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1143:7:78", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Mapping", "src": "1135:60:78", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", "typeString": "mapping(uint256 => uint256)" }, "valueType": { "id": 8566, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1170:7:78", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } }, "visibility": "private" }, { "constant": false, "id": 8573, "mutability": "mutable", "name": "_riskpools", "nameLocation": "1291:10:78", "nodeType": "VariableDeclaration", "scope": 9719, "src": "1234:67:78", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Pool_$21605_storage_$", "typeString": "mapping(uint256 => struct IPool.Pool)" }, "typeName": { "id": 8572, "keyType": { "id": 8569, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1242:7:78", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Mapping", "src": "1234:47:78", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Pool_$21605_storage_$", "typeString": "mapping(uint256 => struct IPool.Pool)" }, "valueType": { "id": 8571, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 8570, "name": "IPool.Pool", "nodeType": "IdentifierPath", "referencedDeclaration": 21605, "src": "1270:10:78" }, "referencedDeclaration": 21605, "src": "1270:10:78", "typeDescriptions": { "typeIdentifier": "t_struct$_Pool_$21605_storage_ptr", "typeString": "struct IPool.Pool" } } }, "visibility": "private" }, { "constant": false, "id": 8577, "mutability": "mutable", "name": "_maxmimumNumberOfActiveBundlesForRiskpoolId", "nameLocation": "1397:43:78", "nodeType": "VariableDeclaration", "scope": 9719, "src": "1308:132:78", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", "typeString": "mapping(uint256 => uint256)" }, "typeName": { "id": 8576, "keyType": { "id": 8574, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1316:7:78", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Mapping", "src": "1308:80:78", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", "typeString": "mapping(uint256 => uint256)" }, "valueType": { "id": 8575, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1344:7:78", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } }, "visibility": "private" }, { "constant": false, "id": 8582, "mutability": "mutable", "name": "_activeBundleIdsForRiskpoolId", "nameLocation": "1541:29:78", "nodeType": "VariableDeclaration", "scope": 9719, "src": "1447:123:78", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_UintSet_$19260_storage_$", "typeString": "mapping(uint256 => struct EnumerableSet.UintSet)" }, "typeName": { "id": 8581, "keyType": { "id": 8578, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1455:7:78", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Mapping", "src": "1447:85:78", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_UintSet_$19260_storage_$", "typeString": "mapping(uint256 => struct EnumerableSet.UintSet)" }, "valueType": { "id": 8580, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 8579, "name": "EnumerableSet.UintSet", "nodeType": "IdentifierPath", "referencedDeclaration": 19260, "src": "1483:21:78" }, "referencedDeclaration": 19260, "src": "1483:21:78", "typeDescriptions": { "typeIdentifier": "t_struct$_UintSet_$19260_storage_ptr", "typeString": "struct EnumerableSet.UintSet" } } }, "visibility": "private" }, { "constant": false, "id": 8585, "mutability": "mutable", "name": "_riskpoolIds", "nameLocation": "1600:12:78", "nodeType": "VariableDeclaration", "scope": 9719, "src": "1581:31:78", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$dyn_storage", "typeString": "uint256[]" }, "typeName": { "baseType": { "id": 8583, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1581:7:78", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 8584, "nodeType": "ArrayTypeName", "src": "1581:10:78", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", "typeString": "uint256[]" } }, "visibility": "private" }, { "constant": false, "id": 8588, "mutability": "mutable", "name": "_component", "nameLocation": "1647:10:78", "nodeType": "VariableDeclaration", "scope": 9719, "src": "1619:38:78", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_ComponentController_$6504", "typeString": "contract ComponentController" }, "typeName": { "id": 8587, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 8586, "name": "ComponentController", "nodeType": "IdentifierPath", "referencedDeclaration": 6504, "src": "1619:19:78" }, "referencedDeclaration": 6504, "src": "1619:19:78", "typeDescriptions": { "typeIdentifier": "t_contract$_ComponentController_$6504", "typeString": "contract ComponentController" } }, "visibility": "private" }, { "constant": false, "id": 8591, "mutability": "mutable", "name": "_policy", "nameLocation": "1688:7:78", "nodeType": "VariableDeclaration", "scope": 9719, "src": "1663:32:78", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_PolicyController_$8529", "typeString": "contract PolicyController" }, "typeName": { "id": 8590, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 8589, "name": "PolicyController", "nodeType": "IdentifierPath", "referencedDeclaration": 8529, "src": "1663:16:78" }, "referencedDeclaration": 8529, "src": "1663:16:78", "typeDescriptions": { "typeIdentifier": "t_contract$_PolicyController_$8529", "typeString": "contract PolicyController" } }, "visibility": "private" }, { "constant": false, "id": 8594, "mutability": "mutable", "name": "_bundle", "nameLocation": "1726:7:78", "nodeType": "VariableDeclaration", "scope": 9719, "src": "1701:32:78", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_BundleController_$5504", "typeString": "contract BundleController" }, "typeName": { "id": 8593, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 8592, "name": "BundleController", "nodeType": "IdentifierPath", "referencedDeclaration": 5504, "src": "1701:16:78" }, "referencedDeclaration": 5504, "src": "1701:16:78", "typeDescriptions": { "typeIdentifier": "t_contract$_BundleController_$5504", "typeString": "contract BundleController" } }, "visibility": "private" }, { "body": { "id": 8607, "nodeType": "Block", "src": "1779:172:78", "statements": [ { "expression": { "arguments": [ { "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 8602, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "arguments": [], "expression": { "argumentTypes": [], "id": 8597, "name": "_msgSender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 24064, "src": "1810:10:78", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", "typeString": "function () view returns (address)" } }, "id": 8598, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1810:12:78", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "arguments": [ { "hexValue": "496e7374616e63654f70657261746f7253657276696365", "id": 8600, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "1846:25:78", "typeDescriptions": { "typeIdentifier": "t_stringliteral_893eee863631637173ead46f1c66388136d13bfeb40cdedfb3bfe4f34f933544", "typeString": "literal_string \"InstanceOperatorService\"" }, "value": "InstanceOperatorService" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_stringliteral_893eee863631637173ead46f1c66388136d13bfeb40cdedfb3bfe4f34f933544", "typeString": "literal_string \"InstanceOperatorService\"" } ], "id": 8599, "name": "_getContractAddress", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 14923, "src": "1826:19:78", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", "typeString": "function (bytes32) view returns (address)" } }, "id": 8601, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1826:46:78", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "1810:62:78", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "hexValue": "4552524f523a504f4c2d3030313a4e4f545f494e5354414e43455f4f50455241544f52", "id": 8603, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "1886:37:78", "typeDescriptions": {