Contract 0xcfa3a7637547094ff06246817a35b8333c315196 30

 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x36624aefeb3de0493284f0a886198fb5fd9d0603bc955f321090e4ec66319181Safe Create21525276832023-11-21 7:08:48129 days 58 mins ago0x84ba5cc7d00a1c3414991bfb108f1473b8f2c0c1 IN  0xcfa3a7637547094ff06246817a35b8333c3151960 ETH0.000451280.1
0xbf2c7ce79a6d39b856feb1c2fb0c84347fead42b189a68ef437e5bc660246bd6Safe Create2167441862022-07-01 18:39:02636 days 13 hrs ago0x2f7cf35d65ffcb50c919b24a730e6f8f4aa76f46 IN  0xcfa3a7637547094ff06246817a35b8333c3151960 ETH0.001554241507 ETH0.378151381
0xf20e7b209d3f7b1570614c45317b353a069a0b5f2e8a261d073819597a5e294dSafe Create2161138192022-06-27 18:34:51640 days 13 hrs ago0x3b52ad533687ce908ba0485ac177c5fb42972962 IN  0xcfa3a7637547094ff06246817a35b8333c3151960 ETH0.005690347542 ETH1.411331516
0xa534365da8a80471ff851089cc82c47627081f8a56f30f2e744b84126fb899d3Safe Create2161095172022-06-27 17:57:14640 days 14 hrs ago0x3b52ad533687ce908ba0485ac177c5fb42972962 IN  0xcfa3a7637547094ff06246817a35b8333c3151960 ETH0.005688399904 ETH1.411331516
[ Download CSV Export 
Latest 3 internal transactions
Parent Txn Hash Block From To Value
0x36624aefeb3de0493284f0a886198fb5fd9d0603bc955f321090e4ec663191811525276832023-11-21 7:08:48129 days 58 mins ago 0xcfa3a7637547094ff06246817a35b8333c315196  Contract Creation0 ETH
0xbf2c7ce79a6d39b856feb1c2fb0c84347fead42b189a68ef437e5bc660246bd6167441862022-07-01 18:39:02636 days 13 hrs ago 0xcfa3a7637547094ff06246817a35b8333c315196  Contract Creation0 ETH
0x7bea349f1505f2b80dc5973dd55ac8bf3d4cb9c1040892785889e28890385604167440932022-07-01 18:38:26636 days 13 hrs ago 0x7a0d94f55792c434d74a40883c6ed8545e406d12  Contract Creation0 ETH
[ Download CSV Export 
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0x0000000000FFe8B47B3e2130213B802212439497
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
ImmutableCreate2Factory

Compiler Version
v0.5.10+commit.5a6ea5b1

Optimization Enabled:
Yes with 99999 runs

Other Settings:
petersburg EvmVersion, MIT license
/**
 *Submitted for verification at Arbiscan.io on 2022-08-16
*/

pragma solidity 0.5.10; // optimization enabled, 99999 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, and prevents frontrunning or other
 * collisions by requiring that the first 20 bytes of the salt are equal to the
 * address of the caller (this can be bypassed by setting the first 20 bytes to
 * the null address). 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 ImmutableCreate2Factory {
  // mapping to track which addresses have already been deployed.
  mapping(address => bool) private _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 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 containsCaller(salt) 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;
  }

  /**
   * @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 Address of 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 Address of 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];
  }

  /**
   * @dev Modifier to ensure that the first 20 bytes of a submitted salt match
   * those of the calling account. This provides protection against the salt
   * being stolen by frontrunners or other attackers. The protection can also be
   * bypassed if desired by setting each of the first 20 bytes to zero.
   * @param salt bytes32 The salt value to check against the calling address.
   */
  modifier containsCaller(bytes32 salt) {
    // prevent contract submissions from being stolen from tx.pool by requiring
    // that the first 20 bytes of the submitted salt match msg.sender.
    require(
      (address(bytes20(salt)) == msg.sender) ||
      (bytes20(salt) == bytes20(0)),
      "Invalid salt - first 20 bytes of the salt must match calling address."
    );
    _;
  }
}

Contract ABI

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

Deployed Bytecode

0x60806040526004361061003f5760003560e01c806308508b8f1461004457806364e030871461009857806385cf97ab14610138578063a49a7c90146101bc575b600080fd5b34801561005057600080fd5b506100846004803603602081101561006757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166101ec565b604080519115158252519081900360200190f35b61010f600480360360408110156100ae57600080fd5b813591908101906040810160208201356401000000008111156100d057600080fd5b8201836020820111156100e257600080fd5b8035906020019184600183028401116401000000008311171561010457600080fd5b509092509050610217565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561014457600080fd5b5061010f6004803603604081101561015b57600080fd5b8135919081019060408101602082013564010000000081111561017d57600080fd5b82018360208201111561018f57600080fd5b803590602001918460018302840111640100000000831117156101b157600080fd5b509092509050610592565b3480156101c857600080fd5b5061010f600480360360408110156101df57600080fd5b508035906020013561069e565b73ffffffffffffffffffffffffffffffffffffffff1660009081526020819052604090205460ff1690565b600083606081901c33148061024c57507fffffffffffffffffffffffffffffffffffffffff0000000000000000000000008116155b6102a1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260458152602001806107746045913960600191505060405180910390fd5b606084848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920182905250604051855195965090943094508b93508692506020918201918291908401908083835b6020831061033557805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016102f8565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff018019909216911617905260408051929094018281037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe00183528085528251928201929092207fff000000000000000000000000000000000000000000000000000000000000008383015260609890981b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016602183015260358201969096526055808201979097528251808203909701875260750182525084519484019490942073ffffffffffffffffffffffffffffffffffffffff81166000908152938490529390922054929350505060ff16156104a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603f815260200180610735603f913960400191505060405180910390fd5b81602001825188818334f5955050508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161461053a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260468152602001806107b96046913960600191505060405180910390fd5b50505073ffffffffffffffffffffffffffffffffffffffff8116600090815260208190526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790559392505050565b6000308484846040516020018083838082843760408051919093018181037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe001825280845281516020928301207fff000000000000000000000000000000000000000000000000000000000000008383015260609990991b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166021820152603581019790975260558088019890985282518088039098018852607590960182525085519585019590952073ffffffffffffffffffffffffffffffffffffffff81166000908152948590529490932054939450505060ff909116159050610697575060005b9392505050565b604080517fff000000000000000000000000000000000000000000000000000000000000006020808301919091523060601b6021830152603582018590526055808301859052835180840390910181526075909201835281519181019190912073ffffffffffffffffffffffffffffffffffffffff81166000908152918290529190205460ff161561072e575060005b9291505056fe496e76616c696420636f6e7472616374206372656174696f6e202d20636f6e74726163742068617320616c7265616479206265656e206465706c6f7965642e496e76616c69642073616c74202d206669727374203230206279746573206f66207468652073616c74206d757374206d617463682063616c6c696e6720616464726573732e4661696c656420746f206465706c6f7920636f6e7472616374207573696e672070726f76696465642073616c7420616e6420696e697469616c697a6174696f6e20636f64652ea265627a7a723058202bdc55310d97c4088f18acf04253db593f0914059f0c781a9df3624dcef0d1cf64736f6c634300050a0032

Deployed ByteCode Sourcemap

1002:8623:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8603:214;;8:9:-1;5:2;;;30:1;27;20:12;5:2;8603:214:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;8603:214:0;;;;:::i;:::-;;;;;;;;;;;;;;;;;;1808:2438;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1808:2438:0;;;;;;;;;;;;;;21:11:-1;5:28;;2:2;;;46:1;43;36:12;2:2;1808:2438:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;1808:2438:0;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;-1:-1;1808:2438:0;;-1:-1:-1;1808:2438:0;-1:-1:-1;1808:2438:0;:::i;:::-;;;;;;;;;;;;;;;;;;;5152:1174;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5152:1174:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;5152:1174:0;;;;;;;;;;;;;;21:11:-1;5:28;;2:2;;;46:1;43;36:12;2:2;5152:1174:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;5152:1174:0;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;-1:-1;5152:1174:0;;-1:-1:-1;5152:1174:0;-1:-1:-1;5152:1174:0;:::i;7261:1079::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;7261:1079:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;7261:1079:0;;;;;;;:::i;8603:214::-;8783:28;;8688:4;8783:28;;;;;;;;;;;;;;8603:214::o;1808:2438::-;1940:25;1925:4;9444:22;;;;9470:10;9444:36;;9443:78;;-1:-1:-1;9493:27:0;;;;9443:78;9427:181;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2036:21;2060:18;;2036:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;-1:-1;2819:64:0;;;;2036:42;;-1:-1:-1;99:1;;2603:4:0;;-1:-1:-1;2667:4:0;;-1:-1:-1;2036:42:0;;-1:-1:-1;2819:64:0;;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;36:153;;176:10;;164:23;;139:12;;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;246:30;;311:9;;295:26;;;340:21;;377:20;365:33;;2819:64:0;;;;;;;26:21:-1;;;22:32;;6:49;;2819:64:0;;;2738:162;;;;;;;;;2438:477;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;2438:477:0;;;;-1:-1:-1;2357:571:0;;;;;;;;;2438:477;3063:34;;-1:-1:-1;3063:34:0;;;;;;;;;;;;2357:571;;-1:-1:-1;;;3063:34:0;;3062:35;3046:132;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3370:8;3364:4;3360:19;3442:8;3436:15;3813:4;3735:12;3656;3578:9;3516:370;3495:391;;3276:617;;4017:23;3996:44;;:17;:44;;;3980:148;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;4205:28:0;;;:9;:28;;;;;;;;;;:35;;;;4236:4;4205:35;;;4215:17;1808:2438;-1:-1:-1;;;1808:2438:0:o;5152:1174::-;5257:25;5808:4;5874;6067:8;;6030:64;;;;;;;30:3:-1;22:6;14;1:33;6030:64:0;;;45:16:-1;;;;26:21;;;22:32;;6:49;;6030:64:0;;;5947:164;;49:4:-1;5947:164:0;;;;5639:487;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;5639:487:0;;;;;;-1:-1:-1;5556:583:0;;;;;;;;;5639:487;6257:28;;-1:-1:-1;6257:28:0;;;;;;;;;;;;5556:583;;-1:-1:-1;;;6257:28:0;;;;6253:68;;-1:-1:-1;6253:68:0;;-1:-1:-1;6311:1:0;6253:68;5152:1174;;;;;:::o;7261:1079::-;7752:388;;;;;;;;;;;;7921:4;7752:388;;;;;;;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;7752:388:0;;;;;;7669:484;;;;;;;;;7752:388;8271:28;;7370:25;8271:28;;;;;;;;;;;;;8267:68;;;-1:-1:-1;8325:1:0;8267:68;7261:1079;;;;:::o

Metadata Hash

2bdc55310d97c4088f18acf04253db593f0914059f0c781a9df3624dcef0d1cf
Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.