UNPKG

@etherisc/terraguard-poc-contracts

Version:

Etherisc's smart contracts for the terraguard poc

1,461 lines (1,460 loc) 195 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": 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": "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": "getRegistry", "outputs": [ { "internalType": "contract IRegistry", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getState", "outputs": [ { "internalType": "enum IComponent.ComponentState", "name": "", "type": "uint8" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "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": "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", "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/Component.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 ], "IProductService": [ 5813 ], "IRegistry": [ 7009 ], "IRiskpoolService": [ 7417 ], "ITreasury": [ 2409 ], "Ownable": [ 6795 ] }, "id": 5115, "license": "Apache-2.0", "nodeType": "SourceUnit", "nodes": [ { "id": 4696, "literals": [ "solidity", "0.8", ".2" ], "nodeType": "PragmaDirective", "src": "40:22:8" }, { "absolutePath": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IComponent.sol", "file": "./IComponent.sol", "id": 4697, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 5115, "sourceUnit": 5219, "src": "66:26:8", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IAccess.sol", "file": "../modules/IAccess.sol", "id": 4698, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 5115, "sourceUnit": 6859, "src": "94:32:8", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IComponentEvents.sol", "file": "../modules/IComponentEvents.sol", "id": 4699, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 5115, "sourceUnit": 6912, "src": "128:41:8", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IRegistry.sol", "file": "../modules/IRegistry.sol", "id": 4700, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 5115, "sourceUnit": 7010, "src": "171:34:8", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IComponentOwnerService.sol", "file": "../services/IComponentOwnerService.sol", "id": 4701, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 5115, "sourceUnit": 7045, "src": "207:48:8", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/services/IInstanceService.sol", "file": "../services/IInstanceService.sol", "id": 4702, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 5115, "sourceUnit": 5669, "src": "257:42:8", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/home/runner/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/access/Ownable.sol", "file": "@openzeppelin/contracts/access/Ownable.sol", "id": 4703, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 5115, "sourceUnit": 6796, "src": "301:52:8", "symbolAliases": [], "unitAlias": "" }, { "abstract": true, "baseContracts": [ { "baseName": { "id": 4704, "name": "IComponent", "nodeType": "IdentifierPath", "referencedDeclaration": 5218, "src": "498:10:8" }, "id": 4705, "nodeType": "InheritanceSpecifier", "src": "498:10:8" }, { "baseName": { "id": 4706, "name": "IComponentEvents", "nodeType": "IdentifierPath", "referencedDeclaration": 6911, "src": "515:16:8" }, "id": 4707, "nodeType": "InheritanceSpecifier", "src": "515:16:8" }, { "baseName": { "id": 4708, "name": "Ownable", "nodeType": "IdentifierPath", "referencedDeclaration": 6795, "src": "538:7:8" }, "id": 4709, "nodeType": "InheritanceSpecifier", "src": "538:7:8" } ], "contractDependencies": [ 5218, 6682, 6795, 6911 ], "contractKind": "contract", "fullyImplemented": true, "id": 5114, "linearizedBaseContracts": [ 5114, 6795, 6682, 6911, 5218 ], "name": "Component", "nameLocation": "479:9:8", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 4711, "mutability": "mutable", "name": "_componentName", "nameLocation": "571:14:8", "nodeType": "VariableDeclaration", "scope": 5114, "src": "555:30:8", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 4710, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "555:7:8", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "visibility": "private" }, { "constant": false, "id": 4713, "mutability": "mutable", "name": "_componentId", "nameLocation": "608:12:8", "nodeType": "VariableDeclaration", "scope": 5114, "src": "592:28:8", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4712, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "592:7:8", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "private" }, { "constant": false, "id": 4716, "mutability": "mutable", "name": "_componentType", "nameLocation": "660:14:8", "nodeType": "VariableDeclaration", "scope": 5114, "src": "627:47:8", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_enum$_ComponentType_$5121", "typeString": "enum IComponent.ComponentType" }, "typeName": { "id": 4715, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 4714, "name": "IComponent.ComponentType", "nodeType": "IdentifierPath", "referencedDeclaration": 5121, "src": "627:24:8" }, "referencedDeclaration": 5121, "src": "627:24:8", "typeDescriptions": { "typeIdentifier": "t_enum$_ComponentType_$5121", "typeString": "enum IComponent.ComponentType" } }, "visibility": "private" }, { "constant": false, "id": 4719, "mutability": "mutable", "name": "_registry", "nameLocation": "701:9:8", "nodeType": "VariableDeclaration", "scope": 5114, "src": "683:27:8", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_IRegistry_$7009", "typeString": "contract IRegistry" }, "typeName": { "id": 4718, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 4717, "name": "IRegistry", "nodeType": "IdentifierPath", "referencedDeclaration": 7009, "src": "683:9:8" }, "referencedDeclaration": 7009, "src": "683:9:8", "typeDescriptions": { "typeIdentifier": "t_contract$_IRegistry_$7009", "typeString": "contract IRegistry" } }, "visibility": "private" }, { "constant": false, "id": 4722, "mutability": "mutable", "name": "_access", "nameLocation": "733:7:8", "nodeType": "VariableDeclaration", "scope": 5114, "src": "717:23:8", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_IAccess_$6858", "typeString": "contract IAccess" }, "typeName": { "id": 4721, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 4720, "name": "IAccess", "nodeType": "IdentifierPath", "referencedDeclaration": 6858, "src": "717:7:8" }, "referencedDeclaration": 6858, "src": "717:7:8", "typeDescriptions": { "typeIdentifier": "t_contract$_IAccess_$6858", "typeString": "contract IAccess" } }, "visibility": "private" }, { "constant": false, "id": 4725, "mutability": "mutable", "name": "_componentOwnerService", "nameLocation": "778:22:8", "nodeType": "VariableDeclaration", "scope": 5114, "src": "747:53:8", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_IComponentOwnerService_$7044", "typeString": "contract IComponentOwnerService" }, "typeName": { "id": 4724, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 4723, "name": "IComponentOwnerService", "nodeType": "IdentifierPath", "referencedDeclaration": 7044, "src": "747:22:8" }, "referencedDeclaration": 7044, "src": "747:22:8", "typeDescriptions": { "typeIdentifier": "t_contract$_IComponentOwnerService_$7044", "typeString": "contract IComponentOwnerService" } }, "visibility": "private" }, { "constant": false, "id": 4728, "mutability": "mutable", "name": "_instanceService", "nameLocation": "832:16:8", "nodeType": "VariableDeclaration", "scope": 5114, "src": "807:41:8", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_IInstanceService_$5668", "typeString": "contract IInstanceService" }, "typeName": { "id": 4727, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 4726, "name": "IInstanceService", "nodeType": "IdentifierPath", "referencedDeclaration": 5668, "src": "807:16:8" }, "referencedDeclaration": 5668, "src": "807:16:8", "typeDescriptions": { "typeIdentifier": "t_contract$_IInstanceService_$5668", "typeString": "contract IInstanceService" } }, "visibility": "private" }, { "body": { "id": 4741, "nodeType": "Block", "src": "896:177:8", "statements": [ { "expression": { "arguments": [ { "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 4736, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "arguments": [], "expression": { "argumentTypes": [], "id": 4731, "name": "_msgSender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6672, "src": "930:10:8", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", "typeString": "function () view returns (address)" } }, "id": 4732, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "930:12:8", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "arguments": [ { "hexValue": "496e7374616e63654f70657261746f7253657276696365", "id": 4734, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "966:25:8", "typeDescriptions": { "typeIdentifier": "t_stringliteral_893eee863631637173ead46f1c66388136d13bfeb40cdedfb3bfe4f34f933544", "typeString": "literal_string \"InstanceOperatorService\"" }, "value": "InstanceOperatorService" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_stringliteral_893eee863631637173ead46f1c66388136d13bfeb40cdedfb3bfe4f34f933544", "typeString": "literal_string \"InstanceOperatorService\"" } ], "id": 4733, "name": "_getContractAddress", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5113, "src": "946:19:8", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", "typeString": "function (bytes32) view returns (address)" } }, "id": 4735, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "946:46:8", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "930:62:8", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "hexValue": "4552524f523a434d502d3030313a4e4f545f494e5354414e43455f4f50455241544f525f53455256494345", "id": 4737, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "1007:45:8", "typeDescriptions": { "typeIdentifier": "t_stringliteral_0cf129911f5ea89264cf2d932a66d14be63649422912365886718bb28b51326b", "typeString": "literal_string \"ERROR:CMP-001:NOT_INSTANCE_OPERATOR_SERVICE\"" }, "value": "ERROR:CMP-001:NOT_INSTANCE_OPERATOR_SERVICE" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_0cf129911f5ea89264cf2d932a66d14be63649422912365886718bb28b51326b", "typeString": "literal_string \"ERROR:CMP-001:NOT_INSTANCE_OPERATOR_SERVICE\"" } ], "id": 4730, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "907:7:8", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 4738, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "907:146:8", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 4739, "nodeType": "ExpressionStatement", "src": "907:146:8" }, { "id": 4740, "nodeType": "PlaceholderStatement", "src": "1064:1:8" } ] }, "id": 4742, "name": "onlyInstanceOperatorService", "nameLocation": "866:27:8", "nodeType": "ModifierDefinition", "parameters": { "id": 4729, "nodeType": "ParameterList", "parameters": [], "src": "893:2:8" }, "src": "857:216:8", "virtual": false, "visibility": "internal" }, { "body": { "id": 4755, "nodeType": "Block", "src": "1106:147:8", "statements": [ { "expression": { "arguments": [ { "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 4750, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "arguments": [], "expression": { "argumentTypes": [], "id": 4745, "name": "_msgSender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6672, "src": "1140:10:8", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", "typeString": "function () view returns (address)" } }, "id": 4746, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1140:12:8", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "arguments": [ { "hexValue": "436f6d706f6e656e74", "id": 4748, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "1176:11:8", "typeDescriptions": { "typeIdentifier": "t_stringliteral_20422c9fb475bf3099f246b9754fae871c7ccc7264ca39a5be99fea0688ffe24", "typeString": "literal_string \"Component\"" }, "value": "Component" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_stringliteral_20422c9fb475bf3099f246b9754fae871c7ccc7264ca39a5be99fea0688ffe24", "typeString": "literal_string \"Component\"" } ], "id": 4747, "name": "_getContractAddress", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5113, "src": "1156:19:8", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", "typeString": "function (bytes32) view returns (address)" } }, "id": 4749, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1156:32:8", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "1140:48:8", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "hexValue": "4552524f523a434d502d3030323a4e4f545f434f4d504f4e454e54", "id": 4751, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "1203:29:8", "typeDescriptions": { "typeIdentifier": "t_stringliteral_13d854cfce65ca3d798b24f0152adbdef51328a4972814c276101e4a34ebcd4a", "typeString": "literal_string \"ERROR:CMP-002:NOT_COMPONENT\"" }, "value": "ERROR:CMP-002:NOT_COMPONENT" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_13d854cfce65ca3d798b24f0152adbdef51328a4972814c276101e4a34ebcd4a", "typeString": "literal_string \"ERROR:CMP-002:NOT_COMPONENT\"" } ], "id": 4744, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "1117:7:8", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 4752, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1117:116:8", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 4753, "nodeType": "ExpressionStatement", "src": "1117:116:8" }, { "id": 4754, "nodeType": "PlaceholderStatement", "src": "1244:1:8" } ] }, "id": 4756, "name": "onlyComponent", "nameLocation": "1090:13:8", "nodeType": "ModifierDefinition", "parameters": { "id": 4743, "nodeType": "ParameterList", "parameters": [], "src": "1103:2:8" }, "src": "1081:172:8", "virtual": false, "visibility": "internal" }, { "body": { "id": 4770, "nodeType": "Block", "src": "1298:160:8", "statements": [ { "expression": { "arguments": [ { "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 4765, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "arguments": [], "expression": { "argumentTypes": [], "id": 4759, "name": "_msgSender", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6672, "src": "1332:10:8", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", "typeString": "function () view returns (address)" } }, "id": 4760, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1332:12:8", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "arguments": [ { "id": 4763, "name": "_componentOwnerService", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4725, "src": "1356:22:8", "typeDescriptions": { "typeIdentifier": "t_contract$_IComponentOwnerService_$7044", "typeString": "contract IComponentOwnerService" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_contract$_IComponentOwnerService_$7044", "typeString": "contract IComponentOwnerService" } ], "id": 4762, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "1348:7:8", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { "id": 4761, "name": "address", "nodeType": "ElementaryTypeName", "src": "1348:7:8", "typeDescriptions": {} } }, "id": 4764, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1348:31:8", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "1332:47:8", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "hexValue": "4552524f523a434d502d3030333a4e4f545f434f4d504f4e454e545f4f574e45525f53455256494345", "id": 4766, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "1394:43:8", "typeDescriptions": { "typeIdentifier": "t_stringliteral_5a42b6523909db0c3f07c7fc4301f658eda0aaaedcec4492e9f126a1a0b351bc", "typeString": "literal_string \"ERROR:CMP-003:NOT_COMPONENT_OWNER_SERVICE\"" }, "value": "ERROR:CMP-003:NOT_COMPONENT_OWNER_SERVICE" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_5a42b6523909db0c3f07c7fc4301f658eda0aaaedcec4492e9f126a1a0b351bc", "typeString": "literal_string \"ERROR:CMP-003:NOT_COMPONENT_OWNER_SERVICE\"" } ], "id": 4758, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "1309:7:8", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 4767, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1309:129:8", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 4768, "nodeType": "ExpressionStatement", "src": "1309:129:8" }, { "id": 4769, "nodeType": "PlaceholderStatement", "src": "1449:1:8" } ] }, "id": 4771, "name": "onlyComponentOwnerService", "nameLocation": "1270:25:8", "nodeType": "ModifierDefinition", "parameters": { "id": 4757, "nodeType": "ParameterList", "parameters": [], "src": "1295:2:8" },