witnet-solidity-bridge
Version:
Witnet Solidity Bridge contracts for EVM-compatible chains
892 lines (891 loc) • 146 kB
JSON
{
"contractName": "Initializable",
"abi": [
{
"inputs": [],
"name": "InvalidInitialization",
"type": "error"
},
{
"inputs": [],
"name": "NotInitializing",
"type": "error"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint64",
"name": "version",
"type": "uint64"
}
],
"name": "Initialized",
"type": "event"
}
],
"metadata": "{\"compiler\":{\"version\":\"0.8.30+commit.73712a01\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"InvalidInitialization\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"}],\"devdoc\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor constructor() { _disableInitializers(); } ``` ====\",\"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 proxied contracts do not make use of 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. The initialization functions use a version number. Once a version number is used, it is consumed and cannot be reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in case an upgrade adds a module that needs to be initialized. For example: [.hljs-theme-light.nopadding] ```solidity contract MyToken is ERC20Upgradeable { function initialize() initializer public { __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\"); } } contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { function initializeV2() reinitializer(2) public { __ERC20Permit_init(\\\"MyToken\\\"); } } ``` 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 prevent the implementation contract from being used, you should invoke the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: [.hljs-theme-light.nopadding] ```\",\"errors\":{\"InvalidInitialization()\":[{\"details\":\"The contract is already initialized.\"}],\"NotInitializing()\":[{\"details\":\"The contract is not initializing.\"}]},\"events\":{\"Initialized(uint64)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"}},\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":\"Initializable\"},\"evmVersion\":\"prague\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"keccak256\":\"0xdb4d24ee2c087c391d587cd17adfe5b3f9d93b3110b1388c2ab6c7c0ad1dcd05\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ab7b6d5b9e2b88176312967fe0f0e78f3d9a1422fa5e4b64e2440c35869b5d08\",\"dweb:/ipfs/QmXKYWWyzcLg1B2k7Sb1qkEXgLCYfXecR9wYW5obRzWP1Q\"]}},\"version\":1}",
"bytecode": "0x",
"deployedBytecode": "0x",
"immutableReferences": {},
"generatedSources": [],
"deployedGeneratedSources": [],
"sourceMap": "",
"deployedSourceMap": "",
"source": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.20;\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 proxied contracts do not make use of 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 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\n * reused. This mechanism prevents re-execution of each \"step\" but allows the creation of new initialization steps in\n * case an upgrade adds a module that needs to be initialized.\n *\n * For example:\n *\n * [.hljs-theme-light.nopadding]\n * ```solidity\n * contract MyToken is ERC20Upgradeable {\n * function initialize() initializer public {\n * __ERC20_init(\"MyToken\", \"MTK\");\n * }\n * }\n *\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\n * function initializeV2() reinitializer(2) public {\n * __ERC20Permit_init(\"MyToken\");\n * }\n * }\n * ```\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 prevent the implementation contract from being used, you should invoke\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * /// @custom:oz-upgrades-unsafe-allow constructor\n * constructor() {\n * _disableInitializers();\n * }\n * ```\n * ====\n */\nabstract contract Initializable {\n /**\n * @dev Storage of the initializable contract.\n *\n * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions\n * when using with upgradeable contracts.\n *\n * @custom:storage-location erc7201:openzeppelin.storage.Initializable\n */\n struct InitializableStorage {\n /**\n * @dev Indicates that the contract has been initialized.\n */\n uint64 _initialized;\n /**\n * @dev Indicates that the contract is in the process of being initialized.\n */\n bool _initializing;\n }\n\n // keccak256(abi.encode(uint256(keccak256(\"openzeppelin.storage.Initializable\")) - 1)) & ~bytes32(uint256(0xff))\n bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00;\n\n /**\n * @dev The contract is already initialized.\n */\n error InvalidInitialization();\n\n /**\n * @dev The contract is not initializing.\n */\n error NotInitializing();\n\n /**\n * @dev Triggered when the contract has been initialized or reinitialized.\n */\n event Initialized(uint64 version);\n\n /**\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\n * `onlyInitializing` functions can be used to initialize parent contracts.\n *\n * Similar to `reinitializer(1)`, except that in the context of a constructor an `initializer` may be invoked any\n * number of times. This behavior in the constructor can be useful during testing and is not expected to be used in\n * production.\n *\n * Emits an {Initialized} event.\n */\n modifier initializer() {\n // solhint-disable-next-line var-name-mixedcase\n InitializableStorage storage $ = _getInitializableStorage();\n\n // Cache values to avoid duplicated sloads\n bool isTopLevelCall = !$._initializing;\n uint64 initialized = $._initialized;\n\n // Allowed calls:\n // - initialSetup: the contract is not in the initializing state and no previous version was\n // initialized\n // - construction: the contract is initialized at version 1 (no reinitialization) and the\n // current contract is just being deployed\n bool initialSetup = initialized == 0 && isTopLevelCall;\n bool construction = initialized == 1 && address(this).code.length == 0;\n\n if (!initialSetup && !construction) {\n revert InvalidInitialization();\n }\n $._initialized = 1;\n if (isTopLevelCall) {\n $._initializing = true;\n }\n _;\n if (isTopLevelCall) {\n $._initializing = false;\n emit Initialized(1);\n }\n }\n\n /**\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\n * used to initialize parent contracts.\n *\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\n * are added through upgrades and that require initialization.\n *\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\n * cannot be nested. If one is invoked in the context of another, execution will revert.\n *\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\n * a contract, executing them in the right order is up to the developer or operator.\n *\n * WARNING: Setting the version to 2**64 - 1 will prevent any future reinitialization.\n *\n * Emits an {Initialized} event.\n */\n modifier reinitializer(uint64 version) {\n // solhint-disable-next-line var-name-mixedcase\n InitializableStorage storage $ = _getInitializableStorage();\n\n if ($._initializing || $._initialized >= version) {\n revert InvalidInitialization();\n }\n $._initialized = version;\n $._initializing = true;\n _;\n $._initializing = false;\n emit Initialized(version);\n }\n\n /**\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\n */\n modifier onlyInitializing() {\n _checkInitializing();\n _;\n }\n\n /**\n * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.\n */\n function _checkInitializing() internal view virtual {\n if (!_isInitializing()) {\n revert NotInitializing();\n }\n }\n\n /**\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\n * through proxies.\n *\n * Emits an {Initialized} event the first time it is successfully executed.\n */\n function _disableInitializers() internal virtual {\n // solhint-disable-next-line var-name-mixedcase\n InitializableStorage storage $ = _getInitializableStorage();\n\n if ($._initializing) {\n revert InvalidInitialization();\n }\n if ($._initialized != type(uint64).max) {\n $._initialized = type(uint64).max;\n emit Initialized(type(uint64).max);\n }\n }\n\n /**\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\n */\n function _getInitializedVersion() internal view returns (uint64) {\n return _getInitializableStorage()._initialized;\n }\n\n /**\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\n */\n function _isInitializing() internal view returns (bool) {\n return _getInitializableStorage()._initializing;\n }\n\n /**\n * @dev Pointer to storage slot. Allows integrators to override it with a custom storage location.\n *\n * NOTE: Consider following the ERC-7201 formula to derive storage locations.\n */\n function _initializableStorageSlot() internal pure virtual returns (bytes32) {\n return INITIALIZABLE_STORAGE;\n }\n\n /**\n * @dev Returns a pointer to the storage namespace.\n */\n // solhint-disable-next-line var-name-mixedcase\n function _getInitializableStorage() private pure returns (InitializableStorage storage $) {\n bytes32 slot = _initializableStorageSlot();\n assembly {\n $.slot := slot\n }\n }\n}\n",
"sourcePath": "@openzeppelin\\contracts-upgradeable\\proxy\\utils\\Initializable.sol",
"ast": {
"absolutePath": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol",
"exportedSymbols": {
"Initializable": [
267
]
},
"id": 268,
"license": "MIT",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1,
"literals": [
"solidity",
"^",
"0.8",
".20"
],
"nodeType": "PragmaDirective",
"src": "113:24:0"
},
{
"abstract": true,
"baseContracts": [],
"canonicalName": "Initializable",
"contractDependencies": [],
"contractKind": "contract",
"documentation": {
"id": 2,
"nodeType": "StructuredDocumentation",
"src": "139:2209:0",
"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 proxied contracts do not make use of 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 The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\n reused. This mechanism prevents re-execution of each \"step\" but allows the creation of new initialization steps in\n case an upgrade adds a module that needs to be initialized.\n For example:\n [.hljs-theme-light.nopadding]\n ```solidity\n contract MyToken is ERC20Upgradeable {\n function initialize() initializer public {\n __ERC20_init(\"MyToken\", \"MTK\");\n }\n }\n contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\n function initializeV2() reinitializer(2) public {\n __ERC20Permit_init(\"MyToken\");\n }\n }\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 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 prevent the implementation contract from being used, you should invoke\n the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\n [.hljs-theme-light.nopadding]\n ```\n /// @custom:oz-upgrades-unsafe-allow constructor\n constructor() {\n _disableInitializers();\n }\n ```\n ===="
},
"fullyImplemented": true,
"id": 267,
"linearizedBaseContracts": [
267
],
"name": "Initializable",
"nameLocation": "2367:13:0",
"nodeType": "ContractDefinition",
"nodes": [
{
"canonicalName": "Initializable.InitializableStorage",
"documentation": {
"id": 3,
"nodeType": "StructuredDocumentation",
"src": "2387:293:0",
"text": " @dev Storage of the initializable contract.\n It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions\n when using with upgradeable contracts.\n @custom:storage-location erc7201:openzeppelin.storage.Initializable"
},
"id": 10,
"members": [
{
"constant": false,
"id": 6,
"mutability": "mutable",
"name": "_initialized",
"nameLocation": "2820:12:0",
"nodeType": "VariableDeclaration",
"scope": 10,
"src": "2813:19:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
},
"typeName": {
"id": 5,
"name": "uint64",
"nodeType": "ElementaryTypeName",
"src": "2813:6:0",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 9,
"mutability": "mutable",
"name": "_initializing",
"nameLocation": "2955:13:0",
"nodeType": "VariableDeclaration",
"scope": 10,
"src": "2950:18:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 8,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "2950:4:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
}
],
"name": "InitializableStorage",
"nameLocation": "2692:20:0",
"nodeType": "StructDefinition",
"scope": 267,
"src": "2685:290:0",
"visibility": "public"
},
{
"constant": true,
"id": 13,
"mutability": "constant",
"name": "INITIALIZABLE_STORAGE",
"nameLocation": "3123:21:0",
"nodeType": "VariableDeclaration",
"scope": 267,
"src": "3098:115:0",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 11,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "3098:7:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": {
"hexValue": "307866306335376531363834306466303430663135303838646332663831666533393163333932336265633733653233613936363265666339633232396336613030",
"id": 12,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3147:66:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_108904022758810753673719992590105913556127789646572562039383141376366747609600_by_1",
"typeString": "int_const 1089...(70 digits omitted)...9600"
},
"value": "0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00"
},
"visibility": "private"
},
{
"documentation": {
"id": 14,
"nodeType": "StructuredDocumentation",
"src": "3220:60:0",
"text": " @dev The contract is already initialized."
},
"errorSelector": "f92ee8a9",
"id": 16,
"name": "InvalidInitialization",
"nameLocation": "3291:21:0",
"nodeType": "ErrorDefinition",
"parameters": {
"id": 15,
"nodeType": "ParameterList",
"parameters": [],
"src": "3312:2:0"
},
"src": "3285:30:0"
},
{
"documentation": {
"id": 17,
"nodeType": "StructuredDocumentation",
"src": "3321:57:0",
"text": " @dev The contract is not initializing."
},
"errorSelector": "d7e6bcf8",
"id": 19,
"name": "NotInitializing",
"nameLocation": "3389:15:0",
"nodeType": "ErrorDefinition",
"parameters": {
"id": 18,
"nodeType": "ParameterList",
"parameters": [],
"src": "3404:2:0"
},
"src": "3383:24:0"
},
{
"anonymous": false,
"documentation": {
"id": 20,
"nodeType": "StructuredDocumentation",
"src": "3413:90:0",
"text": " @dev Triggered when the contract has been initialized or reinitialized."
},
"eventSelector": "c7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2",
"id": 24,
"name": "Initialized",
"nameLocation": "3514:11:0",
"nodeType": "EventDefinition",
"parameters": {
"id": 23,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 22,
"indexed": false,
"mutability": "mutable",
"name": "version",
"nameLocation": "3533:7:0",
"nodeType": "VariableDeclaration",
"scope": 24,
"src": "3526:14:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
},
"typeName": {
"id": 21,
"name": "uint64",
"nodeType": "ElementaryTypeName",
"src": "3526:6:0",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
}
},
"visibility": "internal"
}
],
"src": "3525:16:0"
},
"src": "3508:34:0"
},
{
"body": {
"id": 106,
"nodeType": "Block",
"src": "4092:1079:0",
"statements": [
{
"assignments": [
29
],
"declarations": [
{
"constant": false,
"id": 29,
"mutability": "mutable",
"name": "$",
"nameLocation": "4187:1:0",
"nodeType": "VariableDeclaration",
"scope": 106,
"src": "4158:30:0",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_InitializableStorage_$10_storage_ptr",
"typeString": "struct Initializable.InitializableStorage"
},
"typeName": {
"id": 28,
"nodeType": "UserDefinedTypeName",
"pathNode": {
"id": 27,
"name": "InitializableStorage",
"nameLocations": [
"4158:20:0"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 10,
"src": "4158:20:0"
},
"referencedDeclaration": 10,
"src": "4158:20:0",
"typeDescriptions": {
"typeIdentifier": "t_struct$_InitializableStorage_$10_storage_ptr",
"typeString": "struct Initializable.InitializableStorage"
}
},
"visibility": "internal"
}
],
"id": 32,
"initialValue": {
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 30,
"name": "_getInitializableStorage",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 266,
"src": "4191:24:0",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_InitializableStorage_$10_storage_ptr_$",
"typeString": "function () pure returns (struct Initializable.InitializableStorage storage pointer)"
}
},
"id": 31,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "4191:26:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_struct$_InitializableStorage_$10_storage_ptr",
"typeString": "struct Initializable.InitializableStorage storage pointer"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "4158:59:0"
},
{
"assignments": [
34
],
"declarations": [
{
"constant": false,
"id": 34,
"mutability": "mutable",
"name": "isTopLevelCall",
"nameLocation": "4284:14:0",
"nodeType": "VariableDeclaration",
"scope": 106,
"src": "4279:19:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 33,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "4279:4:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
}
],
"id": 38,
"initialValue": {
"id": 37,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "!",
"prefix": true,
"src": "4301:16:0",
"subExpression": {
"expression": {
"id": 35,
"name": "$",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 29,
"src": "4302:1:0",
"typeDescriptions": {
"typeIdentifier": "t_struct$_InitializableStorage_$10_storage_ptr",
"typeString": "struct Initializable.InitializableStorage storage pointer"
}
},
"id": 36,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "4304:13:0",
"memberName": "_initializing",
"nodeType": "MemberAccess",
"referencedDeclaration": 9,
"src": "4302:15:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "4279:38:0"
},
{
"assignments": [
40
],
"declarations": [
{
"constant": false,
"id": 40,
"mutability": "mutable",
"name": "initialized",
"nameLocation": "4334:11:0",
"nodeType": "VariableDeclaration",
"scope": 106,
"src": "4327:18:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
},
"typeName": {
"id": 39,
"name": "uint64",
"nodeType": "ElementaryTypeName",
"src": "4327:6:0",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
}
},
"visibility": "internal"
}
],
"id": 43,
"initialValue": {
"expression": {
"id": 41,
"name": "$",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 29,
"src": "4348:1:0",
"typeDescriptions": {
"typeIdentifier": "t_struct$_InitializableStorage_$10_storage_ptr",
"typeString": "struct Initializable.InitializableStorage storage pointer"
}
},
"id": 42,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberLocation": "4350:12:0",
"memberName": "_initialized",
"nodeType": "MemberAccess",
"referencedDeclaration": 6,
"src": "4348:14:0",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "4327:35:0"
},
{
"assignments": [
45
],
"declarations": [
{
"constant": false,
"id": 45,
"mutability": "mutable",
"name": "initialSetup",
"nameLocation": "4709:12:0",
"nodeType": "VariableDeclaration",
"scope": 106,
"src": "4704:17:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 44,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "4704:4:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
}
],
"id": 51,
"initialValue": {
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 50,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
},
"id": 48,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 46,
"name": "initialized",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 40,
"src": "4724:11:0",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"hexValue": "30",
"id": 47,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4739:1:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "4724:16:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "&&",
"rightExpression": {
"id": 49,
"name": "isTopLevelCall",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 34,
"src": "4744:14:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "4724:34:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "4704:54:0"
},
{
"assignments": [
53
],
"declarations": [
{
"constant": false,
"id": 53,
"mutability": "mutable",
"name": "construction",
"nameLocation": "4773:12:0",
"nodeType": "VariableDeclaration",
"scope": 106,
"src": "4768:17:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 52,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "4768:4:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
}
],
"id": 66,
"initialValue": {
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 65,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
},
"id": 56,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 54,
"name": "initialized",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 40,
"src": "4788:11:0",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"hexValue": "31",
"id": 55,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4803:1:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"src": "4788:16:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "&&",
"rightExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 64,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"expression": {
"expression": {
"arguments": [
{
"id": 59,
"name": "this",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4294967268,
"src": "4816:4:0",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Initializable_$267",
"typeString": "contract Initializable"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_Initializable_$267",
"typeString": "contract Initializable"
}
],
"id": 58,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "4808:7:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
"id": 57,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "4808:7:0",
"typeDescriptions": {}
}
},
"id": 60,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "4808:13:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 61,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "4822:4:0",
"memberName": "code",
"nodeType": "MemberAccess",
"src": "4808:18:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 62,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "4827:6:0",
"memberName": "length",
"nodeType": "MemberAccess",
"src": "4808:25:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"hexValue": "30",
"id": 63,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4837:1:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "4808:30:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "4788:50:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "4768:70:0"
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 71,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 68,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "!",
"prefix": true,
"src": "4853:13:0",
"subExpression": {
"id": 67,
"name": "initialSetup",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 45,
"src": "4854:12:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "&&",
"rightExpression": {
"id": 70,