UNPKG

@etherisc/gif-contracts

Version:

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

1,303 lines (1,302 loc) 205 kB
{ "abi": [ { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint8", "name": "version", "type": "uint8" } ], "name": "Initialized", "type": "event" }, { "inputs": [ { "internalType": "address", "name": "productAddress", "type": "address" } ], "name": "getAuthorizationStatus", "outputs": [ { "internalType": "uint256", "name": "productId", "type": "uint256" }, { "internalType": "bool", "name": "isAuthorized", "type": "bool" }, { "internalType": "address", "name": "policyFlow", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "registry", "type": "address" } ], "name": "initialize", "outputs": [], "stateMutability": "nonpayable", "type": "function" } ], "allSourcePaths": { "10": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/proxy/utils/Initializable.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", "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", "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", "40": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/ILicense.sol", "44": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IRegistry.sol", "75": "contracts/modules/ComponentController.sol", "76": "contracts/modules/LicenseController.sol", "88": "contracts/shared/CoreController.sol" }, "ast": { "absolutePath": "contracts/modules/LicenseController.sol", "exportedSymbols": { "Address": [ 26374 ], "ComponentController": [ 6504 ], "Context": [ 24074 ], "CoreController": [ 14924 ], "EnumerableSet": [ 19390 ], "IAccess": [ 21938 ], "IBundle": [ 20491 ], "IComponent": [ 22099 ], "IComponentEvents": [ 22419 ], "ILicense": [ 22433 ], "IOracle": [ 22133 ], "IPolicy": [ 20837 ], "IProduct": [ 21995 ], "IRegistry": [ 21750 ], "IRiskpool": [ 22366 ], "Initializable": [ 18432 ], "LicenseController": [ 6618 ] }, "id": 6619, "license": "Apache-2.0", "nodeType": "SourceUnit", "nodes": [ { "id": 6506, "literals": [ "solidity", "0.8", ".2" ], "nodeType": "PragmaDirective", "src": "39:22:76" }, { "absolutePath": "contracts/modules/ComponentController.sol", "file": "./ComponentController.sol", "id": 6507, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 6619, "sourceUnit": 6505, "src": "63:35:76", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "contracts/shared/CoreController.sol", "file": "../shared/CoreController.sol", "id": 6508, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 6619, "sourceUnit": 14925, "src": "99:38:76", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IComponent.sol", "file": "@etherisc/gif-interface/contracts/components/IComponent.sol", "id": 6509, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 6619, "sourceUnit": 22100, "src": "139:69:76", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IProduct.sol", "file": "@etherisc/gif-interface/contracts/components/IProduct.sol", "id": 6510, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 6619, "sourceUnit": 21996, "src": "209:67:76", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/ILicense.sol", "file": "@etherisc/gif-interface/contracts/modules/ILicense.sol", "id": 6511, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 6619, "sourceUnit": 22434, "src": "277:64:76", "symbolAliases": [], "unitAlias": "" }, { "abstract": false, "baseContracts": [ { "baseName": { "id": 6512, "name": "ILicense", "nodeType": "IdentifierPath", "referencedDeclaration": 22433, "src": "378:8:76" }, "id": 6513, "nodeType": "InheritanceSpecifier", "src": "378:8:76" }, { "baseName": { "id": 6514, "name": "CoreController", "nodeType": "IdentifierPath", "referencedDeclaration": 14924, "src": "393:14:76" }, "id": 6515, "nodeType": "InheritanceSpecifier", "src": "393:14:76" } ], "contractDependencies": [ 14924, 18432, 22433, 24074 ], "contractKind": "contract", "fullyImplemented": true, "id": 6618, "linearizedBaseContracts": [ 6618, 14924, 18432, 24074, 22433 ], "name": "LicenseController", "nameLocation": "353:17:76", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 6518, "mutability": "mutable", "name": "_component", "nameLocation": "443:10:76", "nodeType": "VariableDeclaration", "scope": 6618, "src": "415:38:76", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_ComponentController_$6504", "typeString": "contract ComponentController" }, "typeName": { "id": 6517, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 6516, "name": "ComponentController", "nodeType": "IdentifierPath", "referencedDeclaration": 6504, "src": "415:19:76" }, "referencedDeclaration": 6504, "src": "415:19:76", "typeDescriptions": { "typeIdentifier": "t_contract$_ComponentController_$6504", "typeString": "contract ComponentController" } }, "visibility": "private" }, { "baseFunctions": [ 14898 ], "body": { "id": 6532, "nodeType": "Block", "src": "523:83:76", "statements": [ { "expression": { "id": 6530, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "id": 6524, "name": "_component", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6518, "src": "533:10:76", "typeDescriptions": { "typeIdentifier": "t_contract$_ComponentController_$6504", "typeString": "contract ComponentController" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "arguments": [ { "arguments": [ { "hexValue": "436f6d706f6e656e74", "id": 6527, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "586:11:76", "typeDescriptions": { "typeIdentifier": "t_stringliteral_20422c9fb475bf3099f246b9754fae871c7ccc7264ca39a5be99fea0688ffe24", "typeString": "literal_string \"Component\"" }, "value": "Component" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_stringliteral_20422c9fb475bf3099f246b9754fae871c7ccc7264ca39a5be99fea0688ffe24", "typeString": "literal_string \"Component\"" } ], "id": 6526, "name": "_getContractAddress", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 14923, "src": "566:19:76", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", "typeString": "function (bytes32) view returns (address)" } }, "id": 6528, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "566:32:76", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 6525, "name": "ComponentController", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6504, "src": "546:19:76", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_ComponentController_$6504_$", "typeString": "type(contract ComponentController)" } }, "id": 6529, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "546:53:76", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_ComponentController_$6504", "typeString": "contract ComponentController" } }, "src": "533:66:76", "typeDescriptions": { "typeIdentifier": "t_contract$_ComponentController_$6504", "typeString": "contract ComponentController" } }, "id": 6531, "nodeType": "ExpressionStatement", "src": "533:66:76" } ] }, "id": 6533, "implemented": true, "kind": "function", "modifiers": [ { "id": 6522, "modifierName": { "id": 6521, "name": "onlyInitializing", "nodeType": "IdentifierPath", "referencedDeclaration": 18395, "src": "506:16:76" }, "nodeType": "ModifierInvocation", "src": "506:16:76" } ], "name": "_afterInitialize", "nameLocation": "469:16:76", "nodeType": "FunctionDefinition", "overrides": { "id": 6520, "nodeType": "OverrideSpecifier", "overrides": [], "src": "497:8:76" }, "parameters": { "id": 6519, "nodeType": "ParameterList", "parameters": [], "src": "485:2:76" }, "returnParameters": { "id": 6523, "nodeType": "ParameterList", "parameters": [], "src": "523:0:76" }, "scope": 6618, "src": "460:146:76", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal" }, { "baseFunctions": [ 22432 ], "body": { "id": 6565, "nodeType": "Block", "src": "852:176:76", "statements": [ { "expression": { "id": 6550, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "id": 6545, "name": "productId", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6539, "src": "862:9:76", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "arguments": [ { "id": 6548, "name": "productAddress", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6535, "src": "900:14:76", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "expression": { "id": 6546, "name": "_component", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6518, "src": "874:10:76", "typeDescriptions": { "typeIdentifier": "t_contract$_ComponentController_$6504", "typeString": "contract ComponentController" } }, "id": 6547, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "getComponentId", "nodeType": "MemberAccess", "referencedDeclaration": 6078, "src": "874:25:76", "typeDescriptions": { "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)" } }, "id": 6549, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "874:41:76", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "862:53:76", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 6551, "nodeType": "ExpressionStatement", "src": "862:53:76" }, { "expression": { "id": 6556, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "id": 6552, "name": "isAuthorized", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6541, "src": "925:12:76", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "arguments": [ { "id": 6554, "name": "productId", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6539, "src": "953:9:76", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 6553, "name": "_isValidCall", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6583, "src": "940:12:76", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bool_$", "typeString": "function (uint256) view returns (bool)" } }, "id": 6555, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "940:23:76", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "src": "925:38:76", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 6557, "nodeType": "ExpressionStatement", "src": "925:38:76" }, { "expression": { "id": 6563, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "id": 6558, "name": "policyFlow", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6543, "src": "973:10:76", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "arguments": [ { "id": 6561, "name": "productId", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6539, "src": "1011:9:76", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "id": 6559, "name": "_component", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6518, "src": "986:10:76", "typeDescriptions": { "typeIdentifier": "t_contract$_ComponentController_$6504", "typeString": "contract ComponentController" } }, "id": 6560, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "getPolicyFlow", "nodeType": "MemberAccess", "referencedDeclaration": 6331, "src": "986:24:76", "typeDescriptions": { "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", "typeString": "function (uint256) view external returns (address)" } }, "id": 6562, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "986:35:76", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "973:48:76", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 6564, "nodeType": "ExpressionStatement", "src": "973:48:76" } ] }, "functionSelector": "d3e9c314", "id": 6566, "implemented": true, "kind": "function", "modifiers": [], "name": "getAuthorizationStatus", "nameLocation": "689:22:76", "nodeType": "FunctionDefinition", "overrides": { "id": 6537, "nodeType": "OverrideSpecifier", "overrides": [], "src": "751:8:76" }, "parameters": { "id": 6536, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 6535, "mutability": "mutable", "name": "productAddress", "nameLocation": "720:14:76", "nodeType": "VariableDeclaration", "scope": 6566, "src": "712:22:76", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 6534, "name": "address", "nodeType": "ElementaryTypeName", "src": "712:7:76", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" } ], "src": "711:24:76" }, "returnParameters": { "id": 6544, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 6539, "mutability": "mutable", "name": "productId", "nameLocation": "798:9:76", "nodeType": "VariableDeclaration", "scope": 6566, "src": "790:17:76", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 6538, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "790:7:76", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" }, { "constant": false, "id": 6541, "mutability": "mutable", "name": "isAuthorized", "nameLocation": "814:12:76", "nodeType": "VariableDeclaration", "scope": 6566, "src": "809:17:76", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 6540, "name": "bool", "nodeType": "ElementaryTypeName", "src": "809:4:76", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "visibility": "internal" }, { "constant": false, "id": 6543, "mutability": "mutable", "name": "policyFlow", "nameLocation": "836:10:76", "nodeType": "VariableDeclaration", "scope": 6566, "src": "828:18:76", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 6542, "name": "address", "nodeType": "ElementaryTypeName", "src": "828:7:76", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" } ], "src": "789:58:76" }, "scope": 6618, "src": "680:348:76", "stateMutability": "view", "virtual": false, "visibility": "public" }, { "body": { "id": 6582, "nodeType": "Block", "src": "1104:99:76", "statements": [ { "expression": { "commonType": { "typeIdentifier": "t_enum$_ComponentState_$22010", "typeString": "enum IComponent.ComponentState" }, "id": 6580, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "arguments": [ { "id": 6575, "name": "productId", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6568, "src": "1150:9:76", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "id": 6573, "name": "_component", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6518, "src": "1121:10:76", "typeDescriptions": { "typeIdentifier": "t_contract$_ComponentController_$6504", "typeString": "contract ComponentController" } }, "id": 6574, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "getComponentState", "nodeType": "MemberAccess", "referencedDeclaration": 6138, "src": "1121:28:76", "typeDescriptions": { "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_enum$_ComponentState_$22010_$", "typeString": "function (uint256) view external returns (enum IComponent.ComponentState)" } }, "id": 6576, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1121:39:76", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_enum$_ComponentState_$22010", "typeString": "enum IComponent.ComponentState" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "expression": { "expression": { "id": 6577, "name": "IComponent", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 22099, "src": "1164:10:76", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IComponent_$22099_$", "typeString": "type(contract IComponent)" } }, "id": 6578, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "ComponentState", "nodeType": "MemberAccess", "referencedDeclaration": 22010, "src": "1164:25:76", "typeDescriptions": { "typeIdentifier": "t_type$_t_enum$_ComponentState_$22010_$", "typeString": "type(enum IComponent.ComponentState)" } }, "id": 6579, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberName": "Active", "nodeType": "MemberAccess", "referencedDeclaration": 22006, "src": "1164:32:76", "typeDescriptions": { "typeIdentifier": "t_enum$_ComponentState_$22010", "typeString": "enum IComponent.ComponentState" } }, "src": "1121:75:76", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "functionReturnParameters": 6572, "id": 6581, "nodeType": "Return", "src": "1114:82:76" } ] }, "id": 6583, "implemented": true, "kind": "function", "modifiers": [], "name": "_isValidCall", "nameLocation": "1043:12:76", "nodeType": "FunctionDefinition", "parameters": { "id": 6569, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 6568, "mutability": "mutable", "name": "productId", "nameLocation": "1064:9:76", "nodeType": "VariableDeclaration", "scope": 6583, "src": "1056:17:76", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 6567, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1056:7:76", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "src": "1055:19:76" }, "returnParameters": { "id": 6572, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 6571, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 6583, "src": "1098:4:76", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 6570, "name": "bool", "nodeType": "ElementaryTypeName", "src": "1098:4:76", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "visibility": "internal" } ], "src": "1097:6:76" }, "scope": 6618, "src": "1034:169:76", "stateMutability": "view", "virtual": false, "visibility": "internal" }, { "body": { "id": 6616, "nodeType": "Block", "src": "1283:185:76", "statements": [ { "expression": { "arguments": [ { "arguments": [ { "id": 6594, "name": "id", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6585, "src": "1322:2:76", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "id": 6592, "name": "_component", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6518, "src": "1301:10:76", "typeDescriptions": { "typeIdentifier": "t_contract$_ComponentController_$6504", "typeString": "contract ComponentController" } }, "id": 6593, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "isProduct", "nodeType": "MemberAccess", "referencedDeclaration": 6282, "src": "1301:20:76", "typeDescriptions": { "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_bool_$", "typeString": "function (uint256) view external returns (bool)" } }, "id": 6595, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1301:24:76", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "hexValue": "4552524f523a4c49432d3030313a434f4d504f4e454e545f4e4f545f50524f44554354", "id": 6596, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "1327:37:76", "typeDescriptions": { "typeIdentifier": "t_stringliteral_d2cc379ca4dad5e4640f7ad3a46170e466c44d14c7ce6c2707834b40eaceccca", "typeString": "literal_string \"ERROR:LIC-001:COMPONENT_NOT_PRODUCT\"" }, "value": "ERROR:LIC-001:COMPONENT_NOT_PRODUCT" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_d2cc379ca4dad5e4640f7ad3a46170e466c44d14c7ce6c2707834b40eaceccca", "typeString": "literal_string \"ERROR:LIC-001:COMPONENT_NOT_PRODUCT\"" } ], "id": 6591, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "1293:7:76", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 6597, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1293:72:76", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 6598, "nodeType": "ExpressionStatement", "src": "1293:72:76" }, { "assignments": [ 6601 ], "declarations": [ { "constant": false, "id": 6601, "mutability": "mutable", "name": "cmp", "nameLocation": "1386:3:76", "nodeType": "VariableDeclaration", "scope": 6616, "src": "1375:14:76", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_IComponent_$22099", "typeString": "contract IComponent" }, "typeName": { "id": 6600, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 6599, "name": "IComponent", "nodeType": "IdentifierPath", "referencedDeclaration": 22099, "src": "1375:10:76" }, "referencedDeclaration": 22099, "src": "1375:10:76", "typeDescriptions": { "typeIdentifier": "t_contract$_IComponent_$22099", "typeString": "contract IComponent" } }, "visibility": "internal" } ], "id": 6606, "initialValue": { "arguments": [ { "id": 6604, "name": "id", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6585, "src": "1416:2:76", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "id": 6602, "name": "_component", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6518, "src": "1392:10:76", "typeDescriptions": {