Contract

0x274E52a1d47168C25475953674F5fa86b6007B3C

Overview

S Balance

Sonic LogoSonic LogoSonic Logo0 S

S Value

-

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Deploy With Payl...14348922024-12-24 7:37:4713 days ago1735025867IN
0x274E52a1...6b6007B3C
0 S0.001909381.1
Deploy With Payl...14348572024-12-24 7:37:2313 days ago1735025843IN
0x274E52a1...6b6007B3C
0 S0.002736651.1
Deploy With Payl...14347382024-12-24 7:36:0013 days ago1735025760IN
0x274E52a1...6b6007B3C
0 S0.000977971.1
Deploy With Payl...14342452024-12-24 7:30:0813 days ago1735025408IN
0x274E52a1...6b6007B3C
0 S0.00130031.1
Deploy With Payl...14341202024-12-24 7:28:5213 days ago1735025332IN
0x274E52a1...6b6007B3C
0 S0.002604992.5
Deploy14341102024-12-24 7:28:4413 days ago1735025324IN
0x274E52a1...6b6007B3C
0 S0.000103821.1
Deploy With Payl...14340672024-12-24 7:28:1113 days ago1735025291IN
0x274E52a1...6b6007B3C
0 S0.000519031.1
Deploy With Payl...14340192024-12-24 7:27:3913 days ago1735025259IN
0x274E52a1...6b6007B3C
0 S0.000734261.1
Deploy With Payl...14338172024-12-24 7:25:2213 days ago1735025122IN
0x274E52a1...6b6007B3C
0 S0.000593371.1

Latest 9 internal transactions

Parent Transaction Hash Block From To
14348922024-12-24 7:37:4713 days ago1735025867
0x274E52a1...6b6007B3C
 Contract Creation0 S
14348572024-12-24 7:37:2313 days ago1735025843
0x274E52a1...6b6007B3C
 Contract Creation0 S
14347382024-12-24 7:36:0013 days ago1735025760
0x274E52a1...6b6007B3C
 Contract Creation0 S
14342452024-12-24 7:30:0813 days ago1735025408
0x274E52a1...6b6007B3C
 Contract Creation0 S
14341202024-12-24 7:28:5213 days ago1735025332
0x274E52a1...6b6007B3C
 Contract Creation0 S
14341102024-12-24 7:28:4413 days ago1735025324
0x274E52a1...6b6007B3C
 Contract Creation0 S
14340672024-12-24 7:28:1113 days ago1735025291
0x274E52a1...6b6007B3C
 Contract Creation0 S
14340192024-12-24 7:27:3913 days ago1735025259
0x274E52a1...6b6007B3C
 Contract Creation0 S
14338172024-12-24 7:25:2213 days ago1735025122
0x274E52a1...6b6007B3C
 Contract Creation0 S
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
MicroGenesis

Compiler Version
v0.8.13+commit.abaa5c0e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 1 : MicroGenesis.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.4;

interface InitializableInterface {
    /**
     * @notice Used internally to initialize the contract instead of through a constructor
     * @dev This function is called by the deployer/factory when creating a contract
     * @param initPayload abi encoded payload to use for contract initilaization
     */
    function init(bytes memory initPayload) external returns (bool);
}

/**
 * @dev In the beginning there was a smart contract...
 */
contract MicroGenesis {
    event Deployed(address indexed contractAddress);

    constructor() {}

    function deploy(bytes12 saltHash, bytes memory sourceCode)
        external
        payable
    {
        bytes32 salt = bytes32(
            keccak256(abi.encodePacked(msg.sender, saltHash))
        );

        address contractAddress = address(
            uint160(
                uint256(
                    keccak256(
                        abi.encodePacked(
                            bytes1(0xff),
                            address(this),
                            salt,
                            keccak256(sourceCode)
                        )
                    )
                )
            )
        );

        require(!_isContract(contractAddress), "Micro: already deployed");

        assembly {
            contractAddress := create2(
                0,
                add(sourceCode, 0x20),
                mload(sourceCode),
                salt
            )
        }
        require(_isContract(contractAddress), "Micro: deployment failed");

        emit Deployed(contractAddress);
    }

    function deployWithPayload(
        bytes12 saltHash,
        bytes memory sourceCode,
        bytes memory initCode
    ) external payable {
        bytes32 salt = bytes32(
            keccak256(abi.encodePacked(msg.sender, saltHash))
        );

        address contractAddress = address(
            uint160(
                uint256(
                    keccak256(
                        abi.encodePacked(
                            bytes1(0xff),
                            address(this),
                            salt,
                            keccak256(sourceCode)
                        )
                    )
                )
            )
        );

        require(!_isContract(contractAddress), "Micro: already deployed");

        assembly {
            contractAddress := create2(
                0,
                add(sourceCode, 0x20),
                mload(sourceCode),
                salt
            )
        }

        require(_isContract(contractAddress), "Micro: deployment failed");
        require(
            InitializableInterface(contractAddress).init(initCode),
            "Micro: initialization failed"
        );
        emit Deployed(contractAddress);
    }

    function getBytecodeBridge(
        bytes memory sourceCode,
        address _lzEndpoint
    ) public pure returns (bytes memory) {
        return
            abi.encodePacked(
                sourceCode,
                abi.encode(_lzEndpoint)
            );
    }

    function _isContract(address contractAddress) internal view returns (bool) {
        bytes32 codehash;
        assembly {
            codehash := extcodehash(contractAddress)
        }
        return (codehash != 0x0 &&
            codehash !=
            0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470);
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"contractAddress","type":"address"}],"name":"Deployed","type":"event"},{"inputs":[{"internalType":"bytes12","name":"saltHash","type":"bytes12"},{"internalType":"bytes","name":"sourceCode","type":"bytes"}],"name":"deploy","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes12","name":"saltHash","type":"bytes12"},{"internalType":"bytes","name":"sourceCode","type":"bytes"},{"internalType":"bytes","name":"initCode","type":"bytes"}],"name":"deployWithPayload","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes","name":"sourceCode","type":"bytes"},{"internalType":"address","name":"_lzEndpoint","type":"address"}],"name":"getBytecodeBridge","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"pure","type":"function"}]

