UNPKG

@etherisc/gif-contracts

Version:

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

1,607 lines (1,606 loc) 1.64 MB
{ "abi": [ { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint8", "name": "version", "type": "uint8" } ], "name": "Initialized", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "bundleId", "type": "uint256" }, { "indexed": false, "internalType": "address", "name": "sender", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "capacity", "type": "uint256" } ], "name": "LogBundleCapitalProvided", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "bundleId", "type": "uint256" }, { "indexed": false, "internalType": "address", "name": "recipient", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "capacity", "type": "uint256" } ], "name": "LogBundleCapitalWithdrawn", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "bundleId", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "riskpoolId", "type": "uint256" }, { "indexed": false, "internalType": "address", "name": "owner", "type": "address" }, { "indexed": false, "internalType": "enum IBundle.BundleState", "name": "state", "type": "uint8" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "LogBundleCreated", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "bundleId", "type": "uint256" }, { "indexed": false, "internalType": "bytes32", "name": "processId", "type": "bytes32" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "LogBundlePayoutProcessed", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "bundleId", "type": "uint256" }, { "indexed": false, "internalType": "bytes32", "name": "processId", "type": "bytes32" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "capacity", "type": "uint256" } ], "name": "LogBundlePolicyCollateralized", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "bundleId", "type": "uint256" }, { "indexed": false, "internalType": "bytes32", "name": "processId", "type": "bytes32" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "capacity", "type": "uint256" } ], "name": "LogBundlePolicyReleased", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "bundleId", "type": "uint256" }, { "indexed": false, "internalType": "enum IBundle.BundleState", "name": "oldState", "type": "uint8" }, { "indexed": false, "internalType": "enum IBundle.BundleState", "name": "newState", "type": "uint8" } ], "name": "LogBundleStateChanged", "type": "event" }, { "inputs": [], "name": "bundles", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "bundleId", "type": "uint256" } ], "name": "burn", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "bundleId", "type": "uint256" } ], "name": "close", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "bundleId", "type": "uint256" }, { "internalType": "bytes32", "name": "processId", "type": "bytes32" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "collateralizePolicy", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "owner_", "type": "address" }, { "internalType": "uint256", "name": "riskpoolId_", "type": "uint256" }, { "internalType": "bytes", "name": "filter_", "type": "bytes" }, { "internalType": "uint256", "name": "amount_", "type": "uint256" } ], "name": "create", "outputs": [ { "internalType": "uint256", "name": "bundleId", "type": "uint256" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "bundleId", "type": "uint256" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "defund", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "bundleId", "type": "uint256" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "fund", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "bundleId", "type": "uint256" } ], "name": "getBalance", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "bundleId", "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": [ { "internalType": "uint256", "name": "bundleId", "type": "uint256" } ], "name": "getCapacity", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "bundleId", "type": "uint256" } ], "name": "getFilter", "outputs": [ { "internalType": "bytes", "name": "", "type": "bytes" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "bundleId", "type": "uint256" } ], "name": "getOwner", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "bundleId", "type": "uint256" } ], "name": "getState", "outputs": [ { "internalType": "enum IBundle.BundleState", "name": "", "type": "uint8" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getToken", "outputs": [ { "internalType": "contract BundleToken", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "bundleId", "type": "uint256" } ], "name": "getTotalValueLocked", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "registry", "type": "address" } ], "name": "initialize", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "bundleId", "type": "uint256" } ], "name": "lock", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "bundleId", "type": "uint256" }, { "internalType": "bytes32", "name": "processId", "type": "bytes32" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "processPayout", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "bundleId", "type": "uint256" }, { "internalType": "bytes32", "name": "processId", "type": "bytes32" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "processPremium", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "bundleId", "type": "uint256" }, { "internalType": "bytes32", "name": "processId", "type": "bytes32" } ], "name": "releasePolicy", "outputs": [ { "internalType": "uint256", "name": "remainingCollateralAmount", "type": "uint256" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "riskpoolId", "type": "uint256" } ], "name": "unburntBundles", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "bundleId", "type": "uint256" } ], "name": "unlock", "outputs": [], "stateMutability": "nonpayable", "type": "function" } ], "allSourcePaths": { "10": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/proxy/utils/Initializable.sol", "101": "contracts/tokens/BundleToken.sol", "17": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC721/ERC721.sol", "18": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC721/IERC721.sol", "19": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC721/IERC721Receiver.sol", "20": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC721/extensions/IERC721Metadata.sol", "21": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/Address.sol", "22": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/Context.sol", "24": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/Strings.sol", "25": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/introspection/ERC165.sol", "26": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/introspection/IERC165.sol", "27": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/structs/EnumerableSet.sol", "30": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IComponent.sol", "32": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IProduct.sol", "33": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IRiskpool.sol", "37": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IAccess.sol", "38": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IBundle.sol", "39": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IComponentEvents.sol", "4": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/access/Ownable.sol", "41": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IPolicy.sol", "42": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IPool.sol", "44": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IRegistry.sol", "53": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/tokens/IBundleToken.sol", "74": "contracts/modules/BundleController.sol", "75": "contracts/modules/ComponentController.sol", "77": "contracts/modules/PolicyController.sol", "78": "contracts/modules/PoolController.sol", "88": "contracts/shared/CoreController.sol" }, "ast": { "absolutePath": "contracts/modules/BundleController.sol", "exportedSymbols": { "Address": [ 26374 ], "BundleController": [ 5504 ], "BundleToken": [ 17246 ], "ComponentController": [ 6504 ], "Context": [ 24074 ], "CoreController": [ 14924 ], "ERC165": [ 26079 ], "ERC721": [ 24987 ], "EnumerableSet": [ 19390 ], "IAccess": [ 21938 ], "IBundle": [ 20491 ], "IBundleToken": [ 24052 ], "IComponent": [ 22099 ], "IComponentEvents": [ 22419 ], "IERC165": [ 27203 ], "IERC721": [ 23745 ], "IERC721Metadata": [ 27618 ], "IERC721Receiver": [ 27591 ], "IOracle": [ 22133 ], "IPolicy": [ 20837 ], "IProduct": [ 21995 ], "IRegistry": [ 21750 ], "IRiskpool": [ 22366 ], "Initializable": [ 18432 ], "Ownable": [ 20950 ], "PolicyController": [ 8529 ], "PoolController": [ 9719 ], "Strings": [ 23075 ] }, "id": 5505, "license": "Apache-2.0", "nodeType": "SourceUnit", "nodes": [ { "id": 4248, "literals": [ "solidity", "0.8", ".2" ], "nodeType": "PragmaDirective", "src": "39:22:74" }, { "absolutePath": "contracts/modules/PolicyController.sol", "file": "./PolicyController.sol", "id": 4249, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 5505, "sourceUnit": 8530, "src": "63:32:74", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "contracts/shared/CoreController.sol", "file": "../shared/CoreController.sol", "id": 4250, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 5505, "sourceUnit": 14925, "src": "96:38:74", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "contracts/tokens/BundleToken.sol", "file": "../tokens/BundleToken.sol", "id": 4251, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 5505, "sourceUnit": 17247, "src": "135:35:74", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IProduct.sol", "file": "@etherisc/gif-interface/contracts/components/IProduct.sol", "id": 4252, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 5505, "sourceUnit": 21996, "src": "172:67:74", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IBundle.sol", "file": "@etherisc/gif-interface/contracts/modules/IBundle.sol", "id": 4253, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 5505, "sourceUnit": 20492, "src": "240:63:74", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "contracts/modules/PoolController.sol", "file": "./PoolController.sol", "id": 4254, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 5505, "sourceUnit": 9720, "src": "304:30:74", "symbolAliases": [], "unitAlias": "" }, { "abstract": false, "baseContracts": [ { "baseName": { "id": 4255, "name": "IBundle", "nodeType": "IdentifierPath", "referencedDeclaration": 20491, "src": "371:7:74" }, "id": 4256, "nodeType": "InheritanceSpecifier", "src": "371:7:74" }, { "baseName": { "id": 4257, "name": "CoreController", "nodeType": "IdentifierPath", "referencedDeclaration": 14924, "src": "384:14:74" }, "id": 4258, "nodeType": "InheritanceSpecifier", "src": "384:14:74" } ], "contractDependencies": [ 14924, 18432, 20491, 24074 ], "contractKind": "contract", "fullyImplemented": true, "id": 5504, "linearizedBaseContracts": [ 5504, 14924, 18432, 24074, 20491 ], "name": "BundleController", "nameLocation": "346:16:74", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 4261, "mutability": "mutable", "name": "_policy", "nameLocation": "431:7:74", "nodeType": "VariableDeclaration", "scope": 5504, "src": "406:32:74", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_PolicyController_$8529", "typeString": "contract PolicyController" }, "typeName": { "id": 4260, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 4259, "name": "PolicyController", "nodeType": "IdentifierPath", "referencedDeclaration": 8529, "src": "406:16:74" }, "referencedDeclaration": 8529, "src": "406:16:74", "typeDescriptions": { "typeIdentifier": "t_contract$_PolicyController_$8529", "typeString": "contract PolicyController" } }, "visibility": "private" }, { "constant": false, "id": 4264, "mutability": "mutable", "name": "_token", "nameLocation": "464:6:74", "nodeType": "VariableDeclaration", "scope": 5504, "src": "444:26:74", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_BundleToken_$17246", "typeString": "contract BundleToken" }, "typeName": { "id": 4263, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 4262, "name": "BundleToken", "nodeType": "IdentifierPath", "referencedDeclaration": 17246, "src": "444:11:74" }, "referencedDeclaration": 17246, "src": "444:11:74", "typeDescriptions": { "typeIdentifier": "t_contract$_BundleToken_$17246", "typeString": "contract BundleToken" } }, "visibility": "private" }, { "constant": false, "id": 4269, "mutability": "mutable", "name": "_bundles", "nameLocation": "541:8:74", "nodeType": "VariableDeclaration", "scope": 5504, "src": "478:71:74", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Bundle_$20407_storage_$", "typeString": "mapping(uint256 => struct IBundle.Bundle)" }, "typeName": { "id": 4268, "keyType": { "id": 4265, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "486:7:74", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Mapping", "src": "478:54:74", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Bundle_$20407_storage_$", "typeString": "mapping(uint256 => struct IBundle.Bundle)" }, "valueType": { "id": 4267, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 4266, "name": "Bundle", "nodeType": "IdentifierPath", "referencedDeclaration": 20407, "src": "512:6:74" }, "referencedDeclaration": 20407, "src": "512:6:74", "typeDescriptions": { "typeIdentifier": "t_struct$_Bundle_$20407_storage_ptr", "typeString": "struct IBundle.Bundle" } } }, "visibility": "private" }, { "constant": false, "id": 4273, "mutability": "mutable", "name": "_activePolicies", "nameLocation": "630:15:74", "nodeType": "VariableDeclaration", "scope": 5504, "src": "555:90:74", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", "typeString": "mapping(uint256 => uint256)" }, "typeName": { "id": 4272, "keyType": { "id": 4270, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "563:7:74", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Mapping", "src": "555:66:74", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", "typeString": "mapping(uint256 => uint256)" }, "valueType": { "id": 4271, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "589:7:74", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } }, "visibility": "private" }, { "constant": false, "id": 4279, "mutability": "mutable", "name": "_valueLockedPerPolicy", "nameLocation": "764:21:74", "nodeType": "VariableDeclaration", "scope": 5504, "src": "651:134:74", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_bytes32_$_t_uint256_$_$", "typeString": "mapping(uint256 => mapping(bytes32 => uint256))" }, "typeName": { "id": 4278, "keyType": { "id": 4274, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "659:7:74", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Mapping", "src": "651:104:74", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_bytes32_$_t_uint256_$_$", "typeString": "mapping(uint256 => mapping(bytes32 => uint256))" }, "valueType": { "id": 4277, "keyType": { "id": 4275, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "693:7:74", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "nodeType": "Mapping", "src": "685:69:74", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", "typeString": "mapping(bytes32 => uint256)" }, "valueType": { "id": 4276, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "720:7:74", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } } }, "visibility": "private" }, { "constant": false, "id": 4283, "mutability": "mutable", "name": "_unburntBundlesForRiskpoolId", "nameLocation": "873:28:74", "nodeType": "VariableDeclaration", "scope": 5504, "src": "791:110:74", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", "typeString": "mapping(uint256 => uint256)" }, "typeName": { "id": 4282, "keyType": { "id": 4280, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "799:7:74", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Mapping", "src": "791:73:74", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", "typeString": "mapping(uint256 => uint256)" }, "valueType": { "id": 4281, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "827:7:74", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } }, "visibility": "private" }, { "constant": false, "id": 4285, "mutability": "mutable", "name": "_bundleCount", "nameLocation": "929:12:74", "nodeType": "VariableDeclaration", "scope": 5504, "src": "913:28:74", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4284, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "913:7:74", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "private" }, { "body": { "id": 4298, "nodeType": "Block", "src": "979:163:74", "statements": [ { "expression": { "arguments": [ { "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 4293, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "arguments": [], "expression": { "argumentTypes": [], "id": 4288, "name": "_msgSender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 24064, "src": "1010:10:74", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", "typeString": "function () view returns (address)" } }, "id": 4289, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1010:12:74", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "arguments": [ { "hexValue": "5269736b706f6f6c53657276696365", "id": 4291, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "1046:17:74", "typeDescriptions": { "typeIdentifier": "t_stringliteral_e85801e7370f8299b20de95f253b0d76ea9617d54202cf651cae4bfb65abf86a", "typeString": "literal_string \"RiskpoolService\"" }, "value": "RiskpoolService" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_stringliteral_e85801e7370f8299b20de95f253b0d76ea9617d54202cf651cae4bfb65abf86a", "typeString": "literal_string \"RiskpoolService\"" } ], "id": 4290, "name": "_getContractAddress", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 14923, "src": "1026:19:74", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", "typeString": "function (bytes32) view returns (address)" } }, "id": 4292, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1026:38:74", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "1010:54:74", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "hexValue": "4552524f523a4255432d3030313a4e4f545f5249534b504f4f4c5f53455256494345", "id": 4294, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "1078:36:74", "typeDescriptions": { "typeIdentifier": "t_stringliteral_476d7bdb29f083f2ebfc1b7face76d9f76a751b84204921dae4a5245b351756d", "typeString": "literal_string \"ERROR:BUC-001:NOT_RISKPOOL_SERVICE\"" }, "value": "ERROR:BUC-001:NOT_RISKPOOL_SERVICE" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_476d7bdb29f083f2ebfc1b7face76d9f76a751b84204921dae4a5245b351756d", "typeString": "literal_string \"ERROR:BUC-001:NOT_RISKPOOL_SERVICE\"" } ], "id": 4287, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "989:7:74", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 4295, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "989:135:74", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 4296, "nodeType": "ExpressionStatement", "src": "989:135:74" }, { "id": 4297, "nodeType": "PlaceholderStatement", "src": "1134:1:74" } ] }, "id": 4299, "name": "onlyRiskpoolService", "nameLocation": "957:19:74", "nodeType": "ModifierDefinition", "parameters": { "id": 4286, "nodeType": "ParameterList", "parameters": [], "src": "976:2:74" }, "src": "948:194:74", "virtual": false, "visibility": "internal" }, { "body": { "id": 4336, "nodeType": "Block", "src": "1194:331:74", "statements": [ { "assignments": [ 4305 ], "declarations": [ { "constant": false, "id": 4305, "mutability": "mutable", "name": "bundle", "nameLocation": "1219:6:74", "nodeType": "VariableDeclaration", "scope": 4336, "src": "1204:21:74", "stateVariable": false, "storageLocation": "storage", "typeDescriptions": { "typeIdentifier": "t_struct$_Bundle_$20407_storage_ptr", "typeString": "struct IBundle.Bundle" }, "typeName": { "id": 4304, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 4303, "name": "Bundle", "nodeType": "IdentifierPath", "referencedDeclaration": 20407, "src": "1204:6:74" }, "referencedDeclaration": 20407, "src": "1204:6:74", "typeDescriptions": { "typeIdentifier": "t_struct$_Bundle_$20407_storage_ptr", "typeString": "struct IBundle.Bundle" } }, "visibility": "internal" } ], "id": 4309, "initialValue": { "baseExpression": { "id": 4306, "name": "_bundles", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4269, "src": "1228:8:74", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Bundle_$20407_storage_$", "typeString": "mapping(uint256 => struct IBundle.Bundle storage ref)" } }, "id": 4308, "indexExpression": { "id": 4307, "name": "bundleId", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4301, "src": "1237:8:74", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "1228:18:74", "typeDescriptions": { "typeIdentifier": "t_struct$_Bundle_$20407_storage", "typeString": "struct IBundle.Bundle storage ref" } }, "nodeType": "VariableDeclarationStatement", "src": "1204:42:74" }, { "expression": { "arguments": [ { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 4314, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "expression": { "id": 4311, "name": "bundle", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4305, "src": "1264:6:74", "typeDescriptions": { "typeIdentifier": "t_struct$_Bundle_$20407_storage_ptr", "typeString": "struct IBundle.Bundle storage pointer" } }, "id": 4312, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "createdAt", "nodeType": "MemberAccess", "referencedDeclaration": 20404, "src": "1264:16:74", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": { "hexValue": "30", "id": 4313, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1283:1:74", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "1264:20:74", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "hexValue": "4552524f523a4255432d3030323a42554e444c455f444f45535f4e4f545f4558495354", "id": 4315, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "1286:37:74", "typeDescriptions": { "typeIdentifier": "t_stringliteral_4194f84ab3a903bd197fb67924a3a7daa9e6613ff1e3b7fc1fb4fffc1258eed5", "typeString": "literal_string \"ERROR:BUC-002:BUNDLE_DOES_NOT_EXIST\"" }, "value": "ERROR:BUC-002:BUNDLE_DOES_NOT_EXIST" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool"