ETH Price: $3,374.24 (-1.38%)

Contract

0xeca92346BF21E279531FA500f0993C92981217Ec
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Safe Create2206827022024-09-05 6:49:4782 days ago1725518987IN
0xeca92346...2981217Ec
0 ETH0.011431722.66561796
Safe Create2206826992024-09-05 6:49:1182 days ago1725518951IN
0xeca92346...2981217Ec
0 ETH0.005708132.90766556
Safe Create2206826982024-09-05 6:48:5982 days ago1725518939IN
0xeca92346...2981217Ec
0 ETH0.005494582.61168618
Safe Create2206826952024-09-05 6:48:2382 days ago1725518903IN
0xeca92346...2981217Ec
0 ETH0.006112243.11389836
Safe Create2206826942024-09-05 6:48:1182 days ago1725518891IN
0xeca92346...2981217Ec
0 ETH0.006009662.85684299
Safe Create2206826772024-09-05 6:44:4782 days ago1725518687IN
0xeca92346...2981217Ec
0 ETH0.002639293.05559528
Safe Create2206668172024-09-03 1:38:3585 days ago1725327515IN
0xeca92346...2981217Ec
0 ETH0.004807491.19510864
Safe Create2206311572024-08-29 2:06:3590 days ago1724897195IN
0xeca92346...2981217Ec
0 ETH0.002948970.74260943
Safe Create2206273242024-08-28 13:15:4790 days ago1724850947IN
0xeca92346...2981217Ec
0 ETH0.00158293.0818396
Safe Create2206272742024-08-28 13:05:4790 days ago1724850347IN
0xeca92346...2981217Ec
0 ETH0.001390473.25356207
Safe Create2206272442024-08-28 12:59:4790 days ago1724849987IN
0xeca92346...2981217Ec
0 ETH0.00100642.39545576
Safe Create2206271882024-08-28 12:48:3590 days ago1724849315IN
0xeca92346...2981217Ec
0 ETH0.001214783.33034454
Safe Create2206271562024-08-28 12:42:1190 days ago1724848931IN
0xeca92346...2981217Ec
0 ETH0.001188293.2577388
Safe Create2206270272024-08-28 12:16:1190 days ago1724847371IN
0xeca92346...2981217Ec
0 ETH0.001215723.35807881
Safe Create2206270232024-08-28 12:15:2390 days ago1724847323IN
0xeca92346...2981217Ec
0 ETH0.000662691.83049324
Safe Create2206270082024-08-28 12:12:2390 days ago1724847143IN
0xeca92346...2981217Ec
0 ETH0.00054561.50271921
Safe Create2206180382024-08-27 6:10:1191 days ago1724739011IN
0xeca92346...2981217Ec
0 ETH0.004742021.19280036
Safe Create2206126902024-08-26 12:13:1192 days ago1724674391IN
0xeca92346...2981217Ec
0 ETH0.005323132.80856613
Safe Create2206126892024-08-26 12:12:5992 days ago1724674379IN
0xeca92346...2981217Ec
0 ETH0.004680782.29999226
Safe Create2206110792024-08-26 6:48:5992 days ago1724654939IN
0xeca92346...2981217Ec
0 ETH0.004438821.11653208
Safe Create2206110672024-08-26 6:46:3592 days ago1724654795IN
0xeca92346...2981217Ec
0 ETH0.002091781.10365708
Safe Create2206110662024-08-26 6:46:2392 days ago1724654783IN
0xeca92346...2981217Ec
0 ETH0.001836780.9025388
Safe Create2206110622024-08-26 6:45:3592 days ago1724654735IN
0xeca92346...2981217Ec
0 ETH0.001901211.00324106
Safe Create2206110612024-08-26 6:45:2392 days ago1724654723IN
0xeca92346...2981217Ec
0 ETH0.002087721.02597057
Safe Create2206110602024-08-26 6:45:1192 days ago1724654711IN
0xeca92346...2981217Ec
0 ETH0.000744180.9317163
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
206827022024-09-05 6:49:4782 days ago1725518987
0xeca92346...2981217Ec
 Contract Creation0 ETH
206826992024-09-05 6:49:1182 days ago1725518951
0xeca92346...2981217Ec
 Contract Creation0 ETH
206826982024-09-05 6:48:5982 days ago1725518939
0xeca92346...2981217Ec
 Contract Creation0 ETH