608060405234801561001057600080fd5b506107b5806100206000396000f3fe6080604052600436106100345760003560e01c8063148f6814146100395780632848a2171461006f578063fe71975514610084575b600080fd5b34801561004557600080fd5b50610059610054366004610529565b610097565b60405161006691906105b7565b60405180910390f35b61008261007d366004610607565b6100e5565b005b61008261009236600461067b565b6102f9565b604080516001600160a01b038316602082015260609184910160408051601f19818403018152908290526100ce92916020016106c9565b604051602081830303815290604052905092915050565b600033846040516020016100fa9291906106f8565b60408051601f19818403018152908290528051602091820120855186830120909350600092610137926001600160f81b0319923092879201610724565b6040516020818303038152906040528051906020012060001c905061015b8161044c565b156101a75760405162461bcd60e51b8152602060048201526017602482015276135a58dc9bce88185b1c9958591e4819195c1b1bde5959604a1b60448201526064015b60405180910390fd5b818451602086016000f590506101bc8161044c565b6102035760405162461bcd60e51b8152602060048201526018602482015277135a58dc9bce8819195c1b1bde5b595b9d0819985a5b195960421b604482015260640161019e565b604051631377d1f560e21b81526001600160a01b03821690634ddf47d49061022f9086906004016105b7565b6020604051808303816000875af115801561024e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610272919061075d565b6102be5760405162461bcd60e51b815260206004820152601c60248201527f4d6963726f3a20696e697469616c697a6174696f6e206661696c656400000000604482015260640161019e565b6040516001600160a01b038216907ff40fcec21964ffb566044d083b4073f29f7f7929110ea19e1b3ebe375d89055e90600090a25050505050565b6000338360405160200161030e9291906106f8565b60408051601f1981840301815290829052805160209182012084518583012090935060009261034b926001600160f81b0319923092879201610724565b6040516020818303038152906040528051906020012060001c905061036f8161044c565b156103b65760405162461bcd60e51b8152602060048201526017602482015276135a58dc9bce88185b1c9958591e4819195c1b1bde5959604a1b604482015260640161019e565b818351602085016000f590506103cb8161044c565b6104125760405162461bcd60e51b8152602060048201526018602482015277135a58dc9bce8819195c1b1bde5b595b9d0819985a5b195960421b604482015260640161019e565b6040516001600160a01b038216907ff40fcec21964ffb566044d083b4073f29f7f7929110ea19e1b3ebe375d89055e90600090a250505050565b6000813f801580159061047f57507fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708114155b9392505050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126104ad57600080fd5b813567ffffffffffffffff808211156104c8576104c8610486565b604051601f8301601f19908116603f011681019082821181831017156104f0576104f0610486565b8160405283815286602085880101111561050957600080fd5b836020870160208301376000602085830101528094505050505092915050565b6000806040838503121561053c57600080fd5b823567ffffffffffffffff81111561055357600080fd5b61055f8582860161049c565b92505060208301356001600160a01b038116811461057c57600080fd5b809150509250929050565b60005b838110156105a257818101518382015260200161058a565b838111156105b1576000848401525b50505050565b60208152600082518060208401526105d6816040850160208701610587565b601f01601f19169190910160400192915050565b80356001600160a01b03198116811461060257600080fd5b919050565b60008060006060848603121561061c57600080fd5b610625846105ea565b9250602084013567ffffffffffffffff8082111561064257600080fd5b61064e8783880161049c565b9350604086013591508082111561066457600080fd5b506106718682870161049c565b9150509250925092565b6000806040838503121561068e57600080fd5b610697836105ea565b9150602083013567ffffffffffffffff8111156106b357600080fd5b6106bf8582860161049c565b9150509250929050565b600083516106db818460208801610587565b8351908301906106ef818360208801610587565b01949350505050565b60609290921b6bffffffffffffffffffffffff191682526001600160a01b031916601482015260200190565b6001600160f81b031994909416845260609290921b6bffffffffffffffffffffffff191660018401526015830152603582015260550190565b60006020828403121561076f57600080fd5b8151801515811461047f57600080fdfea26469706673582212206a4a674367e1b50a096d24109d1a1439f0c6203c8caa4d7b62791e1b4cd98e6564736f6c634300080d0033

