UNPKG

@etherisc/terraguard-poc-contracts

Version:

Etherisc's smart contracts for the terraguard poc

1,902 lines (1,901 loc) 200 kB
{ "abi": [ { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "activeBundles", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "bundleId", "type": "uint256" } ], "name": "LogBasicRiskpoolBundlesAndPolicies", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "index", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "bundleId", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "maxAmount", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "collateralAmount", "type": "uint256" } ], "name": "LogBasicRiskpoolCandidateBundleAmountCheck", "type": "event" }, { "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", "7": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/BasicRiskpool.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/BasicRiskpool.sol", "exportedSymbols": { "BasicRiskpool": [ 3428 ], "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": 3429, "license": "Apache-2.0", "nodeType": "SourceUnit", "nodes": [ { "id": 3141, "literals": [ "solidity", "0.8", ".2" ], "nodeType": "PragmaDirective", "src": "40:22:7" }, { "absolutePath": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/Riskpool.sol", "file": "./Riskpool.sol", "id": 3142, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 3429, "sourceUnit": 6545, "src": "66:24:7", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IBundle.sol", "file": "../modules/IBundle.sol", "id": 3143, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 3429, "sourceUnit": 3613, "src": "92:32:7", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IPolicy.sol", "file": "../modules/IPolicy.sol", "id": 3144, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 3429, "sourceUnit": 3959, "src": "126:32:7", "symbolAliases": [], "unitAlias": "" }, { "abstract": true, "baseContracts": [ { "baseName": { "id": 3145, "name": "Riskpool", "nodeType": "IdentifierPath", "referencedDeclaration": 6544, "src": "279:8:7" }, "id": 3146, "nodeType": "InheritanceSpecifier", "src": "279:8:7" } ], "contractDependencies": [ 5114, 5218, 6544, 6682, 6795, 6911, 7650 ], "contractKind": "contract", "fullyImplemented": false, "id": 3428, "linearizedBaseContracts": [ 3428, 6544, 5114, 6795, 6682, 6911, 7650, 5218 ], "name": "BasicRiskpool", "nameLocation": "262:13:7", "nodeType": "ContractDefinition", "nodes": [ { "anonymous": false, "id": 3152, "name": "LogBasicRiskpoolBundlesAndPolicies", "nameLocation": "303:34:7", "nodeType": "EventDefinition", "parameters": { "id": 3151, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 3148, "indexed": false, "mutability": "mutable", "name": "activeBundles", "nameLocation": "346:13:7", "nodeType": "VariableDeclaration", "scope": 3152, "src": "338:21:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 3147, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "338:7:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" }, { "constant": false, "id": 3150, "indexed": false, "mutability": "mutable", "name": "bundleId", "nameLocation": "369:8:7", "nodeType": "VariableDeclaration", "scope": 3152, "src": "361:16:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 3149, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "361:7:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "src": "337:41:7" }, "src": "297:82:7" }, { "anonymous": false, "id": 3162, "name": "LogBasicRiskpoolCandidateBundleAmountCheck", "nameLocation": "391:42:7", "nodeType": "EventDefinition", "parameters": { "id": 3161, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 3154, "indexed": false, "mutability": "mutable", "name": "index", "nameLocation": "442:5:7", "nodeType": "VariableDeclaration", "scope": 3162, "src": "434:13:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 3153, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "434:7:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" }, { "constant": false, "id": 3156, "indexed": false, "mutability": "mutable", "name": "bundleId", "nameLocation": "457:8:7", "nodeType": "VariableDeclaration", "scope": 3162, "src": "449:16:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 3155, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "449:7:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" }, { "constant": false, "id": 3158, "indexed": false, "mutability": "mutable", "name": "maxAmount", "nameLocation": "475:9:7", "nodeType": "VariableDeclaration", "scope": 3162, "src": "467:17:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 3157, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "467:7:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" }, { "constant": false, "id": 3160, "indexed": false, "mutability": "mutable", "name": "collateralAmount", "nameLocation": "494:16:7", "nodeType": "VariableDeclaration", "scope": 3162, "src": "486:24:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 3159, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "486:7:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "src": "433:78:7" }, "src": "385:127:7" }, { "constant": false, "id": 3166, "mutability": "mutable", "name": "_collateralizedBy", "nameLocation": "745:17:7", "nodeType": "VariableDeclaration", "scope": 3428, "src": "676:86:7", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", "typeString": "mapping(bytes32 => uint256)" }, "typeName": { "id": 3165, "keyType": { "id": 3163, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "684:7:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "nodeType": "Mapping", "src": "676:59:7", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", "typeString": "mapping(bytes32 => uint256)" }, "valueType": { "id": 3164, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "711:7:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } }, "visibility": "internal" }, { "constant": false, "id": 3169, "mutability": "mutable", "name": "_policiesCounter", "nameLocation": "784:16:7", "nodeType": "VariableDeclaration", "scope": 3428, "src": "769:35:7", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" }, "typeName": { "id": 3167, "name": "uint32", "nodeType": "ElementaryTypeName", "src": "769:6:7", "typeDescriptions": { "typeIdentifier": "t_uint32", "typeString": "uint32" } }, "value": { "hexValue": "30", "id": 3168, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "803:1:7", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "visibility": "private" }, { "body": { "id": 3192, "nodeType": "Block", "src": "1107:3:7", "statements": [] }, "id": 3193, "implemented": true, "kind": "constructor", "modifiers": [ { "arguments": [ { "id": 3184, "name": "name", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3171, "src": "1027:4:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, { "id": 3185, "name": "collateralization", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3173, "src": "1033:17:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "id": 3186, "name": "sumOfSumInsuredCap", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3175, "src": "1052:18:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "id": 3187, "name": "erc20Token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3177, "src": "1072:10:7", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "id": 3188, "name": "wallet", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3179, "src": "1084:6:7", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "id": 3189, "name": "registry", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3181, "src": "1092:8:7", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "id": 3190, "modifierName": { "id": 3183, "name": "Riskpool", "nodeType": "IdentifierPath", "referencedDeclaration": 6544, "src": "1018:8:7" }, "nodeType": "ModifierInvocation", "src": "1018:83:7" } ], "name": "", "nameLocation": "-1:-1:-1", "nodeType": "FunctionDefinition", "parameters": { "id": 3182, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 3171, "mutability": "mutable", "name": "name", "nameLocation": "843:4:7", "nodeType": "VariableDeclaration", "scope": 3193, "src": "835:12:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 3170, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "835:7:7", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "visibility": "internal" }, { "constant": false, "id": 3173, "mutability": "mutable", "name": "collateralization", "nameLocation": "866:17:7", "nodeType": "VariableDeclaration", "scope": 3193, "src": "858:25:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 3172, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "858:7:7", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" }, { "constant": false, "id": 3175, "mutability": "mutable", "name": "sumOfSumInsuredCap", "nameLocation": "902:18:7", "nodeType": "VariableDeclaration", "scope": 3193, "src": "894:26:7", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 3174, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "894:7:7", "typeDescriptions": {