206826952024-09-05 6:48:2382 days ago1725518903
0xeca92346...2981217Ec
 Contract Creation0 ETH
206826942024-09-05 6:48:1182 days ago1725518891
0xeca92346...2981217Ec
 Contract Creation0 ETH
206826772024-09-05 6:44:4782 days ago1725518687
0xeca92346...2981217Ec
 Contract Creation0 ETH
206668172024-09-03 1:38:3585 days ago1725327515
0xeca92346...2981217Ec
 Contract Creation0 ETH
206311572024-08-29 2:06:3590 days ago1724897195
0xeca92346...2981217Ec
 Contract Creation0 ETH
206273242024-08-28 13:15:4790 days ago1724850947
0xeca92346...2981217Ec
 Contract Creation0 ETH
206272742024-08-28 13:05:4790 days ago1724850347
0xeca92346...2981217Ec
 Contract Creation0 ETH
206272442024-08-28 12:59:4790 days ago1724849987
0xeca92346...2981217Ec
 Contract Creation0 ETH
206271882024-08-28 12:48:3590 days ago1724849315
0xeca92346...2981217Ec
 Contract Creation0 ETH
206271562024-08-28 12:42:1190 days ago1724848931
0xeca92346...2981217Ec
 Contract Creation0 ETH
206270272024-08-28 12:16:1190 days ago1724847371
0xeca92346...2981217Ec
 Contract Creation0 ETH
206270232024-08-28 12:15:2390 days ago1724847323
0xeca92346...2981217Ec
 Contract Creation0 ETH
206270082024-08-28 12:12:2390 days ago1724847143
0xeca92346...2981217Ec
 Contract Creation0 ETH
206180382024-08-27 6:10:1191 days ago1724739011
0xeca92346...2981217Ec
 Contract Creation0 ETH
206126902024-08-26 12:13:1192 days ago1724674391
0xeca92346...2981217Ec
 Contract Creation0 ETH
206126892024-08-26 12:12:5992 days ago1724674379
0xeca92346...2981217Ec
 Contract Creation0 ETH
206110792024-08-26 6:48:5992 days ago1724654939
0xeca92346...2981217Ec
 Contract Creation0 ETH
206110672024-08-26 6:46:3592 days ago1724654795
0xeca92346...2981217Ec
 Contract Creation0 ETH
206110662024-08-26 6:46:2392 days ago1724654783
0xeca92346...2981217Ec
 Contract Creation0 ETH
206110622024-08-26 6:45:3592 days ago1724654735
0xeca92346...2981217Ec
 Contract Creation0 ETH
206110612024-08-26 6:45:2392 days ago1724654723
0xeca92346...2981217Ec
 Contract Creation0 ETH
206110602024-08-26 6:45:1192 days ago1724654711
0xeca92346...2981217Ec
 Contract Creation0 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Create2Factory

Compiler Version
v0.8.24+commit.e11b9ed9

Optimization Enabled:
Yes with 1000 runs

Other Settings:
paris EvmVersion
File 1 of 1 : Create2Factory.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0; // optimization enabled, 1000 runs, evm: petersburg
/**
 * @title Immutable Create2 Contract Factory
 * @author 0age
 * @notice This contract provides a safeCreate2 function that takes a salt value
 * and a block of initialization code as arguments and passes them into inline
 * assembly. The contract prevents redeploys by maintaining a mapping of all
 * contracts that have already been deployed. There is also a view function that
 * computes the address of the contract that will be created when submitting a
 * given salt or nonce along with a given block of initialization code.
 * @dev This contract has not yet been fully tested or audited - proceed with
 * caution and please share any exploits or optimizations you discover.
 */
