ContractDeployerCreate2

Description:

Smart contract deployed on Ethereum with Factory features.

Blockchain: Ethereum

Source Code: View Code On The Blockchain

Solidity Source Code:

{{
  "language": "Solidity",
  "sources": {
    "contracts/ContractDeployerCreate2.sol": {
      "content": "// SPDX-License-Identifier: MIT\r
pragma solidity >=0.8.0 <0.9.0;\r
\r
contract ContractDeployerCreate2 {\r
    event Deployed(address addr, bytes32 salt);\r
\r
    function deploy(bytes memory bytecode, bytes32 salt) public returns (address addr) {\r
        assembly {\r
            addr := create2(0, add(bytecode, 0x20), mload(bytecode), salt)\r
            if iszero(extcodesize(addr)) {\r
                revert(0, 0)\r
            }\r
        }\r
        emit Deployed(addr, salt);\r
    }\r
\r
    function computeAddress(bytes32 salt, bytes32 initCodeHash) public view returns (address) {\r
        return address(uint160(uint256(\r
            keccak256(abi.encodePacked(\r
                bytes1(0xff),\r
                address(this),\r
                salt,\r
                initCodeHash\r
            ))\r
        )));\r
    }\r
}"
    }
  },
  "settings": {
    "optimizer": {
      "enabled": true,
      "runs": 340
    },
    "evmVersion": "paris",
    "outputSelection": {
      "*": {
        "*": [
          "evm.bytecode",
          "evm.deployedBytecode",
          "devdoc",
          "userdoc",
          "metadata",
          "abi"
        ]
      }
    }
  }
}}

Tags:
Factory|addr:0x613e48eeb2a510907913ebf568c6ad0f20474cc5|verified:true|block:23435437|tx:0xcb8b218502d1147441cf4fe79078b0c3f727a5bb011feef39b7b21c30727adb0|first_check:1758787823

Submitted on: 2025-09-25 10:10:24

Comments

Log in to comment.

No comments yet.