UNPKG

@etherisc/terraguard-poc-contracts

Version:

Etherisc's smart contracts for the terraguard poc

1,897 lines (1,896 loc) 383 kB
{ "abi": [ { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "id", "type": "uint256" } ], "name": "LogComponentApproved", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "id", "type": "uint256" } ], "name": "LogComponentArchived", "type": "event" }, { "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": "id", "type": "uint256" } ], "name": "LogComponentDeclined", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "id", "type": "uint256" } ], "name": "LogComponentPaused", "type": "event" }, { "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": "uint256", "name": "id", "type": "uint256" } ], "name": "LogComponentProposed", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "id", "type": "uint256" } ], "name": "LogComponentResumed", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "id", "type": "uint256" }, { "indexed": false, "internalType": "enum IComponent.ComponentState", "name": "stateOld", "type": "uint8" }, { "indexed": false, "internalType": "enum IComponent.ComponentState", "name": "stateNew", "type": "uint8" } ], "name": "LogComponentStateChanged", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "id", "type": "uint256" } ], "name": "LogComponentSuspended", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "id", "type": "uint256" } ], "name": "LogComponentUnpaused", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "id", "type": "uint256" } ], "name": "LogRiskpoolApproved", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "bundleId", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "LogRiskpoolBundleCreated", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "bundleId", "type": "uint256" }, { "indexed": false, "internalType": "bool", "name": "isMatching", "type": "bool" } ], "name": "LogRiskpoolBundleMatchesPolicy", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "bytes32", "name": "processId", "type": "bytes32" }, { "indexed": false, "internalType": "uint256", "name": "collateralAmount", "type": "uint256" }, { "indexed": false, "internalType": "bool", "name": "isSecured", "type": "bool" } ], "name": "LogRiskpoolCollateralLocked", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "bytes32", "name": "processId", "type": "bytes32" }, { "indexed": false, "internalType": "uint256", "name": "collateralAmount", "type": "uint256" } ], "name": "LogRiskpoolCollateralReleased", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "riskpoolAddress", "type": "address" } ], "name": "LogRiskpoolCreated", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "id", "type": "uint256" } ], "name": "LogRiskpoolDeclined", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "bytes32", "name": "processId", "type": "bytes32" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "LogRiskpoolPayoutProcessed", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "bytes32", "name": "processId", "type": "bytes32" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "LogRiskpoolPremiumProcessed", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "id", "type": "uint256" } ], "name": "LogRiskpoolProposed", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" }, { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "OwnershipTransferred", "type": "event" }, { "inputs": [], "name": "DEFAULT_FILTER_DATA_STRUCTURE", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "FULL_COLLATERALIZATION_LEVEL", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "activeBundles", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "approvalCallback", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "archiveCallback", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "components": [ { "internalType": "uint256", "name": "id", "type": "uint256" }, { "internalType": "uint256", "name": "riskpoolId", "type": "uint256" }, { "internalType": "uint256", "name": "tokenId", "type": "uint256" }, { "internalType": "enum IBundle.BundleState", "name": "state", "type": "uint8" }, { "internalType": "bytes", "name": "filter", "type": "bytes" }, { "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 IBundle.Bundle", "name": "bundle", "type": "tuple" }, { "components": [ { "internalType": "enum IPolicy.ApplicationState", "name": "state", "type": "uint8" }, { "internalType": "uint256", "name": "premiumAmount", "type": "uint256" }, { "internalType": "uint256", "name": "sumInsuredAmount", "type": "uint256" }, { "internalType": "bytes", "name": "data", "type": "bytes" }, { "internalType": "uint256", "name": "createdAt", "type": "uint256" }, { "internalType": "uint256", "name": "updatedAt", "type": "uint256" } ], "internalType": "struct IPolicy.Application", "name": "application", "type": "tuple" } ], "name": "bundleMatchesApplication", "outputs": [ { "internalType": "bool", "name": "isMatching", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "bundles", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "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": "bytes32", "name": "processId", "type": "bytes32" }, { "internalType": "uint256", "name": "collateralAmount", "type": "uint256" } ], "name": "collateralizePolicy", "outputs": [ { "internalType": "bool", "name": "success", "type": "bool" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "bytes", "name": "filter", "type": "bytes" }, { "internalType": "uint256", "name": "initialAmount", "type": "uint256" } ], "name": "createBundle", "outputs": [ { "internalType": "uint256", "name": "bundleId", "type": "uint256" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "declineCallback", "outputs": [], "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": "uint256", "name": "idx", "type": "uint256" } ], "name": "getActiveBundleId", "outputs": [ { "internalType": "uint256", "name": "bundleId", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getBalance", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "idx", "type": "uint256" } ], "name": "getBundle", "outputs": [ { "components": [ { "internalType": "uint256", "name": "id", "type": "uint256" }, { "internalType": "uint256", "name": "riskpoolId", "type": "uint256" }, { "internalType": "uint256", "name": "tokenId", "type": "uint256" }, { "internalType": "enum IBundle.BundleState", "name": "state", "type": "uint8" }, { "internalType": "bytes", "name": "filter", "type": "bytes" }, { "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 IBundle.Bundle", "name": "", "type": "tuple" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getCapacity", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getCapital", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getCollateralizationLevel", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getErc20Token", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getFilterDataStructure", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "pure", "type": "function" }, { "inputs": [], "name": "getFullCollateralizationLevel", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "pure", "type": "function" }, { "inputs": [], "name": "getId", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getMaximumNumberOfActiveBundles", "outputs": [ { "internalType": "uint256", "name": "maximumNumberOfActiveBundles", "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": "getRegistry", "outputs": [ { "internalType": "contract IRegistry", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getState", "outputs": [ { "internalType": "enum IComponent.ComponentState", "name": "", "type": "uint8" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getSumOfSumInsuredCap", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getTotalValueLocked", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getType", "outputs": [ { "internalType": "enum IComponent.ComponentType", "name": "", "type": "uint8" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getWallet", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "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": [ { "internalType": "uint256", "name": "bundleId", "type": "uint256" } ], "name": "lockBundle", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "owner", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "pauseCallback", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "bytes32", "name": "processId", "type": "bytes32" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "processPolicyPayout", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "bytes32", "name": "processId", "type": "bytes32" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "processPolicyPremium", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "proposalCallback", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "bytes32", "name": "processId", "type": "bytes32" } ], "name": "releasePolicy", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "renounceOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "resumeCallback", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "id", "type": "uint256" } ], "name": "setId", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "maximumNumberOfActiveBundles", "type": "uint256" } ], "name": "setMaximumNumberOfActiveBundles", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "suspendCallback", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "transferOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "bundleId", "type": "uint256" } ], "name": "unlockBundle", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "unpauseCallback", "outputs": [], "stateMutability": "nonpayable", "type": "function" } ], "allSourcePaths": { "0": "/home/runner/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/access/Ownable.sol", "12": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IRiskpool.sol", "15": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/Riskpool.sol", "16": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IAccess.sol", "18": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IComponentEvents.sol", "2": "/home/runner/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/token/ERC20/IERC20.sol", "21": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IRegistry.sol", "23": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IComponentOwnerService.sol", "24": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IInstanceOperatorService.sol", "25": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IInstanceService.sol", "26": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IOracleService.sol", "27": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IProductService.sol", "28": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IRiskpoolService.sol", "29": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/tokens/IBundleToken.sol", "4": "/home/runner/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/token/ERC721/IERC721.sol", "5": "/home/runner/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/utils/Context.sol", "6": "/home/runner/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/utils/introspection/IERC165.sol", "8": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/Component.sol", "9": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IComponent.sol" }, "ast": { "absolutePath": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/Riskpool.sol", "exportedSymbols": { "Component": [ 5114 ], "Context": [ 6682 ], "IAccess": [ 6858 ], "IBundle": [ 3612 ], "IBundleToken": [ 4029 ], "IComponent": [ 5218 ], "IComponentEvents": [ 6911 ], "IComponentOwnerService": [ 7044 ], "IERC165": [ 7662 ], "IERC20": [ 4694 ], "IERC721": [ 6660 ], "IInstanceOperatorService": [ 7311 ], "IInstanceService": [ 5668 ], "IOracleService": [ 5262 ], "IPolicy": [ 3958 ], "IPool": [ 7160 ], "IProductService": [ 5813 ], "IRegistry": [ 7009 ], "IRiskpool": [ 7650 ], "IRiskpoolService": [ 7417 ], "ITreasury": [ 2409 ], "Ownable": [ 6795 ], "Riskpool": [ 6544 ] }, "id": 6545, "license": "Apache-2.0", "nodeType": "SourceUnit", "nodes": [ { "id": 5815, "literals": [ "solidity", "0.8", ".2" ], "nodeType": "PragmaDirective", "src": "40:22:15" }, { "absolutePath": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IRiskpool.sol", "file": "./IRiskpool.sol", "id": 5816, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 6545, "sourceUnit": 7651, "src": "66:25:15", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/Component.sol", "file": "./Component.sol", "id": 5817, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 6545, "sourceUnit": 5115, "src": "93:25:15", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IBundle.sol", "file": "../modules/IBundle.sol", "id": 5818, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 6545, "sourceUnit": 3613, "src": "122:32:15", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IPolicy.sol", "file": "../modules/IPolicy.sol", "id": 5819, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 6545, "sourceUnit": 3959, "src": "156:32:15", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IInstanceService.sol", "file": "../services/IInstanceService.sol", "id": 5820, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 6545, "sourceUnit": 5669, "src": "190:42:15", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IRiskpoolService.sol", "file": "../services/IRiskpoolService.sol", "id": 5821, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 6545, "sourceUnit": 7418, "src": "234:42:15", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/home/runner/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/token/ERC721/IERC721.sol", "file": "@openzeppelin/contracts/token/ERC721/IERC721.sol", "id": 5822, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 6545, "sourceUnit": 6661, "src": "280:58:15", "symbolAliases": [], "unitAlias": "" }, { "abstract": true, "baseContracts": [ { "baseName": { "id": 5823, "name": "IRiskpool", "nodeType": "IdentifierPath", "referencedDeclaration": 7650, "src": "378:9:15" }, "id": 5824, "nodeType": "InheritanceSpecifier", "src": "378:9:15" }, { "baseName": { "id": 5825, "name": "Component", "nodeType": "IdentifierPath", "referencedDeclaration": 5114, "src": "395:9:15" }, "id": 5826, "nodeType": "InheritanceSpecifier", "src": "395:9:15" } ], "contractDependencies": [ 5114, 5218, 6682, 6795, 6911, 7650 ], "contractKind": "contract", "fullyImplemented": false, "id": 6544, "linearizedBaseContracts": [ 6544, 5114, 6795, 6682, 6911, 7650, 5218 ], "name": "Riskpool", "nameLocation": "360:8:15", "nodeType": "ContractDefinition", "nodes": [ { "constant": true, "functionSelector": "45fe1c6d", "id": 5831, "mutability": "constant", "name": "FULL_COLLATERALIZATION_LEVEL", "nameLocation": "604:28:15", "nodeType": "VariableDeclaration", "scope": 6544, "src": "580:61:15", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5827, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "580:7:15", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": { "commonType": { "typeIdentifier": "t_rational_1000000000000000000_by_1", "typeString": "int_const 1000000000000000000" }, "id": 5830, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "leftExpression": { "hexValue": "3130", "id": 5828, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "635:2:15", "typeDescriptions": { "typeIdentifier": "t_rational_10_by_1", "typeString": "int_const 10" }, "value": "10" }, "nodeType": "BinaryOperation", "operator": "**", "rightExpression": { "hexValue": "3138", "id": 5829, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "639:2:15", "typeDescriptions": { "typeIdentifier": "t_rational_18_by_1", "typeString": "int_const 18" }, "value": "18" }, "src": "635:6:15", "typeDescriptions": { "typeIdentifier": "t_rational_1000000000000000000_by_1", "typeString": "int_const 1000000000000000000" } }, "visibility": "public" }, { "constant": true, "functionSelector": "7893c7bc", "id": 5834, "mutability": "constant", "name": "DEFAULT_FILTER_DATA_STRUCTURE", "nameLocation": "671:29:15", "nodeType": "VariableDeclaration", "scope": 6544, "src": "648:57:15", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 5832, "name": "string", "nodeType": "ElementaryTypeName", "src": "648:6:15", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": { "hexValue": "", "id": 5833, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "703:2:15", "typeDescriptions": { "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", "typeString": "literal_string \"\"" }, "value": "" }, "visibility": "public" }, { "constant": false, "id": 5837, "mutability": "mutable", "name": "_instanceService", "nameLocation": "740:16:15", "nodeType": "VariableDeclaration", "scope": 6544, "src": "714:42:15", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_IInstanceService_$5668", "typeString": "contract IInstanceService" }, "typeName": { "id": 5836, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 5835, "name": "IInstanceService", "nodeType": "IdentifierPath", "referencedDeclaration": 5668, "src": "714:16:15" }, "referencedDeclaration": 5668, "src": "714:16:15", "typeDescriptions": { "typeIdentifier": "t_contract$_IInstanceService_$5668", "typeString": "contract IInstanceService" } }, "visibility": "internal" }, { "constant": false, "id": 5840, "mutability": "mutable", "name": "_riskpoolService", "nameLocation": "790:16:15", "nodeType": "VariableDeclaration", "scope": 6544, "src": "764:42:15", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_IRiskpoolService_$7417", "typeString": "contract IRiskpoolService" }, "typeName": { "id": 5839, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 5838, "name": "IRiskpoolService", "nodeType": "IdentifierPath", "referencedDeclaration": 7417, "src": "764:16:15" }, "referencedDeclaration": 7417, "src": "764:16:15", "typeDescriptions": { "typeIdentifier": "t_contract$_IRiskpoolService_$7417", "typeString": "contract IRiskpoolService" } }, "visibility": "internal" }, { "constant": false, "id": 5843, "mutability": "mutable", "name": "_bundleToken", "nameLocation": "830:12:15", "nodeType": "VariableDeclaration", "scope": 6544, "src": "813:29:15", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_IERC721_$6660", "typeString": "contract IERC721" }, "typeName": { "id": 5842, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 5841, "name": "IERC721", "nodeType": "IdentifierPath", "referencedDeclaration": 6660, "src": "813:7:15" }, "referencedDeclaration": 6660, "src": "813:7:15", "typeDescriptions": { "typeIdentifier": "t_contract$_IERC721_$6660", "typeString": "contract IERC721" } }, "visibility": "internal" }, { "constant": false, "id": 5846, "mutability": "mutable", "name": "_bundleIds", "nameLocation": "935:10:15", "nodeType": "VariableDeclaration", "scope": 6544, "src": "915:30:15", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$dyn_storage", "typeString": "uint256[]" }, "typeName": { "baseType": { "id": 5844, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "915:7:15", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 5845, "nodeType": "ArrayTypeName", "src": "915:10:15", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", "typeString": "uint256[]" } }, "visibility": "internal" }, { "constant": false, "id": 5848, "mutability": "mutable", "name": "_wallet", "nameLocation": "970:7:15", "nodeType": "VariableDeclaration", "scope": 6544, "src": "954:23:15", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 5847, "name": "address", "nodeType": "ElementaryTypeName", "src": "954:7:15", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "private" }, { "constant": false, "id": 5850, "mutability": "mutable", "name": "_erc20Token", "nameLocation": "1000:11:15", "nodeType": "VariableDeclaration", "scope": 6544, "src": "984:27:15", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 5849, "name": "address", "nodeType": "ElementaryTypeName", "src": "984:7:15", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "private" }, { "constant": false, "id": 5852, "mutability": "mutable", "name": "_collateralization", "nameLocation": "1034:18:15", "nodeType": "VariableDeclaration", "scope": 6544, "src": "1018:34:15", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5851, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1018:7:15", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "private" }, { "constant": false, "id": 5854, "mutability": "mutable", "name": "_sumOfSumInsuredCap", "nameLocation": "1075:19:15", "nodeType": "VariableDeclaration", "scope": 6544, "src": "1059:35:15", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5853, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1059:7:15", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "private" }, { "constant": false, "id": 5856, "mutability": "mutable", "name": "_maxNumberOfActiveBundles", "nameLocation": "1117:25:15", "nodeType": "VariableDeclaration", "scope": 6544, "src": "1101:41:15", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5855, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1101:7:15", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "private" }, { "body": { "id": 5869, "nodeType": "Block", "src": "1169:151:15", "statements": [ { "expression": { "arguments": [ { "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 5864, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "arguments": [], "expression": { "argumentTypes": [], "id": 5859, "name": "_msgSender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6672, "src": "1202:10:15", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", "typeString": "function () view returns (address)" } }, "id": 5860, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1202:12:15", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "arguments": [ { "hexValue": "506f6f6c", "id": 5862, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false,