contract Create2Factory {
    event ContractDeployed(address indexed deploymentAddress);
    // mapping to track which addresses have already been deployed.
    mapping(address => bool) public _deployed;

    /**
     * @dev Create a contract using CREATE2 by submitting a given salt or nonce
   * along with the initialization code for the contract. Note that the first 20
   * bytes of the salt must match those of the calling address, which prevents
   * contract creation events from being submitted by unintended parties.
   * @param salt bytes32 The nonce that will be passed into the CREATE2 call.
   * @param initializationCode bytes The initialization code that will be passed
   * into the CREATE2 call.
   * @return deploymentAddress address of the contract that will be created, or the null address
   * if a contract already exists at that address.
   */
    function safeCreate2(
        bytes32 salt,
        bytes calldata initializationCode
    ) external payable returns (address deploymentAddress) {
        // move the initialization code from calldata to memory.
        bytes memory initCode = initializationCode;

        // determine the target address for contract deployment.
        address targetDeploymentAddress = address(
            uint160(                    // downcast to match the address type.
                uint256(                  // convert to uint to truncate upper digits.
                    keccak256(              // compute the CREATE2 hash using 4 inputs.
                        abi.encodePacked(     // pack all inputs to the hash together.
                            hex"ff",            // start with 0xff to distinguish from RLP.
                            address(this),      // this contract will be the caller.
                            salt,               // pass in the supplied salt value.
                            keccak256(          // pass in the hash of initialization code.
                                abi.encodePacked(
                                    initCode
                                )
                            )
                        )
                    )
                )
            )
        );

        // ensure that a contract hasn't been previously deployed to target address.
        require(
            !_deployed[targetDeploymentAddress],
            "Invalid contract creation - contract has already been deployed."
        );

        // using inline assembly: load data and length of data, then call CREATE2.
        assembly {                                // solhint-disable-line
            let encoded_data := add(0x20, initCode) // load initialization code.
            let encoded_size := mload(initCode)     // load the init code's length.
            deploymentAddress := create2(           // call CREATE2 with 4 arguments.
                callvalue(),                            // forward any attached value.
                encoded_data,                         // pass in initialization code.
                encoded_size,                         // pass in init code's length.
                salt                                  // pass in the salt value.
            )
        }

        // check address against target to ensure that deployment was successful.
        require(
            deploymentAddress == targetDeploymentAddress,
            "Failed to deploy contract using provided salt and initialization code."
        );

        // record the deployment of the contract to prevent redeploys.
        _deployed[deploymentAddress] = true;
        emit ContractDeployed(deploymentAddress);
    }

    /**
     * @dev Compute the address of the contract that will be created when
   * submitting a given salt or nonce to the contract along with the contract's
   * initialization code. The CREATE2 address is computed in accordance with
   * EIP-1014, and adheres to the formula therein of
   * `keccak256( 0xff ++ address ++ salt ++ keccak256(init_code)))[12:]` when
   * performing the computation. The computed address is then checked for any
   * existing contract code - if so, the null address will be returned instead.
   * @param salt bytes32 The nonce passed into the CREATE2 address calculation.
   * @param initCode bytes The contract initialization code to be used.
   * that will be passed into the CREATE2 address calculation.
   * @return deploymentAddress address The contract that will be created, or the null address
   * if a contract has already been deployed to that address.
   */
    function findCreate2Address(
        bytes32 salt,
        bytes calldata initCode
    ) external view returns (address deploymentAddress) {
        // determine the address where the contract will be deployed.
        deploymentAddress = address(
            uint160(                      // downcast to match the address type.
                uint256(                    // convert to uint to truncate upper digits.
                    keccak256(                // compute the CREATE2 hash using 4 inputs.
                        abi.encodePacked(       // pack all inputs to the hash together.
                            hex"ff",              // start with 0xff to distinguish from RLP.
                            address(this),        // this contract will be the caller.
                            salt,                 // pass in the supplied salt value.
                            keccak256(            // pass in the hash of initialization code.
                                abi.encodePacked(
                                    initCode
                                )
                            )
                        )
                    )
                )
            )
        );

        // return null address to signify failure if contract has been deployed.
        if (_deployed[deploymentAddress]) {
            return address(0);
        }
    }

    /**
     * @dev Compute the address of the contract that will be created when
   * submitting a given salt or nonce to the contract along with the keccak256
   * hash of the contract's initialization code. The CREATE2 address is computed
   * in accordance with EIP-1014, and adheres to the formula therein of
   * `keccak256( 0xff ++ address ++ salt ++ keccak256(init_code)))[12:]` when
   * performing the computation. The computed address is then checked for any
   * existing contract code - if so, the null address will be returned instead.
   * @param salt bytes32 The nonce passed into the CREATE2 address calculation.
   * @param initCodeHash bytes32 The keccak256 hash of the initialization code
   * that will be passed into the CREATE2 address calculation.
   * @return deploymentAddress address the contract that will be created, or the null address
   * if a contract has already been deployed to that address.
   */
    function findCreate2AddressViaHash(
        bytes32 salt,
        bytes32 initCodeHash
    ) external view returns (address deploymentAddress) {
        // determine the address where the contract will be deployed.
        deploymentAddress = address(
            uint160(                      // downcast to match the address type.
                uint256(                    // convert to uint to truncate upper digits.
                    keccak256(                // compute the CREATE2 hash using 4 inputs.
                        abi.encodePacked(       // pack all inputs to the hash together.
                            hex"ff",              // start with 0xff to distinguish from RLP.
                            address(this),        // this contract will be the caller.
                            salt,                 // pass in the supplied salt value.
                            initCodeHash          // pass in the hash of initialization code.
                        )
                    )
                )
            )
        );

        // return null address to signify failure if contract has been deployed.
        if (_deployed[deploymentAddress]) {
            return address(0);
        }
    }

    /**
     * @dev Determine if a contract has already been deployed by the factory to a
   * given address.
   * @param deploymentAddress address The contract address to check.
   * @return True if the contract has been deployed, false otherwise.
   */
    function hasBeenDeployed(
        address deploymentAddress
    ) external view returns (bool) {
        // determine if a contract has been deployed to the provided address.
        return _deployed[deploymentAddress];
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 1000
  },
  "viaIR": true,
  "evmVersion": "paris",
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"deploymentAddress","type":"address"}],"name":"ContractDeployed","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"_deployed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"bytes","name":"initCode","type":"bytes"}],"name":"findCreate2Address","outputs":[{"internalType":"address","name":"deploymentAddress","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"bytes32","name":"initCodeHash","type":"bytes32"}],"name":"findCreate2AddressViaHash","outputs":[{"internalType":"address","name":"deploymentAddress","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"deploymentAddress","type":"address"}],"name":"hasBeenDeployed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"bytes","name":"initializationCode","type":"bytes"}],"name":"safeCreate2","outputs":[{"internalType":"address","name":"deploymentAddress","type":"address"}],"stateMutability":"payable","type":"function"}]

