UNPKG

witnet-solidity-bridge

Version:

Witnet Solidity Bridge contracts for EVM-compatible chains

1,037 lines (1,036 loc) 106 kB
{ "contractName": "Create3", "abi": [], "metadata": "{\"compiler\":{\"version\":\"0.8.25+commit.b61c2a91\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"author\":\"Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/CREATE3.sol)0xSequence (https://github.com/0xSequence/create3/blob/master/contracts/Create3.sol)\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"Deploy to deterministic addresses without an initcode factor.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"project:/contracts/libs/Create3.sol\":\"Create3\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"project:/contracts/libs/Create3.sol\":{\"keccak256\":\"0xfbda4c773f859bef9d7878ca9412f244da85f7bd49df07c49a17544f4708d718\",\"license\":\"AGPL-3.0-only\",\"urls\":[\"bzz-raw://0f83b72ad1c35c707cc6daa4e8266d9d711f561a188fbb0be1885d3f08146ca6\",\"dweb:/ipfs/QmPJwdieqkxoSvqmczAtRMfb5EN8uWiabqMKj4yVqsUncv\"]}},\"version\":1}", "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220cccebb011cad25fb41a2f2301e766a29c0a65f217111a55f4cd5532b5910086564736f6c63430008190033", "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220cccebb011cad25fb41a2f2301e766a29c0a65f217111a55f4cd5532b5910086564736f6c63430008190033", "immutableReferences": {}, "generatedSources": [], "deployedGeneratedSources": [], "sourceMap": "345:5836:62:-:0;;;;;;;;;;;;;;;-1:-1:-1;;;345:5836:62;;;;;;;;;;;;;;;;;", "deployedSourceMap": "345:5836:62:-:0;;;;;;;;", "source": "// SPDX-License-Identifier: AGPL-3.0-only\r\n\r\npragma solidity ^0.8.0;\r\n\r\n/// @notice Deploy to deterministic addresses without an initcode factor.\r\n/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/CREATE3.sol)\r\n/// @author 0xSequence (https://github.com/0xSequence/create3/blob/master/contracts/Create3.sol)\r\n\r\nlibrary Create3 {\r\n\r\n //--------------------------------------------------------------------------------//\r\n // Opcode | Opcode + Arguments | Description | Stack View //\r\n //--------------------------------------------------------------------------------//\r\n // 0x36 | 0x36 | CALLDATASIZE | size //\r\n // 0x3d | 0x3d | RETURNDATASIZE | 0 size //\r\n // 0x3d | 0x3d | RETURNDATASIZE | 0 0 size //\r\n // 0x37 | 0x37 | CALLDATACOPY | //\r\n // 0x36 | 0x36 | CALLDATASIZE | size //\r\n // 0x3d | 0x3d | RETURNDATASIZE | 0 size //\r\n // 0x34 | 0x34 | CALLVALUE | value 0 size //\r\n // 0xf0 | 0xf0 | CREATE | newContract //\r\n //--------------------------------------------------------------------------------//\r\n // Opcode | Opcode + Arguments | Description | Stack View //\r\n //--------------------------------------------------------------------------------//\r\n // 0x67 | 0x67XXXXXXXXXXXXXXXX | PUSH8 bytecode | bytecode //\r\n // 0x3d | 0x3d | RETURNDATASIZE | 0 bytecode //\r\n // 0x52 | 0x52 | MSTORE | //\r\n // 0x60 | 0x6008 | PUSH1 08 | 8 //\r\n // 0x60 | 0x6018 | PUSH1 18 | 24 8 //\r\n // 0xf3 | 0xf3 | RETURN | //\r\n //--------------------------------------------------------------------------------//\r\n \r\n bytes internal constant CREATE3_FACTORY_BYTECODE = hex\"67_36_3d_3d_37_36_3d_34_f0_3d_52_60_08_60_18_f3\";\r\n bytes32 internal constant CREATE3_FACTORY_CODEHASH = keccak256(CREATE3_FACTORY_BYTECODE);\r\n\r\n /// @notice Creates a new contract with given `_creationCode` and `_salt`\r\n /// @param _salt Salt of the contract creation, resulting address will be derivated from this value only\r\n /// @param _creationCode Creation code (constructor) of the contract to be deployed, this value doesn't affect the resulting address\r\n /// @return addr of the deployed contract, reverts on error\r\n function deploy(bytes32 _salt, bytes memory _creationCode)\r\n internal \r\n returns (address)\r\n {\r\n return deploy(_salt, _creationCode, 0);\r\n }\r\n\r\n /// @notice Creates a new contract with given `_creationCode`, `_salt` and `_value`. \r\n /// @param _salt Salt of the contract creation, resulting address will be derivated from this value only\r\n /// @param _creationCode Creation code (constructor) of the contract to be deployed, this value doesn't affect the resulting address\r\n /// @param _value In WEI of ETH to be forwarded to child contract\r\n /// @return _deployed The address of the deployed contract.\r\n function deploy(bytes32 _salt, bytes memory _creationCode, uint256 _value)\r\n internal\r\n returns (address _deployed)\r\n {\r\n // Get target final address\r\n _deployed = determineAddr(_salt);\r\n if (_deployed.code.length != 0) revert(\"Create3: target already exists\");\r\n\r\n // Create factory\r\n address _factory;\r\n bytes memory _factoryBytecode = CREATE3_FACTORY_BYTECODE;\r\n /// @solidity memory-safe-assembly\r\n assembly {\r\n // Deploy a factory contract with our pre-made bytecode via CREATE2.\r\n // We start 32 bytes into the code to avoid copying the byte length.\r\n _factory := create2(0, add(_factoryBytecode, 32), mload(_factoryBytecode), _salt)\r\n }\r\n require(_factory != address(0), \"Create3: error creating factory\"); \r\n\r\n // Use factory to deploy target\r\n (bool _success, ) = _factory.call{value: _value}(_creationCode);\r\n require(_success && _deployed.code.length != 0, \"Create3: error creating target\");\r\n }\r\n\r\n /// @notice Computes the resulting address of a contract deployed using address(this) and the given `_salt`\r\n /// @param _salt Salt of the contract creation, resulting address will be derivated from this value only\r\n /// @return addr of the deployed contract, reverts on error\r\n /// @dev The address creation formula is: keccak256(rlp([keccak256(0xff ++ address(this) ++ _salt ++ keccak256(childBytecode))[12:], 0x01]))\r\n function determineAddr(bytes32 _salt) internal view returns (address) {\r\n address _factory = address(\r\n uint160(\r\n uint256(\r\n keccak256(\r\n abi.encodePacked(\r\n hex'ff',\r\n address(this),\r\n _salt,\r\n CREATE3_FACTORY_CODEHASH\r\n )\r\n )\r\n )\r\n )\r\n );\r\n return address(\r\n uint160(\r\n uint256(\r\n keccak256(\r\n abi.encodePacked(\r\n // 0xd6 = 0xc0 (short RLP prefix) + 0x16 (length of: 0x94 ++ _factory ++ 0x01)\r\n // 0x94 = 0x80 + 0x14 (0x14 = the length of an address, 20 bytes, in hex)\r\n hex\"d6_94\",\r\n _factory,\r\n // _factory's nonce on which the target is created: 0x1\r\n hex\"01\"\r\n )\r\n )\r\n )\r\n )\r\n );\r\n }\r\n\r\n}", "sourcePath": "C:\\Users\\guill\\github\\witnet\\witnet-solidity-bridge\\contracts\\libs\\Create3.sol", "ast": { "absolutePath": "project:/contracts/libs/Create3.sol", "exportedSymbols": { "Create3": [ 14149 ] }, "id": 14150, "license": "AGPL-3.0-only", "nodeType": "SourceUnit", "nodes": [ { "id": 14004, "literals": [ "solidity", "^", "0.8", ".0" ], "nodeType": "PragmaDirective", "src": "45:23:62" }, { "abstract": false, "baseContracts": [], "canonicalName": "Create3", "contractDependencies": [], "contractKind": "library", "documentation": { "id": 14005, "nodeType": "StructuredDocumentation", "src": "72:271:62", "text": "@notice Deploy to deterministic addresses without an initcode factor.\n @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/CREATE3.sol)\n @author 0xSequence (https://github.com/0xSequence/create3/blob/master/contracts/Create3.sol)" }, "fullyImplemented": true, "id": 14149, "linearizedBaseContracts": [ 14149 ], "name": "Create3", "nameLocation": "353:7:62", "nodeType": "ContractDefinition", "nodes": [ { "constant": true, "id": 14008, "mutability": "constant", "name": "CREATE3_FACTORY_BYTECODE", "nameLocation": "2290:24:62", "nodeType": "VariableDeclaration", "scope": 14149, "src": "2266:103:62", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes" }, "typeName": { "id": 14006, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "2266:5:62", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "value": { "hexValue": "67363d3d37363d34f03d5260086018f3", "id": 14007, "isConstant": false, "isLValue": false, "isPure": true, "kind": "hexString", "lValueRequested": false, "nodeType": "Literal", "src": "2317:52:62", "typeDescriptions": { "typeIdentifier": "t_stringliteral_21c35dbe1b344a2488cf3321d6ce542f8e9f305544ff09e4993a62319a497c1f", "typeString": "literal_string hex\"67363d3d37363d34f03d5260086018f3\"" } }, "visibility": "internal" }, { "constant": true, "id": 14013, "mutability": "constant", "name": "CREATE3_FACTORY_CODEHASH", "nameLocation": "2402:24:62", "nodeType": "VariableDeclaration", "scope": 14149, "src": "2376:88:62", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 14009, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "2376:7:62", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "value": { "arguments": [ { "id": 14011, "name": "CREATE3_FACTORY_BYTECODE", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 14008, "src": "2439:24:62", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } ], "id": 14010, "name": "keccak256", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4294967288, "src": "2429:9:62", "typeDescriptions": { "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", "typeString": "function (bytes memory) pure returns (bytes32)" } }, "id": 14012, "isConstant": false, "isLValue": false, "isPure": true, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2429:35:62", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "visibility": "internal" }, { "body": { "id": 14029, "nodeType": "Block", "src": "2975:57:62", "statements": [ { "expression": { "arguments": [ { "id": 14024, "name": "_salt", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 14016, "src": "3000:5:62", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, { "id": 14025, "name": "_creationCode", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 14018, "src": "3007:13:62", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } }, { "hexValue": "30", "id": 14026, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "3022:1:62", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" }, { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" } ], "id": 14023, "name": "deploy", "nodeType": "Identifier", "overloadedDeclarations": [ 14030, 14097 ], "referencedDeclaration": 14097, "src": "2993:6:62", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_address_$", "typeString": "function (bytes32,bytes memory,uint256) returns (address)" } }, "id": 14027, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2993:31:62", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "functionReturnParameters": 14022, "id": 14028, "nodeType": "Return", "src": "2986:38:62" } ] }, "documentation": { "id": 14014, "nodeType": "StructuredDocumentation", "src": "2473:386:62", "text": "@notice Creates a new contract with given `_creationCode` and `_salt`\n @param _salt Salt of the contract creation, resulting address will be derivated from this value only\n @param _creationCode Creation code (constructor) of the contract to be deployed, this value doesn't affect the resulting address\n @return addr of the deployed contract, reverts on error" }, "id": 14030, "implemented": true, "kind": "function", "modifiers": [], "name": "deploy", "nameLocation": "2874:6:62", "nodeType": "FunctionDefinition", "parameters": { "id": 14019, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 14016, "mutability": "mutable", "name": "_salt", "nameLocation": "2889:5:62", "nodeType": "VariableDeclaration", "scope": 14030, "src": "2881:13:62", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 14015, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "2881:7:62", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "visibility": "internal" }, { "constant": false, "id": 14018, "mutability": "mutable", "name": "_creationCode", "nameLocation": "2909:13:62", "nodeType": "VariableDeclaration", "scope": 14030, "src": "2896:26:62", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes" }, "typeName": { "id": 14017, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "2896:5:62", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "visibility": "internal" } ], "src": "2880:43:62" }, "returnParameters": { "id": 14022, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 14021, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 14030, "src": "2961:7:62", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 14020, "name": "address", "nodeType": "ElementaryTypeName", "src": "2961:7:62", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" } ], "src": "2960:9:62" }, "scope": 14149, "src": "2865:167:62", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal" }, { "body": { "id": 14096, "nodeType": "Block", "src": "3650:921:62", "statements": [ { "expression": { "id": 14046, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "id": 14042, "name": "_deployed", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 14040, "src": "3698:9:62", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "arguments": [ { "id": 14044, "name": "_salt", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 14033, "src": "3724:5:62", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } ], "id": 14043, "name": "determineAddr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 14148, "src": "3710:13:62", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", "typeString": "function (bytes32) view returns (address)" } }, "id": 14045, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3710:20:62", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "3698:32:62", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 14047, "nodeType": "ExpressionStatement", "src": "3698:32:62" }, { "condition": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 14052, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "expression": { "expression": { "id": 14048, "name": "_deployed", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 14040, "src": "3745:9:62", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 14049, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "3755:4:62", "memberName": "code", "nodeType": "MemberAccess", "src": "3745:14:62", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } }, "id": 14050, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "3760:6:62", "memberName": "length", "nodeType": "MemberAccess", "src": "3745:21:62", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { "hexValue": "30", "id": 14051, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "3770:1:62", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "3745:26:62", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 14057, "nodeType": "IfStatement", "src": "3741:72:62", "trueBody": { "expression": { "arguments": [ { "hexValue": "437265617465333a2074617267657420616c726561647920657869737473", "id": 14054, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "3780:32:62", "typeDescriptions": { "typeIdentifier": "t_stringliteral_eff5890756d2c5621f001169bb16c941329db031eba2edbb4865370c160b3eae", "typeString": "literal_string \"Create3: target already exists\"" }, "value": "Create3: target already exists" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_stringliteral_eff5890756d2c5621f001169bb16c941329db031eba2edbb4865370c160b3eae", "typeString": "literal_string \"Create3: target already exists\"" } ], "id": 14053, "name": "revert", "nodeType": "Identifier", "overloadedDeclarations": [ 4294967277, 4294967277 ], "referencedDeclaration": 4294967277, "src": "3773:6:62", "typeDescriptions": { "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory) pure" } }, "id": 14055, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3773:40:62", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 14056, "nodeType": "ExpressionStatement", "src": "3773:40:62" } }, { "assignments": [ 14059 ], "declarations": [ { "constant": false, "id": 14059, "mutability": "mutable", "name": "_factory", "nameLocation": "3861:8:62", "nodeType": "VariableDeclaration", "scope": 14096, "src": "3853:16:62", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 14058, "name": "address", "nodeType": "ElementaryTypeName", "src": "3853:7:62", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" } ], "id": 14060, "nodeType": "VariableDeclarationStatement", "src": "3853:16:62" }, { "assignments": [ 14062 ], "declarations": [ { "constant": false, "id": 14062, "mutability": "mutable", "name": "_factoryBytecode", "nameLocation": "3893:16:62", "nodeType": "VariableDeclaration", "scope": 14096, "src": "3880:29:62", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes" }, "typeName": { "id": 14061, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "3880:5:62", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "visibility": "internal" } ], "id": 14064, "initialValue": { "id": 14063, "name": "CREATE3_FACTORY_BYTECODE", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 14008, "src": "3912:24:62", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } }, "nodeType": "VariableDeclarationStatement", "src": "3880:56:62" }, { "AST": { "nativeSrc": "4000:271:62", "nodeType": "YulBlock", "src": "4000:271:62", "statements": [ { "nativeSrc": "4179:81:62", "nodeType": "YulAssignment", "src": "4179:81:62", "value": { "arguments": [ { "kind": "number", "nativeSrc": "4199:1:62", "nodeType": "YulLiteral", "src": "4199:1:62", "type": "", "value": "0" }, { "arguments": [ { "name": "_factoryBytecode", "nativeSrc": "4206:16:62", "nodeType": "YulIdentifier", "src": "4206:16:62" }, { "kind": "number", "nativeSrc": "4224:2:62", "nodeType": "YulLiteral", "src": "4224:2:62", "type": "", "value": "32" } ], "functionName": { "name": "add", "nativeSrc": "4202:3:62", "nodeType": "YulIdentifier", "src": "4202:3:62" }, "nativeSrc": "4202:25:62", "nodeType": "YulFunctionCall", "src": "4202:25:62" }, { "arguments": [ { "name": "_factoryBytecode", "nativeSrc": "4235:16:62", "nodeType": "YulIdentifier", "src": "4235:16:62" } ], "functionName": { "name": "mload", "nativeSrc": "4229:5:62", "nodeType": "YulIdentifier", "src": "4229:5:62" }, "nativeSrc": "4229:23:62", "nodeType": "YulFunctionCall", "src": "4229:23:62" }, { "name": "_salt", "nativeSrc": "4254:5:62", "nodeType": "YulIdentifier", "src": "4254:5:62" } ], "functionName": { "name": "create2", "nativeSrc": "4191:7:62", "nodeType": "YulIdentifier", "src": "4191:7:62" }, "nativeSrc": "4191:69:62", "nodeType": "YulFunctionCall", "src": "4191:69:62" }, "variableNames": [ { "name": "_factory", "nativeSrc": "4179:8:62", "nodeType": "YulIdentifier", "src": "4179:8:62" } ] } ] }, "documentation": "@solidity memory-safe-assembly", "evmVersion": "paris", "externalReferences": [ { "declaration": 14059, "isOffset": false, "isSlot": false, "src": "4179:8:62", "valueSize": 1 }, { "declaration": 14062, "isOffset": false, "isSlot": false, "src": "4206:16:62", "valueSize": 1 }, { "declaration": 14062, "isOffset": false, "isSlot": false, "src": "4235:16:62", "valueSize": 1 }, { "declaration": 14033, "isOffset": false, "isSlot": false, "src": "4254:5:62", "valueSize": 1 } ], "id": 14065, "nodeType": "InlineAssembly", "src": "3991:280:62" }, { "expression": { "arguments": [ { "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 14072, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 14067, "name": "_factory", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 14059, "src": "4289:8:62", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { "arguments": [ { "hexValue": "30", "id": 14070, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "4309:1:62", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" } ], "id": 14069, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "4301:7:62", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { "id": 14068, "name": "address", "nodeType": "ElementaryTypeName", "src": "4301:7:62", "typeDescriptions": {} } }, "id": 14071, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "4301:10:62", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "4289:22:62", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "hexValue": "437265617465333a206572726f72206372656174696e6720666163746f7279", "id": 14073, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "4313:33:62", "typeDescriptions": { "typeIdentifier": "t_stringliteral_9c800ce8d486c3397a1a9cc324cfcd264ced53e7b922ccf3390ef85c645102b0", "typeString": "literal_string \"Create3: error creating factory\"" }, "value": "Create3: error creating factory" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_9c800ce8d486c3397a1a9cc324cfcd264ced53e7b922ccf3390ef85c645102b0", "typeString": "literal_string \"Create3: error creating factory\"" } ], "id": 14066, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 4294967278, 4294967278 ], "referencedDeclaration": 4294967278, "src": "4281:7:62", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 14074, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "4281:66:62", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 14075, "nodeType": "ExpressionStatement", "src": "4281:66:62" }, { "assignments": [ 14077, null ], "declarations": [ { "constant": false, "id": 14077, "mutability": "mutable", "name": "_success", "nameLocation": "4414:8:62", "nodeType": "VariableDeclaration", "scope": 14096, "src": "4409:13:62", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 14076, "name": "bool", "nodeType": "ElementaryTypeName", "src": "4409:4:62", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "visibility": "internal" }, null ], "id": 14084, "initialValue": { "arguments": [ { "id": 14082, "name": "_creationCode", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 14035,