UNPKG

@etherisc/terraguard-poc-contracts

Version:

Etherisc's smart contracts for the terraguard poc

1,530 lines 325 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": "componentId", "type": "uint256" } ], "name": "LogProductApproved", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "productAddress", "type": "address" } ], "name": "LogProductCreated", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "componentId", "type": "uint256" } ], "name": "LogProductDeclined", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "componentId", "type": "uint256" } ], "name": "LogProductProposed", "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": "approvalCallback", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "archiveCallback", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "declineCallback", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "getApplicationDataStructure", "outputs": [ { "internalType": "string", "name": "dataStructure", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getClaimDataStructure", "outputs": [ { "internalType": "string", "name": "dataStructure", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getId", "outputs": [ { "internalType": "uint256", "name": "", "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": "getPayoutDataStructure", "outputs": [ { "internalType": "string", "name": "dataStructure", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getPolicyFlow", "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": "getRiskpoolId", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getState", "outputs": [ { "internalType": "enum IComponent.ComponentState", "name": "", "type": "uint8" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getToken", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getType", "outputs": [ { "internalType": "enum IComponent.ComponentType", "name": "", "type": "uint8" } ], "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": [], "name": "owner", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "pauseCallback", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "proposalCallback", "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": "capacity", "type": "uint256" } ], "name": "riskPoolCapacityCallback", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "id", "type": "uint256" } ], "name": "setId", "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": [], "name": "unpauseCallback", "outputs": [], "stateMutability": "nonpayable", "type": "function" } ], "allSourcePaths": { "0": "/home/runner/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/access/Ownable.sol", "11": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IProduct.sol", "14": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/Product.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/Product.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 ], "IProduct": [ 5319 ], "IProductService": [ 5813 ], "IRegistry": [ 7009 ], "IRiskpoolService": [ 7417 ], "ITreasury": [ 2409 ], "Ownable": [ 6795 ], "Product": [ 3139 ] }, "id": 3140, "license": "Apache-2.0", "nodeType": "SourceUnit", "nodes": [ { "id": 2513, "literals": [ "solidity", "0.8", ".2" ], "nodeType": "PragmaDirective", "src": "39:22:14" }, { "absolutePath": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IProduct.sol", "file": "./IProduct.sol", "id": 2514, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 3140, "sourceUnit": 5320, "src": "63:24:14", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/Component.sol", "file": "./Component.sol", "id": 2515, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 3140, "sourceUnit": 5115, "src": "88:25:14", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IPolicy.sol", "file": "../modules/IPolicy.sol", "id": 2516, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 3140, "sourceUnit": 3959, "src": "114:32:14", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IInstanceService.sol", "file": "../services/IInstanceService.sol", "id": 2517, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 3140, "sourceUnit": 5669, "src": "147:42:14", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IProductService.sol", "file": "../services/IProductService.sol", "id": 2518, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 3140, "sourceUnit": 5814, "src": "190:41:14", "symbolAliases": [], "unitAlias": "" }, { "abstract": true, "baseContracts": [ { "baseName": { "id": 2519, "name": "IProduct", "nodeType": "IdentifierPath", "referencedDeclaration": 5319, "src": "266:8:14" }, "id": 2520, "nodeType": "InheritanceSpecifier", "src": "266:8:14" }, { "baseName": { "id": 2521, "name": "Component", "nodeType": "IdentifierPath", "referencedDeclaration": 5114, "src": "281:9:14" }, "id": 2522, "nodeType": "InheritanceSpecifier", "src": "281:9:14" } ], "contractDependencies": [ 5114, 5218, 5319, 6682, 6795, 6911 ], "contractKind": "contract", "fullyImplemented": true, "id": 3139, "linearizedBaseContracts": [ 3139, 5114, 6795, 6682, 6911, 5319, 5218 ], "name": "Product", "nameLocation": "251:7:14", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 2524, "mutability": "mutable", "name": "_policyFlow", "nameLocation": "318:11:14", "nodeType": "VariableDeclaration", "scope": 3139, "src": "302:27:14", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2523, "name": "address", "nodeType": "ElementaryTypeName", "src": "302:7:14", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "private" }, { "constant": false, "id": 2526, "mutability": "mutable", "name": "_token", "nameLocation": "398:6:14", "nodeType": "VariableDeclaration", "scope": 3139, "src": "382:22:14", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2525, "name": "address", "nodeType": "ElementaryTypeName", "src": "382:7:14", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "private" }, { "constant": false, "id": 2528, "mutability": "mutable", "name": "_riskpoolId", "nameLocation": "465:11:14", "nodeType": "VariableDeclaration", "scope": 3139, "src": "449:27:14", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 2527, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "449:7:14", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "private" }, { "constant": false, "id": 2531, "mutability": "mutable", "name": "_productService", "nameLocation": "555:15:14", "nodeType": "VariableDeclaration", "scope": 3139, "src": "530:40:14", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_IProductService_$5813", "typeString": "contract IProductService" }, "typeName": { "id": 2530, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 2529, "name": "IProductService", "nodeType": "IdentifierPath", "referencedDeclaration": 5813, "src": "530:15:14" }, "referencedDeclaration": 5813, "src": "530:15:14", "typeDescriptions": { "typeIdentifier": "t_contract$_IProductService_$5813", "typeString": "contract IProductService" } }, "visibility": "internal" }, { "constant": false, "id": 2534, "mutability": "mutable", "name": "_instanceService", "nameLocation": "602:16:14", "nodeType": "VariableDeclaration", "scope": 3139, "src": "576:42:14", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_IInstanceService_$5668", "typeString": "contract IInstanceService" }, "typeName": { "id": 2533, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 2532, "name": "IInstanceService", "nodeType": "IdentifierPath", "referencedDeclaration": 5668, "src": "576:16:14" }, "referencedDeclaration": 5668, "src": "576:16:14", "typeDescriptions": { "typeIdentifier": "t_contract$_IInstanceService_$5668", "typeString": "contract IInstanceService" } }, "visibility": "internal" }, { "body": { "id": 2555, "nodeType": "Block", "src": "669:219:14", "statements": [ { "assignments": [ 2539 ], "declarations": [ { "constant": false, "id": 2539, "mutability": "mutable", "name": "policyHolder", "nameLocation": "687:12:14", "nodeType": "VariableDeclaration", "scope": 2555, "src": "679:20:14", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2538, "name": "address", "nodeType": "ElementaryTypeName", "src": "679:7:14", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" } ], "id": 2545, "initialValue": { "expression": { "arguments": [ { "id": 2542, "name": "policyId", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2536, "src": "731:8:14", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } ], "expression": { "id": 2540, "name": "_instanceService", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2534, "src": "702:16:14", "typeDescriptions": { "typeIdentifier": "t_contract$_IInstanceService_$5668", "typeString": "contract IInstanceService" } }, "id": 2541, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "getMetadata", "nodeType": "MemberAccess", "referencedDeclaration": 5587, "src": "702:28:14", "typeDescriptions": { "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_struct$_Metadata_$3773_memory_ptr_$", "typeString": "function (bytes32) view external returns (struct IPolicy.Metadata memory)" } }, "id": 2543, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "702:38:14", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_struct$_Metadata_$3773_memory_ptr", "typeString": "struct IPolicy.Metadata memory" } }, "id": 2544, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "owner", "nodeType": "MemberAccess", "referencedDeclaration": 3761, "src": "702:44:14", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "VariableDeclarationStatement", "src": "679:67:14" }, { "expression": { "arguments": [ { "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 2550, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "arguments": [], "expression": { "argumentTypes": [], "id": 2547, "name": "_msgSender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6672, "src": "777:10:14", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", "typeString": "function () view returns (address)" } }, "id": 2548, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "777:12:14", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "id": 2549, "name": "policyHolder", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2539, "src": "793:12:14", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "777:28:14", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "hexValue": "4552524f523a5052442d3030313a504f4c4943595f4f525f484f4c4445525f494e56414c4944", "id": 2551, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "820:40:14", "typeDescriptions": { "typeIdentifier": "t_stringliteral_8c751e03794b568011bdacc7506cfc24e9e6da1a04bd63102218013a02fcc8b2", "typeString": "literal_string \"ERROR:PRD-001:POLICY_OR_HOLDER_INVALID\"" }, "value": "ERROR:PRD-001:POLICY_OR_HOLDER_INVALID" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_8c751e03794b568011bdacc7506cfc24e9e6da1a04bd63102218013a02fcc8b2", "typeString": "literal_string \"ERROR:PRD-001:POLICY_OR_HOLDER_INVALID\"" } ], "id": 2546, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "756:7:14", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 2552, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "756:114:14", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 2553, "nodeType": "ExpressionStatement", "src": "756:114:14" }, { "id": 2554, "nodeType": "PlaceholderStatement", "src": "880:1:14" } ] }, "id": 2556, "name": "onlyPolicyHolder", "nameLocation": "634:16:14", "nodeType": "ModifierDefinition", "parameters": { "id": 2537, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2536, "mutability": "mutable", "name": "policyId", "nameLocation": "659:8:14", "nodeType": "VariableDeclaration", "scope": 2556, "src": "651:16:14", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 2535, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "651:7:14", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "visibility": "internal" } ], "src": "650:18:14" }, "src": "625:263:14", "virtual": false, "visibility": "internal" }, { "body": { "id": 2569, "nodeType": "Block", "src": "915:149:14", "statements": [ { "expression": { "arguments": [ { "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 2564, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "arguments": [], "expression": { "argumentTypes": [], "id": 2559, "name": "_msgSender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6672, "src": "947:10:14", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", "typeString": "function () view returns (address)" } }, "id": 2560, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "947:12:14", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "arguments": [ { "hexValue": "4c6963656e6365", "id": 2562, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "983:9:14", "typeDescriptions": { "typeIdentifier": "t_stringliteral_6ca2c06beb422d975cd2070710bcde13ae6539489c77a2eac3d019f18f8a11bd", "typeString": "literal_string \"Licence\"" }, "value": "Licence" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_stringliteral_6ca2c06beb422d975cd2070710bcde13ae6539489c77a2eac3d019f18f8a11bd", "typeString": "literal_string \"Licence\"" } ], "id": 2561, "name": "_getContractAddress", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5113, "src": "963:19:14", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", "typeString": "function (bytes32) view returns (address)" } }, "id": 2563, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "963:30:14", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "947:46:14", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "hexValue": "4552524f523a5052442d3030323a4143434553535f44454e494544", "id": 2565, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "1007:29:14", "typeDescriptions": { "typeIdentifier": "t_stringliteral_c303e58a1c0410c1101cc429b23d15274514a5237e202175e3c0976550224f8a", "typeString": "literal_string \"ERROR:PRD-002:ACCESS_DENIED\"" }, "value": "ERROR:PRD-002:ACCESS_DENIED" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_c303e58a1c0410c1101cc429b23d15274514a5237e202175e3c0976550224f8a", "typeString": "literal_string \"ERROR:PRD-002:ACCESS_DENIED\"" } ], "id": 2558, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "925:7:14", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 2566, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "925:121:14", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 2567, "nodeType": "ExpressionStatement", "src": "925:121:14" }, { "id": 2568, "nodeType": "PlaceholderStatement", "src": "1056:1:14" } ] }, "id": 2570, "name": "onlyLicence", "nameLocation": "903:11:14", "nodeType": "ModifierDefinition", "parameters": { "id": 2557, "nodeType": "ParameterList", "parameters": [], "src": "915:0:14" }, "src": "894:170:14", "virtual": false, "visibility": "internal" }, { "body": { "id": 2583, "nodeType": "Block", "src": "1090:147:14", "statements": [ { "expression": { "arguments": [ { "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 2578, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "arguments": [], "expression": { "argumentTypes": [], "id": 2573, "name": "_msgSender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6672, "src": "1122:10:14", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", "typeString": "function () view returns (address)" } }, "id": 2574, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1122:12:14", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "arguments": [ { "hexValue": "5175657279", "id": 2576, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "1158:7:14", "typeDescriptions": { "typeIdentifier": "t_stringliteral_de27146501ae3a78760bc5f3cf670e34e42f94d4009fee9f620352506ade7ceb", "typeString": "literal_string \"Query\"" }, "value": "Query" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_stringliteral_de27146501ae3a78760bc5f3cf670e34e42f94d4009fee9f620352506ade7ceb", "typeString": "literal_string \"Query\"" } ], "id": 2575, "name": "_getContractAddress", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5113, "src": "1138:19:14", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", "typeString": "function (bytes32) view returns (address)" } }, "id": 2577, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1138:28:14", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "1122:44:14", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "hexValue": "4552524f523a