UNPKG

@etherisc/depeg-contracts

Version:

Etherisc's smart contracts for a depeg insurance for stable coins.

1,590 lines 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": { "0": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/access/Ownable.sol", "1": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/proxy/utils/Initializable.sol", "10": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/Address.sol", "11": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/Context.sol", "12": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/Strings.sol", "14": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/introspection/ERC165.sol", "15": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/introspection/IERC165.sol", "16": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/structs/EnumerableSet.sol", "17": "/home/vscode/.brownie/packages/etherisc/gif-contracts@b58fd27/contracts/modules/BundleController.sol", "18": "/home/vscode/.brownie/packages/etherisc/gif-contracts@b58fd27/contracts/modules/ComponentController.sol", "19": "/home/vscode/.brownie/packages/etherisc/gif-contracts@b58fd27/contracts/modules/PolicyController.sol", "20": "/home/vscode/.brownie/packages/etherisc/gif-contracts@b58fd27/contracts/modules/PoolController.sol", "22": "/home/vscode/.brownie/packages/etherisc/gif-contracts@b58fd27/contracts/shared/CoreController.sol", "24": "/home/vscode/.brownie/packages/etherisc/gif-contracts@b58fd27/contracts/tokens/BundleToken.sol", "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", "30": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IRiskpool.sol", "33": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IAccess.sol", "34": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IBundle.sol", "35": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IComponentEvents.sol", "36": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IPolicy.sol", "37": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IPool.sol", "38": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IRegistry.sol", "46": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/tokens/IBundleToken.sol", "6": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC721/ERC721.sol", "7": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC721/IERC721.sol", "8": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC721/IERC721Receiver.sol", "9": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC721/extensions/IERC721Metadata.sol" }, "ast": { "absolutePath": "/home/vscode/.brownie/packages/etherisc/gif-contracts@b58fd27/contracts/modules/PoolController.sol", "exportedSymbols": { "Address": [ 24852 ], "BundleController": [ 17412 ], "ComponentController": [ 18412 ], "Context": [ 15648 ], "CoreController": [ 21649 ], "EnumerableSet": [ 10109 ], "IAccess": [ 22927 ], "IBundle": [ 13382 ], "IComponent": [ 11675 ], "IComponentEvents": [ 22980 ], "IOracle": [ 23539 ], "IPolicy": [ 12649 ], "IPool": [ 23131 ], "IProduct": [ 21878 ], "IRegistry": [ 21976 ], "IRiskpool": [ 14585 ], "Initializable": [ 23690 ], "PolicyController": [ 20323 ], "PoolController": [ 21513 ] }, "id": 21514, "license": "Apache-2.0", "nodeType": "SourceUnit", "nodes": [ { "id": 20325, "literals": [ "solidity", "0.8", ".2" ], "nodeType": "PragmaDirective", "src": "39:22:20" }, { "absolutePath": "/home/vscode/.brownie/packages/etherisc/gif-contracts@b58fd27/contracts/modules/ComponentController.sol", "file": "./ComponentController.sol", "id": 20326, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 21514, "sourceUnit": 18413, "src": "63:35:20", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/home/vscode/.brownie/packages/etherisc/gif-contracts@b58fd27/contracts/modules/PolicyController.sol", "file": "./PolicyController.sol", "id": 20327, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 21514, "sourceUnit": 20324, "src": "99:32:20", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/home/vscode/.brownie/packages/etherisc/gif-contracts@b58fd27/contracts/modules/BundleController.sol", "file": "./BundleController.sol", "id": 20328, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 21514, "sourceUnit": 17413, "src": "132:32:20", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/home/vscode/.brownie/packages/etherisc/gif-contracts@b58fd27/contracts/shared/CoreController.sol", "file": "../shared/CoreController.sol", "id": 20329, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 21514, "sourceUnit": 21650, "src": "165:38:20", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IPool.sol", "file": "@etherisc/gif-interface/contracts/modules/IPool.sol", "id": 20330, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 21514, "sourceUnit": 23132, "src": "205:61:20", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IComponent.sol", "file": "@etherisc/gif-interface/contracts/components/IComponent.sol", "id": 20331, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 21514, "sourceUnit": 11676, "src": "267:69:20", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IRiskpool.sol", "file": "@etherisc/gif-interface/contracts/components/IRiskpool.sol", "id": 20332, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 21514, "sourceUnit": 14586, "src": "337:68:20", "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": 20333, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 21514, "sourceUnit": 10110, "src": "408:65:20", "symbolAliases": [], "unitAlias": "" }, { "abstract": false, "baseContracts": [ { "baseName": { "id": 20334, "name": "IPool", "nodeType": "IdentifierPath", "referencedDeclaration": 23131, "src": "506:5:20" }, "id": 20335, "nodeType": "InheritanceSpecifier", "src": "506:5:20" }, { "baseName": { "id": 20336, "name": "CoreController", "nodeType": "IdentifierPath", "referencedDeclaration": 21649, "src": "517:14:20" }, "id": 20337, "nodeType": "InheritanceSpecifier", "src": "517:14:20" } ], "contractDependencies": [ 15648, 21649, 23131, 23690 ], "contractKind": "contract", "fullyImplemented": true, "id": 21513, "linearizedBaseContracts": [ 21513, 21649, 23690, 15648, 23131 ], "name": "PoolController", "nameLocation": "484:14:20", "nodeType": "ContractDefinition", "nodes": [ { "id": 20341, "libraryName": { "id": 20338, "name": "EnumerableSet", "nodeType": "IdentifierPath", "referencedDeclaration": 10109, "src": "545:13:20" }, "nodeType": "UsingForDirective", "src": "539:46:20", "typeName": { "id": 20340, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 20339, "name": "EnumerableSet.UintSet", "nodeType": "IdentifierPath", "referencedDeclaration": 9979, "src": "563:21:20" }, "referencedDeclaration": 9979, "src": "563:21:20", "typeDescriptions": { "typeIdentifier": "t_struct$_UintSet_$9979_storage_ptr", "typeString": "struct EnumerableSet.UintSet" } } }, { "constant": true, "functionSelector": "45fe1c6d", "id": 20346, "mutability": "constant", "name": "FULL_COLLATERALIZATION_LEVEL", "nameLocation": "774:28:20", "nodeType": "VariableDeclaration", "scope": 21513, "src": "750:61:20", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 20342, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "750:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": { "commonType": { "typeIdentifier": "t_rational_1000000000000000000_by_1", "typeString": "int_const 1000000000000000000" }, "id": 20345, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "leftExpression": { "hexValue": "3130", "id": 20343, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "805:2:20", "typeDescriptions": { "typeIdentifier": "t_rational_10_by_1", "typeString": "int_const 10" }, "value": "10" }, "nodeType": "BinaryOperation", "operator": "**", "rightExpression": { "hexValue": "3138", "id": 20344, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "809:2:20", "typeDescriptions": { "typeIdentifier": "t_rational_18_by_1", "typeString": "int_const 18" }, "value": "18" }, "src": "805:6:20", "typeDescriptions": { "typeIdentifier": "t_rational_1000000000000000000_by_1", "typeString": "int_const 1000000000000000000" } }, "visibility": "public" }, { "constant": true, "functionSelector": "da68771a", "id": 20351, "mutability": "constant", "name": "COLLATERALIZATION_LEVEL_CAP", "nameLocation": "896:27:20", "nodeType": "VariableDeclaration", "scope": 21513, "src": "872:86:20", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 20347, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "872:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 20350, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "leftExpression": { "hexValue": "32", "id": 20348, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "926:1:20", "typeDescriptions": { "typeIdentifier": "t_rational_2_by_1", "typeString": "int_const 2" }, "value": "2" }, "nodeType": "BinaryOperation", "operator": "*", "rightExpression": { "id": 20349, "name": "FULL_COLLATERALIZATION_LEVEL", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 20346, "src": "930:28:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "926:32:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "public" }, { "constant": true, "functionSelector": "edb5be30", "id": 20354, "mutability": "constant", "name": "DEFAULT_MAX_NUMBER_OF_ACTIVE_BUNDLES", "nameLocation": "989:36:20", "nodeType": "VariableDeclaration", "scope": 21513, "src": "965:64:20", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 20352, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "965:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": { "hexValue": "31", "id": 20353, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1028:1:20", "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1" }, "value": "1" }, "visibility": "public" }, { "constant": false, "id": 20358, "mutability": "mutable", "name": "_collateralAmount", "nameLocation": "1111:17:20", "nodeType": "VariableDeclaration", "scope": 21513, "src": "1036:92:20", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", "typeString": "mapping(bytes32 => uint256)" }, "typeName": { "id": 20357, "keyType": { "id": 20355, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "1044:7:20", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "nodeType": "Mapping", "src": "1036:66:20", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", "typeString": "mapping(bytes32 => uint256)" }, "valueType": { "id": 20356, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1071:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } }, "visibility": "private" }, { "constant": false, "id": 20362, "mutability": "mutable", "name": "_riskpoolIdForProductId", "nameLocation": "1204:23:20", "nodeType": "VariableDeclaration", "scope": 21513, "src": "1135:92:20", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", "typeString": "mapping(uint256 => uint256)" }, "typeName": { "id": 20361, "keyType": { "id": 20359, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1143:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Mapping", "src": "1135:60:20", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", "typeString": "mapping(uint256 => uint256)" }, "valueType": { "id": 20360, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1170:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } }, "visibility": "private" }, { "constant": false, "id": 20367, "mutability": "mutable", "name": "_riskpools", "nameLocation": "1291:10:20", "nodeType": "VariableDeclaration", "scope": 21513, "src": "1234:67:20", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Pool_$23084_storage_$", "typeString": "mapping(uint256 => struct IPool.Pool)" }, "typeName": { "id": 20366, "keyType": { "id": 20363, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1242:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Mapping", "src": "1234:47:20", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Pool_$23084_storage_$", "typeString": "mapping(uint256 => struct IPool.Pool)" }, "valueType": { "id": 20365, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 20364, "name": "IPool.Pool", "nodeType": "IdentifierPath", "referencedDeclaration": 23084, "src": "1270:10:20" }, "referencedDeclaration": 23084, "src": "1270:10:20", "typeDescriptions": { "typeIdentifier": "t_struct$_Pool_$23084_storage_ptr", "typeString": "struct IPool.Pool" } } }, "visibility": "private" }, { "constant": false, "id": 20371, "mutability": "mutable", "name": "_maxmimumNumberOfActiveBundlesForRiskpoolId", "nameLocation": "1397:43:20", "nodeType": "VariableDeclaration", "scope": 21513, "src": "1308:132:20", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", "typeString": "mapping(uint256 => uint256)" }, "typeName": { "id": 20370, "keyType": { "id": 20368, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1316:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Mapping", "src": "1308:80:20", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", "typeString": "mapping(uint256 => uint256)" }, "valueType": { "id": 20369, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1344:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } }, "visibility": "private" }, { "constant": false, "id": 20376, "mutability": "mutable", "name": "_activeBundleIdsForRiskpoolId", "nameLocation": "1541:29:20", "nodeType": "VariableDeclaration", "scope": 21513, "src": "1447:123:20", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_UintSet_$9979_storage_$", "typeString": "mapping(uint256 => struct EnumerableSet.UintSet)" }, "typeName": { "id": 20375, "keyType": { "id": 20372, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1455:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Mapping", "src": "1447:85:20", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_UintSet_$9979_storage_$", "typeString": "mapping(uint256 => struct EnumerableSet.UintSet)" }, "valueType": { "id": 20374, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 20373, "name": "EnumerableSet.UintSet", "nodeType": "IdentifierPath", "referencedDeclaration": 9979, "src": "1483:21:20" }, "referencedDeclaration": 9979, "src": "1483:21:20", "typeDescriptions": { "typeIdentifier": "t_struct$_UintSet_$9979_storage_ptr", "typeString": "struct EnumerableSet.UintSet" } } }, "visibility": "private" }, { "constant": false, "id": 20379, "mutability": "mutable", "name": "_riskpoolIds", "nameLocation": "1600:12:20", "nodeType": "VariableDeclaration", "scope": 21513, "src": "1581:31:20", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$dyn_storage", "typeString": "uint256[]" }, "typeName": { "baseType": { "id": 20377, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1581:7:20", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 20378, "nodeType": "ArrayTypeName", "src": "1581:10:20", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", "typeString": "uint256[]" } }, "visibility": "private" }, { "constant": false, "id": 20382, "mutability": "mutable", "name": "_component", "nameLocation": "1647:10:20", "nodeType": "VariableDeclaration", "scope": 21513, "src": "1619:38:20", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_ComponentController_$18412", "typeString": "contract ComponentController" }, "typeName": { "id": 20381, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 20380, "name": "ComponentController", "nodeType": "IdentifierPath", "referencedDeclaration": 18412, "src": "1619:19:20" }, "referencedDeclaration": 18412, "src": "1619:19:20", "typeDescriptions": { "typeIdentifier": "t_contract$_ComponentController_$18412", "typeString": "contract ComponentController" } }, "visibility": "private" }, { "constant": false, "id": 20385, "mutability": "mutable", "name": "_policy", "nameLocation": "1688:7:20", "nodeType": "VariableDeclaration", "scope": 21513, "src": "1663:32:20", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_PolicyController_$20323", "typeString": "contract PolicyController" }, "typeName": { "id": 20384, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 20383, "name": "PolicyController", "nodeType": "IdentifierPath", "referencedDeclaration": 20323, "src": "1663:16:20" }, "referencedDeclaration": 20323, "src": "1663:16:20", "typeDescriptions": { "typeIdentifier": "t_contract$_PolicyController_$20323", "typeString": "contract PolicyController" } }, "visibility": "private" }, { "constant": false, "id": 20388, "mutability": "mutable", "name": "_bundle", "nameLocation": "1726:7:20", "nodeType": "VariableDeclaration", "scope": 21513, "src": "1701:32:20", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_BundleController_$17412", "typeString": "contract BundleController" }, "typeName": { "id": 20387, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 20386, "name": "BundleController", "nodeType": "IdentifierPath", "referencedDeclaration": 17412, "src": "1701:16:20" }, "referencedDeclaration": 17412, "src": "1701:16:20", "typeDescriptions": { "typeIdentifier": "t_contract$_BundleController_$17412", "typeString": "contract BundleController" } }, "visibility": "private" }, { "body": { "id": 20401, "nodeType": "Block", "src": "1779:172:20", "statements": [ { "expression": { "arguments": [ { "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 20396, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "arguments": [], "expression": { "argumentTypes": [], "id": 20391, "name": "_msgSender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 15638, "src": "1810:10:20", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", "typeString": "function () view returns (address)" } }, "id": 20392, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1810:12:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "arguments": [ { "hexValue": "496e7374616e63654f70657261746f7253657276696365", "id": 20394, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "1846:25:20", "typeDescriptions": { "typeIdentifier": "t_stringliteral_893eee863631637173ead46f1c66388136d13bfeb40cdedfb3bfe4f34f933544", "typeString": "literal_string \"InstanceOperatorService\"" }, "value": "InstanceOperatorService" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_stringliteral_893eee863631637173ead46f1c66388136d13bfeb40cdedfb3bfe4f34f933544", "typeString": "literal_string \"InstanceOperatorService\"" } ], "id": 20393, "name": "_getContractAddress", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 21648, "src": "1826:19:20", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", "typeString": "function (bytes32) view returns (address)" } }, "id": 20395, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1826:46:20", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "1810:62:20", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "hexValue": "4552524f523a504f4c2d3030313a4e4f545f494e5354414e43455f4f50455241544f52", "id": 20397, "isConstant": fals