6080806040523461001657610651908161001c8239f35b600080fdfe6080604052600436101561001257600080fd5b6000803560e01c90816308508b8f1461006a575080633b67d8091461006557806364e030871461006057806385cf97ab1461005b5763a49a7c901461005657600080fd5b6102fd565b6102d3565b610145565b6100c4565b3461009a57604060ff916001600160a01b036100853661009d565b16815280602052205416151560805260206080f35b80fd5b60209060031901126100bf576004356001600160a01b03811681036100bf5790565b600080fd5b346100bf576001600160a01b036100da3661009d565b166000526000602052602060ff604060002054166040519015158152f35b60406003198201126100bf576004359160243567ffffffffffffffff928382116100bf57806023830112156100bf5781600401359384116100bf57602484830101116100bf576024019190565b61015b610151366100f8565b9291923691610374565b9061020b6101ff604051602081018161017482886103bb565b0391610188601f199384810183528261034d565b5190206040517fff00000000000000000000000000000000000000000000000000000000000000602082019081526bffffffffffffffffffffffff193060601b1660218301526035820187905260558201929092526075928301815290916101f0908261034d565b5190206001600160a01b031690565b6001600160a01b031690565b9161024261023d610239610232866001600160a01b03166000526000602052604060002090565b5460ff1690565b1590565b6103e6565b80519060200134f5906102626001600160a01b0380841692168214610457565b61028f610282836001600160a01b03166000526000602052604060002090565b805460ff19166001179055565b6102cf6040519283927f8ffcdc15a283d706d38281f500270d8b5a656918f555de0913d7455e3e6bc1bf600080a26001600160a01b031682526020820190565b0390f35b346100bf5760206102ec6102e6366100f8565b916104ee565b6001600160a01b0360405191168152f35b346100bf5760403660031901126100bf5760206102ec6024356004356105b2565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b90601f8019910116810190811067ffffffffffffffff82111761036f57604052565b61031e565b92919267ffffffffffffffff821161036f576040519161039e601f8201601f19166020018461034d565b8294818452818301116100bf578281602093846000960137010152565b9081519160005b8381106103d3575050016000815290565b80602080928401015181850152016103c2565b156103ed57565b608460405162461bcd60e51b815260206004820152603f60248201527f496e76616c696420636f6e7472616374206372656174696f6e202d20636f6e7460448201527f726163742068617320616c7265616479206265656e206465706c6f7965642e006064820152fd5b1561045e57565b60a460405162461bcd60e51b815260206004820152604660248201527f4661696c656420746f206465706c6f7920636f6e7472616374207573696e672060448201527f70726f76696465642073616c7420616e6420696e697469616c697a6174696f6e60648201527f20636f64652e00000000000000000000000000000000000000000000000000006084820152fd5b9061058f610581916001600160a01b03946105236020604051838194838301968737810160008382015203808452018261034d565b5190206040519283916020830195308791605593917fff0000000000000000000000000000000000000000000000000000000000000084526bffffffffffffffffffffffff199060601b166001840152601583015260358201520190565b03601f19810183528261034d565b519020169081600052600060205260ff604060002054166105ac57565b60009150565b6040517fff00000000000000000000000000000000000000000000000000000000000000602082019081523060601b6bffffffffffffffffffffffff19166021830152603582019290925260558101929092526001600160a01b039161058f816075810161058156fea26469706673582212201f954d97d83b0ad9453d6c9f6519b6c0049714a73759cca32c8b58b2fa454ac664736f6c63430008180033