Deployed Bytecode

0x6080604052600436106100345760003560e01c8063148f6814146100395780632848a2171461006f578063fe71975514610084575b600080fd5b34801561004557600080fd5b50610059610054366004610529565b610097565b60405161006691906105b7565b60405180910390f35b61008261007d366004610607565b6100e5565b005b61008261009236600461067b565b6102f9565b604080516001600160a01b038316602082015260609184910160408051601f19818403018152908290526100ce92916020016106c9565b604051602081830303815290604052905092915050565b600033846040516020016100fa9291906106f8565b60408051601f19818403018152908290528051602091820120855186830120909350600092610137926001600160f81b0319923092879201610724565b6040516020818303038152906040528051906020012060001c905061015b8161044c565b156101a75760405162461bcd60e51b8152602060048201526017602482015276135a58dc9bce88185b1c9958591e4819195c1b1bde5959604a1b60448201526064015b60405180910390fd5b818451602086016000f590506101bc8161044c565b6102035760405162461bcd60e51b8152602060048201526018602482015277135a58dc9bce8819195c1b1bde5b595b9d0819985a5b195960421b604482015260640161019e565b604051631377d1f560e21b81526001600160a01b03821690634ddf47d49061022f9086906004016105b7565b6020604051808303816000875af115801561024e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610272919061075d565b6102be5760405162461bcd60e51b815260206004820152601c60248201527f4d6963726f3a20696e697469616c697a6174696f6e206661696c656400000000604482015260640161019e565b6040516001600160a01b038216907ff40fcec21964ffb566044d083b4073f29f7f7929110ea19e1b3ebe375d89055e90600090a25050505050565b6000338360405160200161030e9291906106f8565b60408051601f1981840301815290829052805160209182012084518583012090935060009261034b926001600160f81b0319923092879201610724565b6040516020818303038152906040528051906020012060001c905061036f8161044c565b156103b65760405162461bcd60e51b8152602060048201526017602482015276135a58dc9bce88185b1c9958591e4819195c1b1bde5959604a1b604482015260640161019e565b818351602085016000f590506103cb8161044c565b6104125760405162461bcd60e51b8152602060048201526018602482015277135a58dc9bce8819195c1b1bde5b595b9d0819985a5b195960421b604482015260640161019e565b6040516001600160a01b038216907ff40fcec21964ffb566044d083b4073f29f7f7929110ea19e1b3ebe375d89055e90600090a250505050565b6000813f801580159061047f57507fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708114155b9392505050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126104ad57600080fd5b813567ffffffffffffffff808211156104c8576104c8610486565b604051601f8301601f19908116603f011681019082821181831017156104f0576104f0610486565b8160405283815286602085880101111561050957600080fd5b836020870160208301376000602085830101528094505050505092915050565b6000806040838503121561053c57600080fd5b823567ffffffffffffffff81111561055357600080fd5b61055f8582860161049c565b92505060208301356001600160a01b038116811461057c57600080fd5b809150509250929050565b60005b838110156105a257818101518382015260200161058a565b838111156105b1576000848401525b50505050565b60208152600082518060208401526105d6816040850160208701610587565b601f01601f19169190910160400192915050565b80356001600160a01b03198116811461060257600080fd5b919050565b60008060006060848603121561061c57600080fd5b610625846105ea565b9250602084013567ffffffffffffffff8082111561064257600080fd5b61064e8783880161049c565b9350604086013591508082111561066457600080fd5b506106718682870161049c565b9150509250925092565b6000806040838503121561068e57600080fd5b610697836105ea565b9150602083013567ffffffffffffffff8111156106b357600080fd5b6106bf8582860161049c565b9150509250929050565b600083516106db818460208801610587565b8351908301906106ef818360208801610587565b01949350505050565b60609290921b6bffffffffffffffffffffffff191682526001600160a01b031916601482015260200190565b6001600160f81b031994909416845260609290921b6bffffffffffffffffffffffff191660018401526015830152603582015260550190565b60006020828403121561076f57600080fd5b8151801515811461047f57600080fdfea26469706673582212206a4a674367e1b50a096d24109d1a1439f0c6203c8caa4d7b62791e1b4cd98e6564736f6c634300080d0033

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.