Sonic Blaze Testnet

Contract

0x64CCeb7cDb169E717389a4881b31a37835781E2D

Overview

S Balance

Sonic Blaze LogoSonic Blaze LogoSonic Blaze Logo0 S

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Deploy47391152024-12-17 6:30:0131 days ago1734417001IN
0x64CCeb7c...835781E2D
0 S0.006086991.1
Deploy47386612024-12-17 6:27:3631 days ago1734416856IN
0x64CCeb7c...835781E2D
0 S0.00099191.1
Deploy47385092024-12-17 6:26:4731 days ago1734416807IN
0x64CCeb7c...835781E2D
0 S0.005429841.1

Latest 3 internal transactions

Parent Transaction Hash Block From To
47391152024-12-17 6:30:0131 days ago1734417001
0x64CCeb7c...835781E2D
 Contract Creation0 S
47386612024-12-17 6:27:3631 days ago1734416856
0x64CCeb7c...835781E2D
 Contract Creation0 S
47385092024-12-17 6:26:4731 days ago1734416807
0x64CCeb7c...835781E2D
 Contract Creation0 S
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Create2Factory

Compiler Version
v0.8.19+commit.7dd6d404

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 1 : Create2Factory.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;

contract Create2Factory {
    // Contract owner
    address public immutable owner;
    
    // Event emitted when a new contract is deployed
    event ContractDeployed(address indexed deployedAddress, uint256 indexed salt);
    
    constructor() {
        owner = msg.sender;
    }
    
    modifier onlyOwner() {
        require(msg.sender == owner, "Not authorized");
        _;
    }
    
    /**
     * @dev Deploys a contract using CREATE2
     * @param bytecode The contract bytecode to deploy
     * @param salt Unique value for deterministic address generation
     * @return deployedAddress The address where the contract was deployed
     */
    function deploy(bytes memory bytecode, uint256 salt) 
        external 
        onlyOwner 
        returns (address deployedAddress) 
    {
        // Compute the address where contract will be deployed
        bytes32 hash = keccak256(
            abi.encodePacked(
                bytes1(0xff),
                address(this),
                salt,
                keccak256(bytecode)
            )
        );
        
        deployedAddress = address(uint160(uint256(hash)));
        
        // Check if address is already in use
        require(deployedAddress.code.length == 0, "Address already in use");
        
        // Deploy the contract
        assembly {
            deployedAddress := create2(0, add(bytecode, 0x20), mload(bytecode), salt)
        }
        
        // Verify deployment was successful
        require(deployedAddress != address(0), "Deployment failed");
        
        emit ContractDeployed(deployedAddress, salt);
    }
    
    /**
     * @dev Computes the address where a contract will be deployed using CREATE2
     * @param bytecode The contract bytecode
     * @param salt The salt value
     * @return The address where the contract would be deployed
     */
    function computeAddress(bytes memory bytecode, uint256 salt) 
        public 
        view 
        returns (address) 
    {
        return address(uint160(uint256(keccak256(abi.encodePacked(
            bytes1(0xff),
            address(this),
            salt,
            keccak256(bytecode)
        )))));
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "bytecodeHash": "none"
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  }
}

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"deployedAddress","type":"address"},{"indexed":true,"internalType":"uint256","name":"salt","type":"uint256"}],"name":"ContractDeployed","type":"event"},{"inputs":[{"internalType":"bytes","name":"bytecode","type":"bytes"},{"internalType":"uint256","name":"salt","type":"uint256"}],"name":"computeAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"bytecode","type":"bytes"},{"internalType":"uint256","name":"salt","type":"uint256"}],"name":"deploy","outputs":[{"internalType":"address","name":"deployedAddress","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

60a060405234801561001057600080fd5b503360805260805161039861003560003960008181607a015260ff01526103986000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c806381176c20146100465780638da5cb5b146100755780639c4ae2d01461009c575b600080fd5b61005961005436600461029d565b6100af565b6040516001600160a01b03909116815260200160405180910390f35b6100597f000000000000000000000000000000000000000000000000000000000000000081565b6100596100aa36600461029d565b6100f2565b600060ff60f81b308385805190602001206040516020016100d39493929190610352565b60408051601f1981840301815291905280516020909101209392505050565b6000336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146101625760405162461bcd60e51b815260206004820152600e60248201526d139bdd08185d5d1a1bdc9a5e995960921b60448201526064015b60405180910390fd5b600060ff60f81b308486805190602001206040516020016101869493929190610352565b60408051601f19818403018152919052805160209091012091508190506001600160a01b0381163b156101f45760405162461bcd60e51b81526020600482015260166024820152754164647265737320616c726561647920696e2075736560501b6044820152606401610159565b828451602086016000f591506001600160a01b03821661024a5760405162461bcd60e51b815260206004820152601160248201527011195c1b1bde5b595b9d0819985a5b1959607a1b6044820152606401610159565b60405183906001600160a01b038416907f836641082a104c21a747f2896a189cda6d34502edf7de2f98afc4460d0720bfa90600090a35092915050565b634e487b7160e01b600052604160045260246000fd5b600080604083850312156102b057600080fd5b823567ffffffffffffffff808211156102c857600080fd5b818501915085601f8301126102dc57600080fd5b8135818111156102ee576102ee610287565b604051601f8201601f19908116603f0116810190838211818310171561031657610316610287565b8160405282815288602084870101111561032f57600080fd5b826020860160208301376000602093820184015298969091013596505050505050565b6001600160f81b031994909416845260609290921b6bffffffffffffffffffffffff19166001840152601583015260358201526055019056fea164736f6c6343000813000a

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100415760003560e01c806381176c20146100465780638da5cb5b146100755780639c4ae2d01461009c575b600080fd5b61005961005436600461029d565b6100af565b6040516001600160a01b03909116815260200160405180910390f35b6100597f000000000000000000000000f62c8c51ffcd894f728b18a24c5adf6cfe3c83f181565b6100596100aa36600461029d565b6100f2565b600060ff60f81b308385805190602001206040516020016100d39493929190610352565b60408051601f1981840301815291905280516020909101209392505050565b6000336001600160a01b037f000000000000000000000000f62c8c51ffcd894f728b18a24c5adf6cfe3c83f116146101625760405162461bcd60e51b815260206004820152600e60248201526d139bdd08185d5d1a1bdc9a5e995960921b60448201526064015b60405180910390fd5b600060ff60f81b308486805190602001206040516020016101869493929190610352565b60408051601f19818403018152919052805160209091012091508190506001600160a01b0381163b156101f45760405162461bcd60e51b81526020600482015260166024820152754164647265737320616c726561647920696e2075736560501b6044820152606401610159565b828451602086016000f591506001600160a01b03821661024a5760405162461bcd60e51b815260206004820152601160248201527011195c1b1bde5b595b9d0819985a5b1959607a1b6044820152606401610159565b60405183906001600160a01b038416907f836641082a104c21a747f2896a189cda6d34502edf7de2f98afc4460d0720bfa90600090a35092915050565b634e487b7160e01b600052604160045260246000fd5b600080604083850312156102b057600080fd5b823567ffffffffffffffff808211156102c857600080fd5b818501915085601f8301126102dc57600080fd5b8135818111156102ee576102ee610287565b604051601f8201601f19908116603f0116810190838211818310171561031657610316610287565b8160405282815288602084870101111561032f57600080fd5b826020860160208301376000602093820184015298969091013596505050505050565b6001600160f81b031994909416845260609290921b6bffffffffffffffffffffffff19166001840152601583015260358201526055019056fea164736f6c6343000813000a

Deployed Bytecode Sourcemap

58:2181:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1922:315;;;;;;:::i;:::-;;:::i;:::-;;;-1:-1:-1;;;;;1314:32:1;;;1296:51;;1284:2;1269:18;1922:315:0;;;;;;;110:30;;;;;716:956;;;;;;:::i;:::-;;:::i;1922:315::-;2031:7;2133:4;2126:12;;2160:4;2179;2207:8;2197:19;;;;;;2096:130;;;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;2096:130:0;;;;;;;;;2086:141;;2096:130;2086:141;;;;;1922:315;-1:-1:-1;;;1922:315:0:o;716:956::-;824:23;390:10;-1:-1:-1;;;;;404:5:0;390:19;;382:46;;;;-1:-1:-1;;;382:46:0;;2006:2:1;382:46:0;;;1988:21:1;2045:2;2025:18;;;2018:30;-1:-1:-1;;;2064:18:1;;;2057:44;2118:18;;382:46:0;;;;;;;;;927:12:::1;1006:4;999:12;;1037:4;1060;1092:8;1082:19;;;;;;965:150;;;;;;;;;;;:::i;:::-;;::::0;;-1:-1:-1;;965:150:0;;::::1;::::0;;;;;;942:183;;965:150:::1;942:183:::0;;::::1;::::0;;-1:-1:-1;942:183:0;;-1:-1:-1;;;;;;1266:27:0;::::1;;:32:::0;1258:67:::1;;;::::0;-1:-1:-1;;;1258:67:0;;2349:2:1;1258:67:0::1;::::0;::::1;2331:21:1::0;2388:2;2368:18;;;2361:30;-1:-1:-1;;;2407:18:1;;;2400:52;2469:18;;1258:67:0::1;2147:346:1::0;1258:67:0::1;1466:4;1455:8;1449:15;1442:4;1432:8;1428:19;1425:1;1417:54;1398:73:::0;-1:-1:-1;;;;;;1551:29:0;::::1;1543:59;;;::::0;-1:-1:-1;;;1543:59:0;;2700:2:1;1543:59:0::1;::::0;::::1;2682:21:1::0;2739:2;2719:18;;;2712:30;-1:-1:-1;;;2758:18:1;;;2751:47;2815:18;;1543:59:0::1;2498:341:1::0;1543:59:0::1;1626:39;::::0;1660:4;;-1:-1:-1;;;;;1626:39:0;::::1;::::0;::::1;::::0;;;::::1;854:818;716:956:::0;;;;:::o;14:127:1:-;75:10;70:3;66:20;63:1;56:31;106:4;103:1;96:15;130:4;127:1;120:15;146:999;223:6;231;284:2;272:9;263:7;259:23;255:32;252:52;;;300:1;297;290:12;252:52;340:9;327:23;369:18;410:2;402:6;399:14;396:34;;;426:1;423;416:12;396:34;464:6;453:9;449:22;439:32;;509:7;502:4;498:2;494:13;490:27;480:55;;531:1;528;521:12;480:55;567:2;554:16;589:2;585;582:10;579:36;;;595:18;;:::i;:::-;670:2;664:9;638:2;724:13;;-1:-1:-1;;720:22:1;;;744:2;716:31;712:40;700:53;;;768:18;;;788:22;;;765:46;762:72;;;814:18;;:::i;:::-;854:10;850:2;843:22;889:2;881:6;874:18;931:7;924:4;919:2;915;911:11;907:22;904:35;901:55;;;952:1;949;942:12;901:55;1012:2;1005:4;1001:2;997:13;990:4;982:6;978:17;965:50;1059:1;1052:4;1035:15;;;1031:26;;1024:37;1035:15;1118:20;;;;1105:34;;-1:-1:-1;;;;;;146:999:1:o;1358:441::-;-1:-1:-1;;;;;;1581:26:1;;;;1569:39;;1645:2;1641:15;;;;-1:-1:-1;;1637:53:1;1633:1;1624:11;;1617:74;1716:2;1707:12;;1700:28;1753:2;1744:12;;1737:28;1790:2;1781:12;;1358:441::o

Swarm Source

none

Block Transaction 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
[ 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.