Deployed Bytecode

0x6080604052600436101561001257600080fd5b6000803560e01c90816308508b8f1461006a575080633b67d8091461006557806364e030871461006057806385cf97ab1461005b5763a49a7c901461005657600080fd5b6102fd565b6102d3565b610145565b6100c4565b3461009a57604060ff916001600160a01b036100853661009d565b16815280602052205416151560805260206080f35b80fd5b60209060031901126100bf576004356001600160a01b03811681036100bf5790565b600080fd5b346100bf576001600160a01b036100da3661009d565b166000526000602052602060ff604060002054166040519015158152f35b60406003198201126100bf576004359160243567ffffffffffffffff928382116100bf57806023830112156100bf5781600401359384116100bf57602484830101116100bf576024019190565b61015b610151366100f8565b9291923691610374565b9061020b6101ff604051602081018161017482886103bb565b0391610188601f199384810183528261034d565b5190206040517fff00000000000000000000000000000000000000000000000000000000000000602082019081526bffffffffffffffffffffffff193060601b1660218301526035820187905260558201929092526075928301815290916101f0908261034d565b5190206001600160a01b031690565b6001600160a01b031690565b9161024261023d610239610232866001600160a01b03166000526000602052604060002090565b5460ff1690565b1590565b6103e6565b80519060200134f5906102626001600160a01b0380841692168214610457565b61028f610282836001600160a01b03166000526000602052604060002090565b805460ff19166001179055565b6102cf6040519283927f8ffcdc15a283d706d38281f500270d8b5a656918f555de0913d7455e3e6bc1bf600080a26001600160a01b031682526020820190565b0390f35b346100bf5760206102ec6102e6366100f8565b916104ee565b6001600160a01b0360405191168152f35b346100bf5760403660031901126100bf5760206102ec6024356004356105b2565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b90601f8019910116810190811067ffffffffffffffff82111761036f57604052565b61031e565b92919267ffffffffffffffff821161036f576040519161039e601f8201601f19166020018461034d565b8294818452818301116100bf578281602093846000960137010152565b9081519160005b8381106103d3575050016000815290565b80602080928401015181850152016103c2565b156103ed57565b608460405162461bcd60e51b815260206004820152603f60248201527f496e76616c696420636f6e7472616374206372656174696f6e202d20636f6e7460448201527f726163742068617320616c7265616479206265656e206465706c6f7965642e006064820152fd5b1561045e57565b60a460405162461bcd60e51b815260206004820152604660248201527f4661696c656420746f206465706c6f7920636f6e7472616374207573696e672060448201527f70726f76696465642073616c7420616e6420696e697469616c697a6174696f6e60648201527f20636f64652e00000000000000000000000000000000000000000000000000006084820152fd5b9061058f610581916001600160a01b03946105236020604051838194838301968737810160008382015203808452018261034d565b5190206040519283916020830195308791605593917fff0000000000000000000000000000000000000000000000000000000000000084526bffffffffffffffffffffffff199060601b166001840152601583015260358201520190565b03601f19810183528261034d565b519020169081600052600060205260ff604060002054166105ac57565b60009150565b6040517fff00000000000000000000000000000000000000000000000000000000000000602082019081523060601b6bffffffffffffffffffffffff19166021830152603582019290925260558101929092526001600160a01b039161058f816075810161058156fea26469706673582212201f954d97d83b0ad9453d6c9f6519b6c0049714a73759cca32c8b58b2fa454ac664736f6c63430008180033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.