UNPKG

witnet-solidity-bridge

Version:

Witnet Solidity Bridge contracts for EVM-compatible chains

1,163 lines (1,162 loc) 114 kB
{ "contractName": "Clonable", "abi": [ { "inputs": [], "name": "InvalidInitialization", "type": "error" }, { "inputs": [], "name": "NotInitializing", "type": "error" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "by", "type": "address" }, { "indexed": true, "internalType": "address", "name": "self", "type": "address" }, { "indexed": true, "internalType": "address", "name": "clone", "type": "address" } ], "name": "Cloned", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint64", "name": "version", "type": "uint64" } ], "name": "Initialized", "type": "event" }, { "inputs": [], "name": "cloned", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "initialized", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "self", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" } ], "metadata": "{\"compiler\":{\"version\":\"0.8.25+commit.b61c2a91\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"InvalidInitialization\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"by\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"self\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"clone\",\"type\":\"address\"}],\"name\":\"Cloned\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"cloned\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"self\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"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\":{\"cloned()\":{\"notice\":\"Tells whether this contract is a clone of `self()`\"},\"initialized()\":{\"notice\":\"Tells whether this instance has been initialized.\"},\"self()\":{\"notice\":\"Contract address to which clones will be re-directed.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project:/contracts/patterns/Clonable.sol\":\"Clonable\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"keccak256\":\"0x631188737069917d2f909d29ce62c4d48611d326686ba6683e26b72a23bfac0b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7a61054ae84cd6c4d04c0c4450ba1d6de41e27e0a2c4f1bcdf58f796b401c609\",\"dweb:/ipfs/QmUvtdp7X1mRVyC3CsHrtPbgoqWaXHp3S1ZR24tpAQYJWM\"]},\"project:/contracts/patterns/Clonable.sol\":{\"keccak256\":\"0xdfaf080d882e5b4f5e419da4ed2a5f1f0367eb2449b37b9d62d6b3d5649c3b6a\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ed194f0ddb44f9c2e14156090f1f43c055d4fda23115041ab928da9ca538f6ed\",\"dweb:/ipfs/QmZnD4Z9yrT1SY5HTZagwv1bT9FJfsgmntZHf9qzLwDX7K\"]},\"project:/contracts/patterns/Initializable.sol\":{\"keccak256\":\"0xaac470e87f361cf15d68d1618d6eb7d4913885d33ccc39c797841a9591d44296\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ef3760b2039feda8715d4bd9f8de8e3885f25573d12ba92f52d626ba880a08bf\",\"dweb:/ipfs/QmP2mfHPBKkjTAKft95sPDb4PBsjfmAwc47Kdcv3xYSf3g\"]}},\"version\":1}", "bytecode": "0x", "deployedBytecode": "0x", "immutableReferences": {}, "generatedSources": [], "deployedGeneratedSources": [], "sourceMap": "", "deployedSourceMap": "", "source": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity >=0.6.0 <0.9.0;\r\n\r\nimport \"./Initializable.sol\";\r\n\r\nabstract contract Clonable\r\n is\r\n Initializable\r\n{\r\n address immutable internal _SELF = address(this);\r\n\r\n event Cloned(address indexed by, address indexed self, address indexed clone);\r\n\r\n modifier onlyDelegateCalls virtual {\r\n require(address(this) != _SELF, \"Clonable: not a delegate call\");\r\n _;\r\n }\r\n\r\n modifier wasInitialized {\r\n require(initialized(), \"Clonable: not initialized\");\r\n _;\r\n }\r\n\r\n /// @notice Tells whether this contract is a clone of `self()`\r\n function cloned()\r\n public view\r\n returns (bool)\r\n {\r\n return (\r\n address(this) != self()\r\n );\r\n }\r\n\r\n /// @notice Tells whether this instance has been initialized.\r\n function initialized() virtual public view returns (bool);\r\n\r\n /// @notice Contract address to which clones will be re-directed.\r\n function self() virtual public view returns (address) {\r\n return _SELF;\r\n }\r\n\r\n /// Deploys and returns the address of a minimal proxy clone that replicates contract\r\n /// behaviour while using its own EVM storage.\r\n /// @dev This function should always provide a new address, no matter how many times \r\n /// @dev is actually called from the same `msg.sender`.\r\n /// @dev See https://eips.ethereum.org/EIPS/eip-1167.\r\n /// @dev See https://blog.openzeppelin.com/deep-dive-into-the-minimal-proxy-contract/.\r\n function _clone()\r\n internal\r\n returns (address _instance)\r\n {\r\n bytes memory ptr = _cloneBytecodePtr();\r\n assembly {\r\n // CREATE new instance:\r\n _instance := create(0, ptr, 0x37)\r\n } \r\n require(_instance != address(0), \"Clonable: CREATE failed\");\r\n emit Cloned(msg.sender, self(), _instance);\r\n }\r\n\r\n /// @notice Returns minimal proxy's deploy bytecode.\r\n function _cloneBytecode()\r\n virtual internal view\r\n returns (bytes memory)\r\n {\r\n return abi.encodePacked(\r\n hex\"3d602d80600a3d3981f3363d3d373d3d3d363d73\",\r\n bytes20(self()),\r\n hex\"5af43d82803e903d91602b57fd5bf3\"\r\n );\r\n }\r\n\r\n /// @notice Returns mem pointer to minimal proxy's deploy bytecode.\r\n function _cloneBytecodePtr()\r\n virtual internal view\r\n returns (bytes memory ptr)\r\n {\r\n address _base = self();\r\n assembly {\r\n // ptr to free mem:\r\n ptr := mload(0x40)\r\n // begin minimal proxy construction bytecode:\r\n mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)\r\n // make minimal proxy delegate all calls to `self()`:\r\n mstore(add(ptr, 0x14), shl(0x60, _base))\r\n // end minimal proxy construction bytecode:\r\n mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000)\r\n }\r\n }\r\n\r\n /// Deploys and returns the address of a minimal proxy clone that replicates contract \r\n /// behaviour while using its own EVM storage.\r\n /// @dev This function uses the CREATE2 opcode and a `_salt` to deterministically deploy\r\n /// @dev the clone. Using the same `_salt` multiple times will revert, since\r\n /// @dev no contract can be deployed more than once at the same address.\r\n /// @dev See https://eips.ethereum.org/EIPS/eip-1167.\r\n /// @dev See https://blog.openzeppelin.com/deep-dive-into-the-minimal-proxy-contract/.\r\n function _cloneDeterministic(bytes32 _salt)\r\n virtual internal\r\n returns (address _instance)\r\n {\r\n bytes memory ptr = _cloneBytecodePtr();\r\n assembly {\r\n // CREATE2 new instance:\r\n _instance := create2(0, ptr, 0x37, _salt)\r\n }\r\n require(_instance != address(0), \"Clonable: CREATE2 failed\");\r\n emit Cloned(msg.sender, self(), _instance);\r\n }\r\n}", "sourcePath": "C:\\Users\\guill\\github\\witnet\\witnet-solidity-bridge\\contracts\\patterns\\Clonable.sol", "ast": { "absolutePath": "project:/contracts/patterns/Clonable.sol", "exportedSymbols": { "Clonable": [ 24003 ], "Initializable": [ 253 ] }, "id": 24004, "license": "MIT", "nodeType": "SourceUnit", "nodes": [ { "id": 23835, "literals": [ "solidity", ">=", "0.6", ".0", "<", "0.9", ".0" ], "nodeType": "PragmaDirective", "src": "35:31:76" }, { "absolutePath": "project:/contracts/patterns/Initializable.sol", "file": "./Initializable.sol", "id": 23836, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 24004, "sourceUnit": 24007, "src": "70:29:76", "symbolAliases": [], "unitAlias": "" }, { "abstract": true, "baseContracts": [ { "baseName": { "id": 23837, "name": "Initializable", "nameLocations": [ "147:13:76" ], "nodeType": "IdentifierPath", "referencedDeclaration": 253, "src": "147:13:76" }, "id": 23838, "nodeType": "InheritanceSpecifier", "src": "147:13:76" } ], "canonicalName": "Clonable", "contractDependencies": [], "contractKind": "contract", "fullyImplemented": false, "id": 24003, "linearizedBaseContracts": [ 24003, 253 ], "name": "Clonable", "nameLocation": "121:8:76", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 23844, "mutability": "immutable", "name": "_SELF", "nameLocation": "196:5:76", "nodeType": "VariableDeclaration", "scope": 24003, "src": "169:48:76", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 23839, "name": "address", "nodeType": "ElementaryTypeName", "src": "169:7:76", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": { "arguments": [ { "id": 23842, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4294967268, "src": "212:4:76", "typeDescriptions": { "typeIdentifier": "t_contract$_Clonable_$24003", "typeString": "contract Clonable" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_contract$_Clonable_$24003", "typeString": "contract Clonable" } ], "id": 23841, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "204:7:76", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { "id": 23840, "name": "address", "nodeType": "ElementaryTypeName", "src": "204:7:76", "typeDescriptions": {} } }, "id": 23843, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "204:13:76", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" }, { "anonymous": false, "eventSelector": "f376596be5039d6b2fb36fead4c8a370eae426e790a869be8db074ab608cc248", "id": 23852, "name": "Cloned", "nameLocation": "232:6:76", "nodeType": "EventDefinition", "parameters": { "id": 23851, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 23846, "indexed": true, "mutability": "mutable", "name": "by", "nameLocation": "255:2:76", "nodeType": "VariableDeclaration", "scope": 23852, "src": "239:18:76", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 23845, "name": "address", "nodeType": "ElementaryTypeName", "src": "239:7:76", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" }, { "constant": false, "id": 23848, "indexed": true, "mutability": "mutable", "name": "self", "nameLocation": "275:4:76", "nodeType": "VariableDeclaration", "scope": 23852, "src": "259:20:76", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 23847, "name": "address", "nodeType": "ElementaryTypeName", "src": "259:7:76", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" }, { "constant": false, "id": 23850, "indexed": true, "mutability": "mutable", "name": "clone", "nameLocation": "297:5:76", "nodeType": "VariableDeclaration", "scope": 23852, "src": "281:21:76", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 23849, "name": "address", "nodeType": "ElementaryTypeName", "src": "281:7:76", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" } ], "src": "238:65:76" }, "src": "226:78:76" }, { "body": { "id": 23865, "nodeType": "Block", "src": "347:95:76", "statements": [ { "expression": { "arguments": [ { "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 23860, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "arguments": [ { "id": 23857, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4294967268, "src": "374:4:76", "typeDescriptions": { "typeIdentifier": "t_contract$_Clonable_$24003", "typeString": "contract Clonable" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_contract$_Clonable_$24003", "typeString": "contract Clonable" } ], "id": 23856, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "366:7:76", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { "id": 23855, "name": "address", "nodeType": "ElementaryTypeName", "src": "366:7:76", "typeDescriptions": {} } }, "id": 23858, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "366:13:76", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { "id": 23859, "name": "_SELF", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 23844, "src": "383:5:76", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "366:22:76", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "hexValue": "436c6f6e61626c653a206e6f7420612064656c65676174652063616c6c", "id": 23861, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "390:31:76", "typeDescriptions": { "typeIdentifier": "t_stringliteral_b6a1122071e92f90224e417e2cb497d39f585d67396ea1fbd7e68cd4a26d5ef3", "typeString": "literal_string \"Clonable: not a delegate call\"" }, "value": "Clonable: not a delegate call" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_b6a1122071e92f90224e417e2cb497d39f585d67396ea1fbd7e68cd4a26d5ef3", "typeString": "literal_string \"Clonable: not a delegate call\"" } ], "id": 23854, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 4294967278, 4294967278 ], "referencedDeclaration": 4294967278, "src": "358:7:76", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 23862, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "358:64:76", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 23863, "nodeType": "ExpressionStatement", "src": "358:64:76" }, { "id": 23864, "nodeType": "PlaceholderStatement", "src": "433:1:76" } ] }, "id": 23866, "name": "onlyDelegateCalls", "nameLocation": "321:17:76", "nodeType": "ModifierDefinition", "parameters": { "id": 23853, "nodeType": "ParameterList", "parameters": [], "src": "339:0:76" }, "src": "312:130:76", "virtual": true, "visibility": "internal" }, { "body": { "id": 23875, "nodeType": "Block", "src": "474:82:76", "statements": [ { "expression": { "arguments": [ { "arguments": [], "expression": { "argumentTypes": [], "id": 23869, "name": "initialized", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 23898, "src": "493:11:76", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", "typeString": "function () view returns (bool)" } }, "id": 23870, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "493:13:76", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "hexValue": "436c6f6e61626c653a206e6f7420696e697469616c697a6564", "id": 23871, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "508:27:76", "typeDescriptions": { "typeIdentifier": "t_stringliteral_ce61f321a906d42c94add0f81a303e335ce4d3c44e707c18568ea10a1470b252", "typeString": "literal_string \"Clonable: not initialized\"" }, "value": "Clonable: not initialized" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_ce61f321a906d42c94add0f81a303e335ce4d3c44e707c18568ea10a1470b252", "typeString": "literal_string \"Clonable: not initialized\"" } ], "id": 23868, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 4294967278, 4294967278 ], "referencedDeclaration": 4294967278, "src": "485:7:76", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 23872, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "485:51:76", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 23873, "nodeType": "ExpressionStatement", "src": "485:51:76" }, { "id": 23874, "nodeType": "PlaceholderStatement", "src": "547:1:76" } ] }, "id": 23876, "name": "wasInitialized", "nameLocation": "459:14:76", "nodeType": "ModifierDefinition", "parameters": { "id": 23867, "nodeType": "ParameterList", "parameters": [], "src": "474:0:76" }, "src": "450:106:76", "virtual": false, "visibility": "internal" }, { "body": { "id": 23891, "nodeType": "Block", "src": "700:75:76", "statements": [ { "expression": { "components": [ { "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 23888, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "arguments": [ { "id": 23884, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4294967268, "src": "741:4:76", "typeDescriptions": { "typeIdentifier": "t_contract$_Clonable_$24003", "typeString": "contract Clonable" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_contract$_Clonable_$24003", "typeString": "contract Clonable" } ], "id": 23883, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "733:7:76", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { "id": 23882, "name": "address", "nodeType": "ElementaryTypeName", "src": "733:7:76", "typeDescriptions": {} } }, "id": 23885, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "733:13:76", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { "arguments": [], "expression": { "argumentTypes": [], "id": 23886, "name": "self", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 23907, "src": "750:4:76", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", "typeString": "function () view returns (address)" } }, "id": 23887, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "750:6:76", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "733:23:76", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "id": 23889, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "718:49:76", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "functionReturnParameters": 23881, "id": 23890, "nodeType": "Return", "src": "711:56:76" } ] }, "documentation": { "id": 23877, "nodeType": "StructuredDocumentation", "src": "564:62:76", "text": "@notice Tells whether this contract is a clone of `self()`" }, "functionSelector": "a04daef0", "id": 23892, "implemented": true, "kind": "function", "modifiers": [], "name": "cloned", "nameLocation": "641:6:76", "nodeType": "FunctionDefinition", "parameters": { "id": 23878, "nodeType": "ParameterList", "parameters": [], "src": "647:2:76" }, "returnParameters": { "id": 23881, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 23880, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 23892, "src": "689:4:76", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 23879, "name": "bool", "nodeType": "ElementaryTypeName", "src": "689:4:76", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "visibility": "internal" } ], "src": "688:6:76" }, "scope": 24003, "src": "632:143:76", "stateMutability": "view", "virtual": false, "visibility": "public" }, { "documentation": { "id": 23893, "nodeType": "StructuredDocumentation", "src": "783:61:76", "text": "@notice Tells whether this instance has been initialized." }, "functionSelector": "158ef93e", "id": 23898, "implemented": false, "kind": "function", "modifiers": [], "name": "initialized", "nameLocation": "859:11:76", "nodeType": "FunctionDefinition", "parameters": { "id": 23894, "nodeType": "ParameterList", "parameters": [], "src": "870:2:76" }, "returnParameters": { "id": 23897, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 23896, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 23898, "src": "902:4:76", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 23895, "name": "bool", "nodeType": "ElementaryTypeName", "src": "902:4:76", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "visibility": "internal" } ], "src": "901:6:76" }, "scope": 24003, "src": "850:58:76", "stateMutability": "view", "virtual": true, "visibility": "public" }, { "body": { "id": 23906, "nodeType": "Block", "src": "1041:31:76", "statements": [ { "expression": { "id": 23904, "name": "_SELF", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 23844, "src": "1059:5:76", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "functionReturnParameters": 23903, "id": 23905, "nodeType": "Return", "src": "1052:12:76" } ] }, "documentation": { "id": 23899, "nodeType": "StructuredDocumentation", "src": "916:65:76", "text": "@notice Contract address to which clones will be re-directed." }, "functionSelector": "7104ddb2", "id": 23907, "implemented": true, "kind": "function", "modifiers": [], "name": "self", "nameLocation": "996:4:76", "nodeType": "FunctionDefinition", "parameters": { "id": 23900, "nodeType": "ParameterList", "parameters": [], "src": "1000:2:76" }, "returnParameters": { "id": 23903, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 23902, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 23907, "src": "1032:7:76", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 23901, "name": "address", "nodeType": "ElementaryTypeName", "src": "1032:7:76", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" } ], "src": "1031:9:76" }, "scope": 24003, "src": "987:85:76", "stateMutability": "view", "virtual": true, "visibility": "public" }, { "body": { "id": 23937, "nodeType": "Block", "src": "1604:303:76", "statements": [ { "assignments": [ 23914 ], "declarations": [ { "constant": false, "id": 23914, "mutability": "mutable", "name": "ptr", "nameLocation": "1628:3:76", "nodeType": "VariableDeclaration", "scope": 23937, "src": "1615:16:76", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes" }, "typeName": { "id": 23913, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "1615:5:76", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "visibility": "internal" } ], "id": 23917, "initialValue": { "arguments": [], "expression": { "argumentTypes": [], "id": 23915, "name": "_cloneBytecodePtr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 23969, "src": "1634:17:76", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_bytes_memory_ptr_$", "typeString": "function () view returns (bytes memory)" } }, "id": 23916, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1634:19:76", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } }, "nodeType": "VariableDeclarationStatement", "src": "1615:38:76" }, { "AST": { "nativeSrc": "1673:96:76", "nodeType": "YulBlock", "src": "1673:96:76", "statements": [ { "nativeSrc": "1725:33:76", "nodeType": "YulAssignment", "src": "1725:33:76", "value": { "arguments": [ { "kind": "number", "nativeSrc": "1745:1:76", "nodeType": "YulLiteral", "src": "1745:1:76", "type": "", "value": "0" }, { "name": "ptr", "nativeSrc": "1748:3:76", "nodeType": "YulIdentifier", "src": "1748:3:76" }, { "kind": "number", "nativeSrc": "1753:4:76", "nodeType": "YulLiteral", "src": "1753:4:76", "type": "", "value": "0x37" } ], "functionName": { "name": "create", "nativeSrc": "1738:6:76", "nodeType": "YulIdentifier", "src": "1738:6:76" }, "nativeSrc": "1738:20:76", "nodeType": "YulFunctionCall", "src": "1738:20:76" }, "variableNames": [ { "name": "_instance", "nativeSrc": "1725:9:76", "nodeType": "YulIdentifier", "src": "1725:9:76" } ] } ] }, "evmVersion": "paris", "externalReferences": [ { "declaration": 23911, "isOffset": false, "isSlot": false, "src": "1725:9:76", "valueSize": 1 }, { "declaration": 23914, "isOffset": false, "isSlot": false, "src": "1748:3:76", "valueSize": 1 } ], "id": 23918, "nodeType": "InlineAssembly", "src": "1664:105:76" }, { "expression": { "arguments": [ {