UNPKG

witnet-solidity-bridge

Version:

Witnet Solidity Bridge contracts for EVM-compatible chains

1,035 lines 106 kB
{ "contractName": "Create3", "abi": [], "metadata": "{\"compiler\":{\"version\":\"0.8.30+commit.73712a01\"},\"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\":\"prague\",\"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": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212209f14c3ade86fd1eed47c2fc3e1c5dfc339921444a7c6a78023088f84e2207cbb64736f6c634300081e0033", "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212209f14c3ade86fd1eed47c2fc3e1c5dfc339921444a7c6a78023088f84e2207cbb64736f6c634300081e0033", "immutableReferences": {}, "generatedSources": [], "deployedGeneratedSources": [], "sourceMap": "345:5836:111:-:0;;;;;;;;;;;;;;;-1:-1:-1;;;345:5836:111;;;;;;;;;;;;;;;;;", "deployedSourceMap": "345:5836:111:-: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\\guidiaz\\witnet-solidity-bridge\\contracts\\libs\\Create3.sol", "ast": { "absolutePath": "project:/contracts/libs/Create3.sol", "exportedSymbols": { "Create3": [ 31519 ] }, "id": 31520, "license": "AGPL-3.0-only", "nodeType": "SourceUnit", "nodes": [ { "id": 31374, "literals": [ "solidity", "^", "0.8", ".0" ], "nodeType": "PragmaDirective", "src": "45:23:111" }, { "abstract": false, "baseContracts": [], "canonicalName": "Create3", "contractDependencies": [], "contractKind": "library", "documentation": { "id": 31375, "nodeType": "StructuredDocumentation", "src": "72:271:111", "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": 31519, "linearizedBaseContracts": [ 31519 ], "name": "Create3", "nameLocation": "353:7:111", "nodeType": "ContractDefinition", "nodes": [ { "constant": true, "id": 31378, "mutability": "constant", "name": "CREATE3_FACTORY_BYTECODE", "nameLocation": "2290:24:111", "nodeType": "VariableDeclaration", "scope": 31519, "src": "2266:103:111", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes" }, "typeName": { "id": 31376, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "2266:5:111", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "value": { "hexValue": "67363d3d37363d34f03d5260086018f3", "id": 31377, "isConstant": false, "isLValue": false, "isPure": true, "kind": "hexString", "lValueRequested": false, "nodeType": "Literal", "src": "2317:52:111", "typeDescriptions": { "typeIdentifier": "t_stringliteral_21c35dbe1b344a2488cf3321d6ce542f8e9f305544ff09e4993a62319a497c1f", "typeString": "literal_string hex\"67363d3d37363d34f03d5260086018f3\"" } }, "visibility": "internal" }, { "constant": true, "id": 31383, "mutability": "constant", "name": "CREATE3_FACTORY_CODEHASH", "nameLocation": "2402:24:111", "nodeType": "VariableDeclaration", "scope": 31519, "src": "2376:88:111", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 31379, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "2376:7:111", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "value": { "arguments": [ { "id": 31381, "name": "CREATE3_FACTORY_BYTECODE", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 31378, "src": "2439:24:111", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } ], "id": 31380, "name": "keccak256", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4294967288, "src": "2429:9:111", "typeDescriptions": { "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", "typeString": "function (bytes memory) pure returns (bytes32)" } }, "id": 31382, "isConstant": false, "isLValue": false, "isPure": true, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2429:35:111", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "visibility": "internal" }, { "body": { "id": 31399, "nodeType": "Block", "src": "2975:57:111", "statements": [ { "expression": { "arguments": [ { "id": 31394, "name": "_salt", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 31386, "src": "3000:5:111", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, { "id": 31395, "name": "_creationCode", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 31388, "src": "3007:13:111", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } }, { "hexValue": "30", "id": 31396, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "3022:1:111", "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": 31393, "name": "deploy", "nodeType": "Identifier", "overloadedDeclarations": [ 31400, 31467 ], "referencedDeclaration": 31467, "src": "2993:6:111", "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": 31397, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2993:31:111", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "functionReturnParameters": 31392, "id": 31398, "nodeType": "Return", "src": "2986:38:111" } ] }, "documentation": { "id": 31384, "nodeType": "StructuredDocumentation", "src": "2473:386:111", "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": 31400, "implemented": true, "kind": "function", "modifiers": [], "name": "deploy", "nameLocation": "2874:6:111", "nodeType": "FunctionDefinition", "parameters": { "id": 31389, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 31386, "mutability": "mutable", "name": "_salt", "nameLocation": "2889:5:111", "nodeType": "VariableDeclaration", "scope": 31400, "src": "2881:13:111", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 31385, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "2881:7:111", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "visibility": "internal" }, { "constant": false, "id": 31388, "mutability": "mutable", "name": "_creationCode", "nameLocation": "2909:13:111", "nodeType": "VariableDeclaration", "scope": 31400, "src": "2896:26:111", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes" }, "typeName": { "id": 31387, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "2896:5:111", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "visibility": "internal" } ], "src": "2880:43:111" }, "returnParameters": { "id": 31392, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 31391, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 31400, "src": "2961:7:111", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 31390, "name": "address", "nodeType": "ElementaryTypeName", "src": "2961:7:111", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" } ], "src": "2960:9:111" }, "scope": 31519, "src": "2865:167:111", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal" }, { "body": { "id": 31466, "nodeType": "Block", "src": "3650:921:111", "statements": [ { "expression": { "id": 31416, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "id": 31412, "name": "_deployed", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 31410, "src": "3698:9:111", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "arguments": [ { "id": 31414, "name": "_salt", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 31403, "src": "3724:5:111", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } ], "id": 31413, "name": "determineAddr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 31518, "src": "3710:13:111", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", "typeString": "function (bytes32) view returns (address)" } }, "id": 31415, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3710:20:111", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "3698:32:111", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 31417, "nodeType": "ExpressionStatement", "src": "3698:32:111" }, { "condition": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 31422, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "expression": { "expression": { "id": 31418, "name": "_deployed", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 31410, "src": "3745:9:111", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 31419, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "3755:4:111", "memberName": "code", "nodeType": "MemberAccess", "src": "3745:14:111", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } }, "id": 31420, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "3760:6:111", "memberName": "length", "nodeType": "MemberAccess", "src": "3745:21:111", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { "hexValue": "30", "id": 31421, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "3770:1:111", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "3745:26:111", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 31427, "nodeType": "IfStatement", "src": "3741:72:111", "trueBody": { "expression": { "arguments": [ { "hexValue": "437265617465333a2074617267657420616c726561647920657869737473", "id": 31424, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "3780:32:111", "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": 31423, "name": "revert", "nodeType": "Identifier", "overloadedDeclarations": [ 4294967277, 4294967277 ], "referencedDeclaration": 4294967277, "src": "3773:6:111", "typeDescriptions": { "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory) pure" } }, "id": 31425, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "3773:40:111", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 31426, "nodeType": "ExpressionStatement", "src": "3773:40:111" } }, { "assignments": [ 31429 ], "declarations": [ { "constant": false, "id": 31429, "mutability": "mutable", "name": "_factory", "nameLocation": "3861:8:111", "nodeType": "VariableDeclaration", "scope": 31466, "src": "3853:16:111", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 31428, "name": "address", "nodeType": "ElementaryTypeName", "src": "3853:7:111", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" } ], "id": 31430, "nodeType": "VariableDeclarationStatement", "src": "3853:16:111" }, { "assignments": [ 31432 ], "declarations": [ { "constant": false, "id": 31432, "mutability": "mutable", "name": "_factoryBytecode", "nameLocation": "3893:16:111", "nodeType": "VariableDeclaration", "scope": 31466, "src": "3880:29:111", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes" }, "typeName": { "id": 31431, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "3880:5:111", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "visibility": "internal" } ], "id": 31434, "initialValue": { "id": 31433, "name": "CREATE3_FACTORY_BYTECODE", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 31378, "src": "3912:24:111", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } }, "nodeType": "VariableDeclarationStatement", "src": "3880:56:111" }, { "AST": { "nativeSrc": "4000:271:111", "nodeType": "YulBlock", "src": "4000:271:111", "statements": [ { "nativeSrc": "4179:81:111", "nodeType": "YulAssignment", "src": "4179:81:111", "value": { "arguments": [ { "kind": "number", "nativeSrc": "4199:1:111", "nodeType": "YulLiteral", "src": "4199:1:111", "type": "", "value": "0" }, { "arguments": [ { "name": "_factoryBytecode", "nativeSrc": "4206:16:111", "nodeType": "YulIdentifier", "src": "4206:16:111" }, { "kind": "number", "nativeSrc": "4224:2:111", "nodeType": "YulLiteral", "src": "4224:2:111", "type": "", "value": "32" } ], "functionName": { "name": "add", "nativeSrc": "4202:3:111", "nodeType": "YulIdentifier", "src": "4202:3:111" }, "nativeSrc": "4202:25:111", "nodeType": "YulFunctionCall", "src": "4202:25:111" }, { "arguments": [ { "name": "_factoryBytecode", "nativeSrc": "4235:16:111", "nodeType": "YulIdentifier", "src": "4235:16:111" } ], "functionName": { "name": "mload", "nativeSrc": "4229:5:111", "nodeType": "YulIdentifier", "src": "4229:5:111" }, "nativeSrc": "4229:23:111", "nodeType": "YulFunctionCall", "src": "4229:23:111" }, { "name": "_salt", "nativeSrc": "4254:5:111", "nodeType": "YulIdentifier", "src": "4254:5:111" } ], "functionName": { "name": "create2", "nativeSrc": "4191:7:111", "nodeType": "YulIdentifier", "src": "4191:7:111" }, "nativeSrc": "4191:69:111", "nodeType": "YulFunctionCall", "src": "4191:69:111" }, "variableNames": [ { "name": "_factory", "nativeSrc": "4179:8:111", "nodeType": "YulIdentifier", "src": "4179:8:111" } ] } ] }, "documentation": "@solidity memory-safe-assembly", "evmVersion": "prague", "externalReferences": [ { "declaration": 31429, "isOffset": false, "isSlot": false, "src": "4179:8:111", "valueSize": 1 }, { "declaration": 31432, "isOffset": false, "isSlot": false, "src": "4206:16:111", "valueSize": 1 }, { "declaration": 31432, "isOffset": false, "isSlot": false, "src": "4235:16:111", "valueSize": 1 }, { "declaration": 31403, "isOffset": false, "isSlot": false, "src": "4254:5:111", "valueSize": 1 } ], "id": 31435, "nodeType": "InlineAssembly", "src": "3991:280:111" }, { "expression": { "arguments": [ { "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 31442, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 31437, "name": "_factory", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 31429, "src": "4289:8:111", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { "arguments": [ { "hexValue": "30", "id": 31440, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "4309:1:111", "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": 31439, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "4301:7:111", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { "id": 31438, "name": "address", "nodeType": "ElementaryTypeName", "src": "4301:7:111", "typeDescriptions": {} } }, "id": 31441, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "4301:10:111", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "4289:22:111", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "hexValue": "437265617465333a206572726f72206372656174696e6720666163746f7279", "id": 31443, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "4313:33:111", "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": 31436, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 4294967278, 4294967278, 4294967278 ], "referencedDeclaration": 4294967278, "src": "4281:7:111", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 31444, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "4281:66:111", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 31445, "nodeType": "ExpressionStatement", "src": "4281:66:111" }, { "assignments": [ 31447, null ], "declarations": [ { "constant": false, "id": 31447, "mutability": "mutable", "name": "_success", "nameLocation": "4414:8:111", "nodeType": "VariableDeclaration", "scope": 31466, "src": "4409:13:111", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 31446, "name": "bool", "nodeType": "ElementaryTypeName", "src": "4409:4:111", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "visibility": "internal" }, null ], "id": 31454, "initialValue": { "arguments": [ { "id": 31452, "name": "_creationCode", "nodeType": "