UNPKG

@etherisc/gif-contracts

Version:

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

1,294 lines 761 kB
{ "abi": [ { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint8", "name": "version", "type": "uint8" } ], "name": "Initialized", "type": "event" }, { "inputs": [ { "internalType": "uint256", "name": "id", "type": "uint256" } ], "name": "archive", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "registry", "type": "address" } ], "name": "initialize", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "id", "type": "uint256" } ], "name": "pause", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "contract IComponent", "name": "component", "type": "address" } ], "name": "propose", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "id", "type": "uint256" } ], "name": "stake", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "id", "type": "uint256" } ], "name": "unpause", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "id", "type": "uint256" } ], "name": "withdraw", "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", "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", "75": "contracts/modules/ComponentController.sol", "82": "contracts/services/ComponentOwnerService.sol", "88": "contracts/shared/CoreController.sol" }, "ast": { "absolutePath": "contracts/services/ComponentOwnerService.sol", "exportedSymbols": { "Address": [ 26374 ], "BundleController": [ 5504 ], "BundleToken": [ 17246 ], "ComponentController": [ 6504 ], "ComponentOwnerService": [ 12348 ], "Context": [ 24074 ], "CoreController": [ 14924 ], "ERC165": [ 26079 ], "ERC721": [ 24987 ], "EnumerableSet": [ 19390 ], "IAccess": [ 21938 ], "IBundle": [ 20491 ], "IBundleToken": [ 24052 ], "IComponent": [ 22099 ], "IComponentEvents": [ 22419 ], "IComponentOwnerService": [ 23478 ], "IERC165": [ 27203 ], "IERC721": [ 23745 ], "IERC721Metadata": [ 27618 ], "IERC721Receiver": [ 27591 ], "IOracle": [ 22133 ], "IPolicy": [ 20837 ], "IPool": [ 21652 ], "IProduct": [ 21995 ], "IRegistry": [ 21750 ], "IRiskpool": [ 22366 ], "Initializable": [ 18432 ], "Ownable": [ 20950 ], "PolicyController": [ 8529 ], "PoolController": [ 9719 ], "Strings": [ 23075 ] }, "id": 12349, "license": "Apache-2.0", "nodeType": "SourceUnit", "nodes": [ { "id": 12129, "literals": [ "solidity", "0.8", ".2" ], "nodeType": "PragmaDirective", "src": "39:22:82" }, { "absolutePath": "contracts/modules/ComponentController.sol", "file": "../modules/ComponentController.sol", "id": 12130, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 12349, "sourceUnit": 6505, "src": "63:44:82", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "contracts/modules/PoolController.sol", "file": "../modules/PoolController.sol", "id": 12131, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 12349, "sourceUnit": 9720, "src": "246:39:82", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "contracts/shared/CoreController.sol", "file": "../shared/CoreController.sol", "id": 12132, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 12349, "sourceUnit": 14925, "src": "286:38:82", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IComponent.sol", "file": "@etherisc/gif-interface/contracts/components/IComponent.sol", "id": 12133, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 12349, "sourceUnit": 22100, "src": "326:69:82", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IComponentOwnerService.sol", "file": "@etherisc/gif-interface/contracts/services/IComponentOwnerService.sol", "id": 12134, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 12349, "sourceUnit": 23479, "src": "396:79:82", "symbolAliases": [], "unitAlias": "" }, { "abstract": false, "baseContracts": [ { "baseName": { "id": 12135, "name": "IComponentOwnerService", "nodeType": "IdentifierPath", "referencedDeclaration": 23478, "src": "516:22:82" }, "id": 12136, "nodeType": "InheritanceSpecifier", "src": "516:22:82" }, { "baseName": { "id": 12137, "name": "CoreController", "nodeType": "IdentifierPath", "referencedDeclaration": 14924, "src": "544:14:82" }, "id": 12138, "nodeType": "InheritanceSpecifier", "src": "544:14:82" } ], "contractDependencies": [ 14924, 18432, 23478, 24074 ], "contractKind": "contract", "fullyImplemented": true, "id": 12348, "linearizedBaseContracts": [ 12348, 14924, 18432, 24074, 23478 ], "name": "ComponentOwnerService", "nameLocation": "486:21:82", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 12141, "mutability": "mutable", "name": "_component", "nameLocation": "593:10:82", "nodeType": "VariableDeclaration", "scope": 12348, "src": "565:38:82", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_ComponentController_$6504", "typeString": "contract ComponentController" }, "typeName": { "id": 12140, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 12139, "name": "ComponentController", "nodeType": "IdentifierPath", "referencedDeclaration": 6504, "src": "565:19:82" }, "referencedDeclaration": 6504, "src": "565:19:82", "typeDescriptions": { "typeIdentifier": "t_contract$_ComponentController_$6504", "typeString": "contract ComponentController" } }, "visibility": "private" }, { "body": { "id": 12179, "nodeType": "Block", "src": "672:305:82", "statements": [ { "assignments": [ 12147 ], "declarations": [ { "constant": false, "id": 12147, "mutability": "mutable", "name": "owner", "nameLocation": "690:5:82", "nodeType": "VariableDeclaration", "scope": 12179, "src": "682:13:82", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 12146, "name": "address", "nodeType": "ElementaryTypeName", "src": "682:7:82", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" } ], "id": 12151, "initialValue": { "arguments": [], "expression": { "argumentTypes": [], "expression": { "id": 12148, "name": "component", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 12144, "src": "698:9:82", "typeDescriptions": { "typeIdentifier": "t_contract$_IComponent_$22099", "typeString": "contract IComponent" } }, "id": 12149, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "getOwner", "nodeType": "MemberAccess", "referencedDeclaration": 22053, "src": "698:18:82", "typeDescriptions": { "typeIdentifier": "t_function_external_view$__$returns$_t_address_$", "typeString": "function () view external returns (address)" } }, "id": 12150, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "698:20:82", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "VariableDeclarationStatement", "src": "682:36:82" }, { "assignments": [ 12153 ], "declarations": [ { "constant": false, "id": 12153, "mutability": "mutable", "name": "requiredRole", "nameLocation": "736:12:82", "nodeType": "VariableDeclaration", "scope": 12179, "src": "728:20:82", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 12152, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "728:7:82", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "visibility": "internal" } ], "id": 12160, "initialValue": { "arguments": [ { "arguments": [], "expression": { "argumentTypes": [], "expression": { "id": 12156, "name": "component", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 12144, "src": "778:9:82", "typeDescriptions": { "typeIdentifier": "t_contract$_IComponent_$22099", "typeString": "contract IComponent" } }, "id": 12157, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "getType", "nodeType": "MemberAccess", "referencedDeclaration": 22042, "src": "778:17:82", "typeDescriptions": { "typeIdentifier": "t_function_external_view$__$returns$_t_enum$_ComponentType_$22002_$", "typeString": "function () view external returns (enum IComponent.ComponentType)" } }, "id": 12158, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "778:19:82", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_enum$_ComponentType_$22002", "typeString": "enum IComponent.ComponentType" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_enum$_ComponentType_$22002", "typeString": "enum IComponent.ComponentType" } ], "expression": { "id": 12154, "name": "_component", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 12141, "src": "751:10:82", "typeDescriptions": { "typeIdentifier": "t_contract$_ComponentController_$6504", "typeString": "contract ComponentController" } }, "id": 12155, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "getRequiredRole", "nodeType": "MemberAccess", "referencedDeclaration": 6227, "src": "751:26:82", "typeDescriptions": { "typeIdentifier": "t_function_external_view$_t_enum$_ComponentType_$22002_$returns$_t_bytes32_$", "typeString": "function (enum IComponent.ComponentType) view external returns (bytes32)" } }, "id": 12159, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "751:47:82", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "nodeType": "VariableDeclarationStatement", "src": "728:70:82" }, { "expression": { "arguments": [ { "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 12165, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "arguments": [], "expression": { "argumentTypes": [], "id": 12162, "name": "_msgSender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 24064, "src": "816:10:82", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", "typeString": "function () view returns (address)" } }, "id": 12163, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "816:12:82", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "id": 12164, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 12147, "src": "832:5:82", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "816:21:82", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "hexValue": "4552524f523a434f532d3030313a4e4f545f4f574e4552", "id": 12166, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "839:25:82", "typeDescriptions": { "typeIdentifier": "t_stringliteral_465d2c87dcb0f9e507f01f9bd011e20013cefede3ead0fe8442c34503dee279a", "typeString": "literal_string \"ERROR:COS-001:NOT_OWNER\"" }, "value": "ERROR:COS-001:NOT_OWNER" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_465d2c87dcb0f9e507f01f9bd011e20013cefede3ead0fe8442c34503dee279a", "typeString": "literal_string \"ERROR:COS-001:NOT_OWNER\"" } ], "id": 12161, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "808:7:82", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 12167, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "808:57:82", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 12168, "nodeType": "ExpressionStatement", "src": "808:57:82" }, { "expression": { "arguments": [ { "arguments": [ { "id": 12172, "name": "requiredRole", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 12153, "src": "899:12:82", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, { "id": 12173, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 12147, "src": "913:5:82", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, { "typeIdentifier": "t_address", "typeString": "address" } ], "expression": { "id": 12170, "name": "_access", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 14804, "src": "883:7:82", "typeDescriptions": { "typeIdentifier": "t_contract$_IAccess_$21938", "typeString": "contract IAccess" } }, "id": 12171, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "hasRole", "nodeType": "MemberAccess", "referencedDeclaration": 21906, "src": "883:15:82", "typeDescriptions": { "typeIdentifier": "t_function_external_view$_t_bytes32_$_t_address_$returns$_t_bool_$", "typeString": "function (bytes32,address) view external returns (bool)" } }, "id": 12174, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "883:36:82", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "hexValue": "4552524f523a434f532d3030323a52455155495245445f524f4c455f4d495353494e47", "id": 12175, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "921:37:82", "typeDescriptions": { "typeIdentifier": "t_stringliteral_ba7f3dd1050d0760c96ec2016b668c5029825c4f0129279369d1f9706925f324", "typeString": "literal_string \"ERROR:COS-002:REQUIRED_ROLE_MISSING\"" }, "value": "ERROR:COS-002:REQUIRED_ROLE_MISSING" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_ba7f3dd1050d0760c96ec2016b668c5029825c4f0129279369d1f9706925f324", "typeString": "literal_string \"ERROR:COS-002:REQUIRED_ROLE_MISSING\"" } ], "id": 12169, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "875:7:82", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 12176, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "875:84:82", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 12177, "nodeType": "ExpressionStatement", "src": "875:84:82" }, { "id": 12178, "nodeType": "PlaceholderStatement", "src": "969:1:82" } ] }, "id": 12180, "name": "onlyOwnerWithRoleFromComponent", "nameLocation": "619:30:82", "nodeType": "ModifierDefinition", "parameters": { "id": 12145, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 12144, "mutability": "mutable", "name": "component", "nameLocation": "661:9:82", "nodeType": "VariableDeclaration", "scope": 12180, "src": "650:20:82", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_IComponent_$22099", "typeString": "contract IComponent" }, "typeName": { "id": 12143, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 12142, "name": "IComponent", "nodeType": "IdentifierPath", "referencedDeclaration": 22099, "src": "650:10:82" }, "referencedDeclaration": 22099, "src": "650:10:82", "typeDescriptions": { "typeIdentifier": "t_contract$_IComponent_$22099", "typeString": "contract IComponent" } }, "visibility": "internal" } ], "src": "649:22:82" }, "src": "610:367:82", "virtual": false, "visibility": "internal" }, { "body": { "id": 12238, "nodeType": "Block", "src": "1022:456:82", "statements": [ { "assignments": [ 12186 ], "declarations": [ { "constant": false, "id": 12186, "mutability": "mutable", "name": "component", "nameLocation": "1043:9:82", "nodeType": "VariableDeclaration", "scope": 12238, "src": "1032:20:82", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_IComponent_$22099", "typeString": "contract IComponent" }, "typeName": { "id": 12185, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 12184, "name": "IComponent", "nodeType": "IdentifierPath", "referencedDeclaration": 22099, "src": "1032:10:82" }, "referencedDeclaration": 22099, "src": "1032:10:82", "typeDescriptions": { "typeIdentifier": "t_contract$_IComponent_$22099", "typeString": "contract IComponent" } }, "visibility": "internal" } ], "id": 12191, "initialValue": { "arguments": [ { "id": 12189, "name": "id", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 12182, "src": "1079:2:82", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "id": 12187, "name": "_component", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 12141, "src": "1055:10:82", "typeDescriptions": { "typeIdentifier": "t_contract$_ComponentController_$6504", "typeString": "contract ComponentController" } }, "id": 12188, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "getComponent", "nodeType": "MemberAccess", "referencedDeclaration": 6047, "src": "1055:23:82", "typeDescriptions": { "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_contract$_IComponent_$22099_$", "typeString": "function (uint256) view external returns (contract IComponent)" } }, "id": 12190, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1055:27:82", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_contract$_IComponent_$22099", "typeString": "contract IComponent" } }, "nodeType": "VariableDeclarationStatement", "src": "1032:50:82" }, { "expression": { "arguments": [ { "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 12201, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "arguments": [ { "id": 12195, "name": "component", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 12186, "src": "1108:9:82", "typeDescriptions": { "typeIdentifier": "t_contract$_IComponent_$22099", "typeString": "contract IComponent" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_contract$_IComponent_$22099", "typeString": "contract IComponent" } ], "id": 12194, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "1100:7:82", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { "id": 12193, "name": "address", "nodeType": "ElementaryTypeName", "src": "1100:7:82", "typeDescriptions": {} } }, "id": 12196, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1100:18:82", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { "arguments": [ { "hexValue": "30", "id": 12199, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1130:1:82", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" } ], "id": 12198, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "1122:7:82", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { "id": 12197, "name": "address", "nodeType": "ElementaryTypeName", "src": "1122:7:82", "typeDescriptions": {} } }, "id": 12200, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1122:10:82", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "1100:32:82", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "hexValue": "4552524f523a434f532d3030333a434f4d504f4e454e545f49445f494e56414c4944", "id": 12202, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "1134:36:82", "typeDescriptions": { "typeIdentifier": "t_stringliteral_dd56e2e72358a9edc326877a1e38d84909493861f3901cf215f515edfe95f5df", "typeString": "literal_string \"ERROR:COS-003:COMPONENT_ID_INVALID\"" }, "value": "ERROR:COS-003:COMPONENT_ID_INVALID" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_dd56e2e72358a9edc326877a1e38d84909493861f3901cf215f515edfe95f5df", "typeString": "literal_string \"ERROR:COS-003:COMPONENT_ID_INVALID\"" } ], "id": 12192, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "1092:7:82", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 12203, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1092:79:82", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 12204, "nodeType": "ExpressionStatement", "src": "1092:79:82" }, { "assignments": [ 12206 ], "declarations": [ { "constant": false, "id": 12206, "mutability": "mutable", "name": "owner", "nameLocation": "1190:5:82", "nodeType": "VariableDeclaration", "scope": 12238, "src": "1182:13:82", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 12205, "name": "address", "nodeType": "ElementaryTypeName", "src": "1182:7:82", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" } ], "id": 12210, "initialValue": { "arguments": [], "expression": { "argumentTypes": [], "expression": { "id": 12207, "name": "component", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 12186, "src": "1198:9:82", "typeDescriptions": { "typeIdentifier": "t_contract$_IComponent_$22099", "typeString": "contract IComponent" } }, "id": 12208, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "getOwner", "nodeType": "MemberAccess", "referencedDeclaration": 22053, "src": "1198:18:82", "typeDescriptions": { "typeIdentifier": "t_function_external_view$__$returns$_t_address_$", "typeS