UNPKG

@etherisc/gif-contracts

Version:

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

1,914 lines (1,913 loc) 998 kB
{ "abi": [ { "inputs": [ { "internalType": "bytes32", "name": "name", "type": "bytes32" }, { "internalType": "uint256", "name": "collateralization", "type": "uint256" }, { "internalType": "address", "name": "erc20Token", "type": "address" }, { "internalType": "address", "name": "wallet", "type": "address" }, { "internalType": "address", "name": "registry", "type": "address" } ], "stateMutability": "nonpayable", "type": "constructor" }, { "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": "SUM_OF_SUM_INSURED_CAP", "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": "pure", "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": { "13": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC20/IERC20.sol", "18": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC721/IERC721.sol", "22": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/Context.sol", "26": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/introspection/IERC165.sol", "28": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/BasicRiskpool.sol", "29": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/Component.sol", "30": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IComponent.sol", "33": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IRiskpool.sol", "36": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/Riskpool.sol", "37": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IAccess.sol", "39": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IComponentEvents.sol", "4": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/access/Ownable.sol", "44": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IRegistry.sol", "46": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IComponentOwnerService.sol", "47": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IInstanceOperatorService.sol", "48": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IInstanceService.sol", "49": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IOracleService.sol", "50": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IProductService.sol", "51": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IRiskpoolService.sol", "53": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/tokens/IBundleToken.sol", "99": "contracts/test/TestRiskpool.sol" }, "ast": { "absolutePath": "contracts/test/TestRiskpool.sol", "exportedSymbols": { "BasicRiskpool": [ 20307 ], "Component": [ 25407 ], "Context": [ 24074 ], "IAccess": [ 21938 ], "IBundle": [ 20491 ], "IBundleToken": [ 24052 ], "IComponent": [ 22099 ], "IComponentEvents": [ 22419 ], "IComponentOwnerService": [ 23478 ], "IERC165": [ 27203 ], "IERC20": [ 18510 ], "IERC721": [ 23745 ], "IInstanceOperatorService": [ 23629 ], "IInstanceService": [ 22849 ], "IOracleService": [ 23755 ], "IPolicy": [ 20837 ], "IPool": [ 21652 ], "IProductService": [ 23900 ], "IRegistry": [ 21750 ], "IRiskpool": [ 22366 ], "IRiskpoolService": [ 24006 ], "ITreasury": [ 23443 ], "Ownable": [ 20950 ], "Riskpool": [ 27141 ], "TestRiskpool": [ 16983 ] }, "id": 16984, "license": "Apache-2.0", "nodeType": "SourceUnit", "nodes": [ { "id": 16933, "literals": [ "solidity", "0.8", ".2" ], "nodeType": "PragmaDirective", "src": "39:22:99" }, { "absolutePath": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/BasicRiskpool.sol", "file": "@etherisc/gif-interface/contracts/components/BasicRiskpool.sol", "id": 16934, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 16984, "sourceUnit": 20308, "src": "63:72:99", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IBundle.sol", "file": "@etherisc/gif-interface/contracts/modules/IBundle.sol", "id": 16935, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 16984, "sourceUnit": 20492, "src": "136:63:99", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IPolicy.sol", "file": "@etherisc/gif-interface/contracts/modules/IPolicy.sol", "id": 16936, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 16984, "sourceUnit": 20838, "src": "200:63:99", "symbolAliases": [], "unitAlias": "" }, { "abstract": false, "baseContracts": [ { "baseName": { "id": 16937, "name": "BasicRiskpool", "nodeType": "IdentifierPath", "referencedDeclaration": 20307, "src": "290:13:99" }, "id": 16938, "nodeType": "InheritanceSpecifier", "src": "290:13:99" } ], "contractDependencies": [ 20307, 20950, 22099, 22366, 22419, 24074, 25407, 27141 ], "contractKind": "contract", "fullyImplemented": true, "id": 16983, "linearizedBaseContracts": [ 16983, 20307, 27141, 25407, 20950, 24074, 22419, 22366, 22099 ], "name": "TestRiskpool", "nameLocation": "274:12:99", "nodeType": "ContractDefinition", "nodes": [ { "constant": true, "functionSelector": "be61e91e", "id": 16943, "mutability": "constant", "name": "SUM_OF_SUM_INSURED_CAP", "nameLocation": "335:22:99", "nodeType": "VariableDeclaration", "scope": 16983, "src": "311:55:99", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 16939, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "311:7:99", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": { "commonType": { "typeIdentifier": "t_rational_1000000000000000000000000_by_1", "typeString": "int_const 1000000000000000000000000" }, "id": 16942, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "leftExpression": { "hexValue": "3130", "id": 16940, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "360:2:99", "typeDescriptions": { "typeIdentifier": "t_rational_10_by_1", "typeString": "int_const 10" }, "value": "10" }, "nodeType": "BinaryOperation", "operator": "**", "rightExpression": { "hexValue": "3234", "id": 16941, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "364:2:99", "typeDescriptions": { "typeIdentifier": "t_rational_24_by_1", "typeString": "int_const 24" }, "value": "24" }, "src": "360:6:99", "typeDescriptions": { "typeIdentifier": "t_rational_1000000000000000000000000_by_1", "typeString": "int_const 1000000000000000000000000" } }, "visibility": "public" }, { "body": { "id": 16964, "nodeType": "Block", "src": "631:3:99", "statements": [] }, "id": 16965, "implemented": true, "kind": "constructor", "modifiers": [ { "arguments": [ { "id": 16956, "name": "name", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 16945, "src": "548:4:99", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, { "id": 16957, "name": "collateralization", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 16947, "src": "554:17:99", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "id": 16958, "name": "SUM_OF_SUM_INSURED_CAP", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 16943, "src": "573:22:99", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "id": 16959, "name": "erc20Token", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 16949, "src": "597:10:99", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "id": 16960, "name": "wallet", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 16951, "src": "609:6:99", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "id": 16961, "name": "registry", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 16953, "src": "617:8:99", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "id": 16962, "modifierName": { "id": 16955, "name": "BasicRiskpool", "nodeType": "IdentifierPath", "referencedDeclaration": 20307, "src": "534:13:99" }, "nodeType": "ModifierInvocation", "src": "534:92:99" } ], "name": "", "nameLocation": "-1:-1:-1", "nodeType": "FunctionDefinition", "parameters": { "id": 16954, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 16945, "mutability": "mutable", "name": "name", "nameLocation": "402:4:99", "nodeType": "VariableDeclaration", "scope": 16965, "src": "394:12:99", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 16944, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "394:7:99", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "visibility": "internal" }, { "constant": false, "id": 16947, "mutability": "mutable", "name": "collateralization", "nameLocation": "424:17:99", "nodeType": "VariableDeclaration", "scope": 16965, "src": "416:25:99", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 16946, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "416:7:99", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" }, { "constant": false, "id": 16949, "mutability": "mutable", "name": "erc20Token", "nameLocation": "459:10:99", "nodeType": "VariableDeclaration", "scope": 16965, "src": "451:18:99", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 16948, "name": "address", "nodeType": "ElementaryTypeName", "src": "451:7:99", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" }, { "constant": false, "id": 16951, "mutability": "mutable", "name": "wallet", "nameLocation": "487:6:99", "nodeType": "VariableDeclaration", "scope": 16965, "src": "479:14:99", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 16950, "name": "address", "nodeType": "ElementaryTypeName", "src": "479:7:99", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" }, { "constant": false, "id": 16953, "mutability": "mutable", "name": "registry", "nameLocation": "511:8:99", "nodeType": "VariableDeclaration", "scope": 16965, "src": "503:16:99", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 16952, "name": "address", "nodeType": "ElementaryTypeName", "src": "503:7:99", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" } ], "src": "384:141:99" }, "returnParameters": { "id": 16963, "nodeType": "ParameterList", "parameters": [], "src": "631:0:99" }, "scope": 16983, "src": "373:261:99", "stateMutability": "nonpayable", "virtual": false, "visibility": "public" }, { "baseFunctions": [ 27090 ], "body": { "id": 16981, "nodeType": "Block", "src": "904:34:99", "statements": [ { "expression": { "id": 16979, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "id": 16977, "name": "isMatching", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 16975, "src": "914:10:99", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "hexValue": "74727565", "id": 16978, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "927:4:99", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, "src": "914:17:99", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 16980, "nodeType": "ExpressionStatement", "src": "914:17:99" } ] }, "functionSelector": "86c71288", "id": 16982, "implemented": true, "kind": "function", "modifiers": [], "name": "bundleMatchesApplication", "nameLocation": "710:24:99", "nodeType": "FunctionDefinition", "overrides": { "id": 16973, "nodeType": "OverrideSpecifier", "overrides": [], "src": "844:8:99" }, "parameters": { "id": 16972, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 16968, "mutability": "mutable", "name": "bundle", "nameLocation": "766:6:99", "nodeType": "VariableDeclaration", "scope": 16982, "src": "744:28:99", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_struct$_Bundle_$20407_memory_ptr", "typeString": "struct IBundle.Bundle" }, "typeName": { "id": 16967,