{ "contractName": "Initializable", "abi": [], "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor constructor() initializer {} ``` ====\",\"details\":\"This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. [CAUTION] ==== Avoid leaving a contract uninitialized. An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed: [.hljs-theme-light.nopadding] ```\",\"kind\":\"dev\",\"methods\":{},\"stateVariables\":{\"_initialized\":{\"details\":\"Indicates that the contract has been initialized.\"},\"_initializing\":{\"details\":\"Indicates that the contract is in the process of being initialized.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/proxy/utils/Initializable.sol\":\"Initializable\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/proxy/utils/Initializable.sol\":{\"keccak256\":\"0x94dd781aa290742d990ccb720b3cab52a3865d1ba004e35c1dc757aa3ee788e0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1d762e5eb6f74a6228a744b0261fb2dda4e2c8a214206ca67a443c06feb16ce2\",\"dweb:/ipfs/QmU85d56LUBCQ5j24hVf3WJ2uwjNoyLJr8ZYyDXWKmJGpU\"]},\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0x51b758a8815ecc9596c66c37d56b1d33883a444631a3f916b9fe65cb863ef7c4\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://997ca03557985b3c6f9143a18b6c3a710b3bc1c7f189ee956d305a966ecfb922\",\"dweb:/ipfs/QmQaD3Wb62F88SHqmpLttvF6wKuPDQep2LLUcKPekeRzvz\"]}},\"version\":1}", "bytecode": "0x", "deployedBytecode": "0x", "immutableReferences": {}, "generatedSources": [], "deployedGeneratedSources": [], "sourceMap": "", "deployedSourceMap": "", "source": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/Address.sol\";\n\n/**\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n *\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\n *\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\n *\n * [CAUTION]\n * ====\n * Avoid leaving a contract uninitialized.\n *\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\n * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the\n * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * /// @custom:oz-upgrades-unsafe-allow constructor\n * constructor() initializer {}\n * ```\n * ====\n */\nabstract contract Initializable {\n /**\n * @dev Indicates that the contract has been initialized.\n */\n bool private _initialized;\n\n /**\n * @dev Indicates that the contract is in the process of being initialized.\n */\n bool private _initializing;\n\n /**\n * @dev Modifier to protect an initializer function from being invoked twice.\n */\n modifier initializer() {\n // If the contract is initializing we ignore whether _initialized is set in order to support multiple\n // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the\n // contract may have been reentered.\n require(_initializing ? _isConstructor() : !_initialized, \"Initializable: contract is already initialized\");\n\n bool isTopLevelCall = !_initializing;\n if (isTopLevelCall) {\n _initializing = true;\n _initialized = true;\n }\n\n _;\n\n if (isTopLevelCall) {\n _initializing = false;\n }\n }\n\n /**\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\n * {initializer} modifier, directly or indirectly.\n */\n modifier onlyInitializing() {\n require(_initializing, \"Initializable: contract is not initializing\");\n _;\n }\n\n function _isConstructor() private view returns (bool) {\n return !Address.isContract(address(this));\n }\n}\n", "sourcePath": "@openzeppelin/contracts/proxy/utils/Initializable.sol", "ast": { "absolutePath": "@openzeppelin/contracts/proxy/utils/Initializable.sol", "exportedSymbols": { "Address": [ 3568 ], "Initializable": [ 710 ] }, "id": 711, "license": "MIT", "nodeType": "SourceUnit", "nodes": [ { "id": 638, "literals": [ "solidity", "^", "0.8", ".0" ], "nodeType": "PragmaDirective", "src": "98:23:5" }, { "absolutePath": "@openzeppelin/contracts/utils/Address.sol", "file": "../../utils/Address.sol", "id": 639, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 711, "sourceUnit": 3569, "src": "123:33:5", "symbolAliases": [], "unitAlias": "" }, { "abstract": true, "baseContracts": [], "canonicalName": "Initializable", "contractDependencies": [], "contractKind": "contract", "documentation": { "id": 640, "nodeType": "StructuredDocumentation", "src": "158:1490:5", "text": " @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an\n external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\n CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\n [CAUTION]\n ====\n Avoid leaving a contract uninitialized.\n An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\n contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the\n initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed:\n [.hljs-theme-light.nopadding]\n ```\n /// @custom:oz-upgrades-unsafe-allow constructor\n constructor() initializer {}\n ```\n ====" }, "fullyImplemented": true, "id": 710, "linearizedBaseContracts": [ 710 ], "name": "Initializable", "nameLocation": "1667:13:5", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "documentation": { "id": 641, "nodeType": "StructuredDocumentation", "src": "1687:73:5", "text": " @dev Indicates that the contract has been initialized." }, "id": 643, "mutability": "mutable", "name": "_initialized", "nameLocation": "1778:12:5", "nodeType": "VariableDeclaration", "scope": 710, "src": "1765:25:5", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 642, "name": "bool", "nodeType": "ElementaryTypeName", "src": "1765:4:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "visibility": "private" }, { "constant": false, "documentation": { "id": 644, "nodeType": "StructuredDocumentation", "src": "1797:91:5", "text": " @dev Indicates that the contract is in the process of being initialized." }, "id": 646, "mutability": "mutable", "name": "_initializing", "nameLocation": "1906:13:5", "nodeType": "VariableDeclaration", "scope": 710, "src": "1893:26:5", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 645, "name": "bool", "nodeType": "ElementaryTypeName", "src": "1893:4:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "visibility": "private" }, { "body": { "id": 683, "nodeType": "Block", "src": "2047:637:5", "statements": [ { "expression": { "arguments": [ { "condition": { "id": 650, "name": "_initializing", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 646, "src": "2336:13:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseExpression": { "id": 654, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "!", "prefix": true, "src": "2371:13:5", "subExpression": { "id": 653, "name": "_initialized", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 643, "src": "2372:12:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 655, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "Conditional", "src": "2336:48:5", "trueExpression": { "arguments": [], "expression": { "argumentTypes": [], "id": 651, "name": "_isConstructor", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 709, "src": "2352:14:5", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", "typeString": "function () view returns (bool)" } }, "id": 652, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2352:16:5", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "hexValue": "496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a6564", "id": 656, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "2386:48:5", "typeDescriptions": { "typeIdentifier": "t_stringliteral_7a2a4e26842155ea933fe6eb6e3137eb5a296dcdf55721c552be7b4c3cc23759", "typeString": "literal_string \"Initializable: contract is already initialized\"" }, "value": "Initializable: contract is already initialized" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_7a2a4e26842155ea933fe6eb6e3137eb5a296dcdf55721c552be7b4c3cc23759", "typeString": "literal_string \"Initializable: contract is already initialized\"" } ], "id": 649, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 4294967278, 4294967278 ], "referencedDeclaration": 4294967278, "src": "2328:7:5", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 657, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2328:107:5", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 658, "nodeType": "ExpressionStatement", "src": "2328:107:5" }, { "assignments": [ 660 ], "declarations": [ { "constant": false, "id": 660, "mutability": "mutable", "name": "isTopLevelCall", "nameLocation": "2451:14:5", "nodeType": "VariableDeclaration", "scope": 683, "src": "2446:19:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 659, "name": "bool", "nodeType": "ElementaryTypeName", "src": "2446:4:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "visibility": "internal" } ], "id": 663, "initialValue": { "id": 662, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "!", "prefix": true, "src": "2468:14:5", "subExpression": { "id": 661, "name": "_initializing", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 646, "src": "2469:13:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "VariableDeclarationStatement", "src": "2446:36:5" }, { "condition": { "id": 664, "name": "isTopLevelCall", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 660, "src": "2496:14:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 674, "nodeType": "IfStatement", "src": "2492:98:5", "trueBody": { "id": 673, "nodeType": "Block", "src": "2512:78:5", "statements": [ { "expression": { "id": 667, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "id": 665, "name": "_initializing", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 646, "src": "2526:13:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "hexValue": "74727565", "id": 666, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "2542:4:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, "src": "2526:20:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 668, "nodeType": "ExpressionStatement", "src": "2526:20:5" }, { "expression": { "id": 671, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "id": 669, "name": "_initialized", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 643, "src": "2560:12:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "hexValue": "74727565", "id": 670, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "2575:4:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, "src": "2560:19:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 672, "nodeType": "ExpressionStatement", "src": "2560:19:5" } ] } }, { "id": 675, "nodeType": "PlaceholderStatement", "src": "2600:1:5" }, { "condition": { "id": 676, "name": "isTopLevelCall", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 660, "src": "2616:14:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 682, "nodeType": "IfStatement", "src": "2612:66:5", "trueBody": { "id": 681, "nodeType": "Block", "src": "2632:46:5", "statements": [ { "expression": { "id": 679, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "id": 677, "name": "_initializing", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 646, "src": "2646:13:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "hexValue": "66616c7365", "id": 678, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "2662:5:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "false" }, "src": "2646:21:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 680, "nodeType": "ExpressionStatement", "src": "2646:21:5" } ] } } ] }, "documentation": { "id": 647, "nodeType": "StructuredDocumentation", "src": "1926:93:5", "text": " @dev Modifier to protect an initializer function from being invoked twice." }, "id": 684, "name": "initializer", "nameLocation": "2033:11:5", "nodeType": "ModifierDefinition", "parameters": { "id": 648, "nodeType": "ParameterList", "parameters": [], "src": "2044:2:5" }, "src": "2024:660:5", "virtual": false, "visibility": "internal" }, { "body": { "id": 693, "nodeType": "Block", "src": "2901:97:5", "statements": [ { "expression": { "arguments": [ { "id": 688, "name": "_initializing", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 646, "src": "2919:13:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "hexValue": "496e697469616c697a61626c653a20636f6e7472616374206973206e6f7420696e697469616c697a696e67", "id": 689, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "2934:45:5", "typeDescriptions": { "typeIdentifier": "t_stringliteral_d688db918bb9dd50354922faa108595679886fe9ff08046ad1ffe30aaea55f8b", "typeString": "literal_string \"Initializable: contract is not initializing\"" }, "value": "Initializable: contract is not initializing" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_d688db918bb9dd50354922faa108595679886fe9ff08046ad1ffe30aaea55f8b", "typeString": "literal_string \"Initializable: contract is not initializing\"" } ], "id": 687, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 4294967278, 4294967278 ], "referencedDeclaration": 4294967278, "src": "2911:7:5", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 690, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2911:69:5", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 691, "nodeType": "ExpressionStatement", "src": "2911:69:5" }, { "id": 692, "nodeType": "PlaceholderStatement", "src": "2990:1:5" } ] }, "documentation": { "id": 685, "nodeType": "StructuredDocumentation", "src": "2690:178:5", "text": " @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\n {initializer} modifier, directly or indirectly." }, "id": 694, "name": "onlyInitializing", "nameLocation": "2882:16:5", "nodeType": "ModifierDefinition", "parameters": { "id": 686, "nodeType": "ParameterList", "parameters": [], "src": "2898:2:5" }, "src": "2873:125:5", "virtual": false, "visibility": "internal" }, { "body": { "id": 708, "nodeType": "Block", "src": "3058:58:5", "statements": [ { "expression": { "id": 706, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "!", "prefix": true, "src": "3075:34:5", "subExpression": { "arguments": [ { "arguments": [ { "id": 703, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4294967268, "src": "3103:4:5", "typeDescriptions": { "typeIdentifier": "t_contract$_Initializable_$710", "typeString": "contract Initializable" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_contract$_Initializable_$710", "typeString": "contract Initializable" } ], "id": 702, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "3095:7:5", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { "id": 701, "name": "address", "nodeType": "ElementaryTypeName", "src": "3095:7:5", "typeDescriptions": {} } }, "id": 704, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3095:13:5", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "expression": { "id": 699, "name": "Address", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3568, "src": "3076:7:5", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_Address_$3568_$", "typeString": "type(library Address)" } }, "id": 700, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "isContract", "nodeType": "MemberAccess", "referencedDeclaration": 3291, "src": "3076:18:5", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", "typeString": "function (address) view returns (bool)" } }, "id": 705, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3076:33:5", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "functionReturnParameters": 698, "id": 707, "nodeType": "Return", "src": "3068:41:5" } ] }, "id": 709, "implemented": true, "kind": "function", "modifiers": [], "name": "_isConstructor", "nameLocation": "3013:14:5", "nodeType": "FunctionDefinition", "parameters": { "id": 695, "nodeType": "ParameterList", "parameters": [], "src": "3027:2:5" }, "returnParameters": { "id": 698, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 697, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 709, "src": "3052:4:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 696, "name": "bool", "nodeType": "ElementaryTypeName", "src": "3052:4:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "visibility": "internal" } ], "src": "3051:6:5" }, "scope": 710, "src": "3004:112:5", "stateMutability": "view", "virtual": false, "visibility": "private" } ], "scope": 711, "src": "1649:1469:5", "usedErrors": [] } ], "src": "98:3021:5" }, "legacyAST": { "absolutePath": "@openzeppelin/contracts/proxy/utils/Initializable.sol", "exportedSymbols": { "Address": [ 3568 ], "Initializable": [ 710 ] }, "id": 711, "license": "MIT", "nodeType": "SourceUnit", "nodes": [ { "id": 638, "literals": [ "solidity", "^", "0.8", ".0" ], "nodeType": "PragmaDirective", "src": "98:23:5" }, { "absolutePath": "@openzeppelin/contracts/utils/Address.sol", "file": "../../utils/Address.sol", "id": 639, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 711, "sourceUnit": 3569, "src": "123:33:5", "symbolAliases": [], "unitAlias": "" }, { "abstract": true, "baseContracts": [], "canonicalName": "Initializable", "contractDependencies": [], "contractKind": "contract", "documentation": { "id": 640, "nodeType": "StructuredDocumentation", "src": "158:1490:5", "text": " @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an\n external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\n CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\n [CAUTION]\n ====\n Avoid leaving a contract uninitialized.\n An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\n contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the\n initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed:\n [.hljs-theme-light.nopadding]\n ```\n /// @custom:oz-upgrades-unsafe-allow constructor\n constructor() initializer {}\n ```\n ====" }, "fullyImplemented": true, "id": 710, "linearizedBaseContracts": [ 710 ], "name": "Initializable", "nameLocation": "1667:13:5", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "documentation": { "id": 641, "nodeType": "StructuredDocumentation", "src": "1687:73:5", "text": " @dev Indicates that the contract has been initialized." }, "id": 643, "mutability": "mutable", "name": "_initialized", "nameLocation": "1778:12:5", "nodeType": "VariableDeclaration", "scope": 710, "src": "1765:25:5", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 642, "name": "bool", "nodeType": "ElementaryTypeName", "src": "1765:4:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "visibility": "private" }, { "constant": false, "documentation": { "id": 644, "nodeType": "StructuredDocumentation", "src": "1797:91:5", "text": " @dev Indicates that the contract is in the process of being initialized." }, "id": 646, "mutability": "mutable", "name": "_initializing", "nameLocation": "1906:13:5", "nodeType": "VariableDeclaration", "scope": 710, "src": "1893:26:5", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 645, "name": "bool", "nodeType": "ElementaryTypeName", "src": "1893:4:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "visibility": "private" }, { "body": { "id": 683, "nodeType": "Block", "src": "2047:637:5", "statements": [ { "expression": { "arguments": [ { "condition": { "id": 650, "name": "_initializing", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 646, "src": "2336:13:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseExpression": { "id": 654, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "!", "prefix": true, "src": "2371:13:5", "subExpression": { "id": 653, "name": "_initialized", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 643, "src": "2372:12:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 655, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "Conditional", "src": "2336:48:5", "trueExpression": { "arguments": [], "expression": { "argumentTypes": [], "id": 651, "name": "_isConstructor", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 709, "src": "2352:14:5", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", "typeString": "function () view returns (bool)" } }, "id": 652, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2352:16:5", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "hexValue": "496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a6564", "id": 656, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "2386:48:5", "typeDescriptions": { "typeIdentifier": "t_stringliteral_7a2a4e26842155ea933fe6eb6e3137eb5a296dcdf55721c552be7b4c3cc23759", "typeString": "literal_string \"Initializable: contract is already initialized\"" }, "value": "Initializable: contract is already initialized" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_7a2a4e26842155ea933fe6eb6e3137eb5a296dcdf55721c552be7b4c3cc23759", "typeString": "literal_string \"Initializable: contract is already initialized\"" } ], "id": 649, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 4294967278, 4294967278 ], "referencedDeclaration": 4294967278, "src": "2328:7:5", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 657, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2328:107:5", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 658, "nodeType": "ExpressionStatement", "src": "2328:107:5" }, { "assignments": [ 660 ], "declarations": [ { "constant": false, "id": 660, "mutability": "mutable", "name": "isTopLevelCall", "nameLocation": "2451:14:5", "nodeType": "VariableDeclaration", "scope": 683, "src": "2446:19:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 659, "name": "bool", "nodeType": "ElementaryTypeName", "src": "2446:4:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "visibility": "internal" } ], "id": 663, "initialValue": { "id": 662, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "!", "prefix": true, "src": "2468:14:5", "subExpression": { "id": 661, "name": "_initializing", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 646, "src": "2469:13:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "VariableDeclarationStatement", "src": "2446:36:5" }, { "condition": { "id": 664, "name": "isTopLevelCall", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 660, "src": "2496:14:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 674, "nodeType": "IfStatement", "src": "2492:98:5", "trueBody": { "id": 673, "nodeType": "Block", "src": "2512:78:5", "statements": [ { "expression": { "id": 667, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "id": 665, "name": "_initializing", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 646, "src": "2526:13:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "hexValue": "74727565", "id": 666, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "2542:4:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, "src": "2526:20:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 668, "nodeType": "ExpressionStatement", "src": "2526:20:5" }, { "expression": { "id": 671, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "id": 669, "name": "_initialized", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 643, "src": "2560:12:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "hexValue": "74727565", "id": 670, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "2575:4:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, "src": "2560:19:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 672, "nodeType": "ExpressionStatement", "src": "2560:19:5" } ] } }, { "id": 675, "nodeType": "PlaceholderStatement", "src": "2600:1:5" }, { "condition": { "id": 676, "name": "isTopLevelCall", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 660, "src": "2616:14:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 682, "nodeType": "IfStatement", "src": "2612:66:5", "trueBody": { "id": 681, "nodeType": "Block", "src": "2632:46:5", "statements": [ { "expression": { "id": 679, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "id": 677, "name": "_initializing", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 646, "src": "2646:13:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "hexValue": "66616c7365", "id": 678, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "2662:5:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "false" }, "src": "2646:21:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 680, "nodeType": "ExpressionStatement", "src": "2646:21:5" } ] } } ] }, "documentation": { "id": 647, "nodeType": "StructuredDocumentation", "src": "1926:93:5", "text": " @dev Modifier to protect an initializer function from being invoked twice." }, "id": 684, "name": "initializer", "nameLocation": "2033:11:5", "nodeType": "ModifierDefinition", "parameters": { "id": 648, "nodeType": "ParameterList", "parameters": [], "src": "2044:2:5" }, "src": "2024:660:5", "virtual": false, "visibility": "internal" }, { "body": { "id": 693, "nodeType": "Block", "src": "2901:97:5", "statements": [ { "expression": { "arguments": [ { "id": 688, "name": "_initializing", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 646, "src": "2919:13:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "hexValue": "496e697469616c697a61626c653a20636f6e7472616374206973206e6f7420696e697469616c697a696e67", "id": 689, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "2934:45:5", "typeDescriptions": { "typeIdentifier": "t_stringliteral_d688db918bb9dd50354922faa108595679886fe9ff08046ad1ffe30aaea55f8b", "typeString": "literal_string \"Initializable: contract is not initializing\"" }, "value": "Initializable: contract is not initializing" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_d688db918bb9dd50354922faa108595679886fe9ff08046ad1ffe30aaea55f8b", "typeString": "literal_string \"Initializable: contract is not initializing\"" } ], "id": 687, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 4294967278, 4294967278 ], "referencedDeclaration": 4294967278, "src": "2911:7:5", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 690, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2911:69:5", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 691, "nodeType": "ExpressionStatement", "src": "2911:69:5" }, { "id": 692, "nodeType": "PlaceholderStatement", "src": "2990:1:5" } ] }, "documentation": { "id": 685, "nodeType": "StructuredDocumentation", "src": "2690:178:5", "text": " @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\n {initializer} modifier, directly or indirectly." }, "id": 694, "name": "onlyInitializing", "nameLocation": "2882:16:5", "nodeType": "ModifierDefinition", "parameters": { "id": 686, "nodeType": "ParameterList", "parameters": [], "src": "2898:2:5" }, "src": "2873:125:5", "virtual": false, "visibility": "internal" }, { "body": { "id": 708, "nodeType": "Block", "src": "3058:58:5", "statements": [ { "expression": { "id": 706, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "!", "prefix": true, "src": "3075:34:5", "subExpression": { "arguments": [ { "arguments": [ { "id": 703, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4294967268, "src": "3103:4:5", "typeDescriptions": { "typeIdentifier": "t_contract$_Initializable_$710", "typeString": "contract Initializable" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_contract$_Initializable_$710", "typeString": "contract Initializable" } ], "id": 702, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "3095:7:5", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { "id": 701, "name": "address", "nodeType": "ElementaryTypeName", "src": "3095:7:5", "typeDescriptions": {} } }, "id": 704, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3095:13:5", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "expression": { "id": 699, "name": "Address", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3568, "src": "3076:7:5", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_Address_$3568_$", "typeString": "type(library Address)" } }, "id": 700, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "isContract", "nodeType": "MemberAccess", "referencedDeclaration": 3291, "src": "3076:18:5", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", "typeString": "function (address) view returns (bool)" } }, "id": 705, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3076:33:5", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "functionReturnParameters": 698, "id": 707, "nodeType": "Return", "src": "3068:41:5" } ] }, "id": 709, "implemented": true, "kind": "function", "modifiers": [], "name": "_isConstructor", "nameLocation": "3013:14:5", "nodeType": "FunctionDefinition", "parameters": { "id": 695, "nodeType": "ParameterList", "parameters": [], "src": "3027:2:5" }, "returnParameters": { "id": 698, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 697, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 709, "src": "3052:4:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 696, "name": "bool", "nodeType": "ElementaryTypeName", "src": "3052:4:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "visibility": "internal" } ], "src": "3051:6:5" }, "scope": 710, "src": "3004:112:5", "stateMutability": "view", "virtual": false, "visibility": "private" } ], "scope": 711, "src": "1649:1469:5", "usedErrors": [] } ], "src": "98:3021:5" }, "compiler": { "name": "solc", "version": "0.8.10+commit.fc410830.Emscripten.clang" }, "networks": {}, "schemaVersion": "3.4.4", "updatedAt": "2022-01-27T10:56:46.912Z", "devdoc": { "custom:oz-upgrades-unsafe-allow": "constructor constructor() initializer {} ``` ====", "details": "This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. [CAUTION] ==== Avoid leaving a contract uninitialized. An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed: [.hljs-theme-light.nopadding] ```", "kind": "dev", "methods": {}, "stateVariables": { "_initialized": { "details": "Indicates that the contract has been initialized." }, "_initializing": { "details": "Indicates that the contract is in the process of being initialized." } }, "version": 1 }, "userdoc": { "kind": "user", "methods": {}, "version": 1 } }