ETH Price: $3,418.70 (+3.72%)

Contract

0x02101dfB77FDE026414827Fdc604ddAF224F0921
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
0x807578ca9ef18bd365928c5040eb84e191dea73e9a1940d1d13bab5607946585 Create Account(pending)2024-11-04 2:44:0619 days ago1730688246IN
0x02101dfB...F224F0921
0 ETH(Pending)(Pending)
Create Account211905452024-11-15 3:55:358 days ago1731642935IN
0x02101dfB...F224F0921
0 ETH0.0020039815.92343861
Create Account211905392024-11-15 3:54:238 days ago1731642863IN
0x02101dfB...F224F0921
0 ETH0.001985415.7758088
Create Account211763252024-11-13 4:17:1110 days ago1731471431IN
0x02101dfB...F224F0921
0 ETH0.0031714625.20015696
Create Account210815972024-10-30 23:00:2323 days ago1730329223IN
0x02101dfB...F224F0921
0 ETH0.0003336912.2606668
Create Account210815942024-10-30 22:59:4723 days ago1730329187IN
0x02101dfB...F224F0921
0 ETH0.001496211.88869851
Create Account210086372024-10-20 18:39:3533 days ago1729449575IN
0x02101dfB...F224F0921
0 ETH0.0014771511.73734547
Create Account202539452024-07-07 10:09:23139 days ago1720346963IN
0x02101dfB...F224F0921
0 ETH0.000183531.90442864
Create Account201449282024-06-22 4:41:35154 days ago1719031295IN
0x02101dfB...F224F0921
0 ETH0.00025172
Create Account201449282024-06-22 4:41:35154 days ago1719031295IN
0x02101dfB...F224F0921
0 ETH0.00025172
Create Account201357942024-06-20 22:03:47155 days ago1718921027IN
0x02101dfB...F224F0921
0 ETH0.000594534.72412405
Create Account201357332024-06-20 21:51:35155 days ago1718920295IN
0x02101dfB...F224F0921
0 ETH0.000761876.05376996
Create Account200347282024-06-06 18:59:23169 days ago1717700363IN
0x02101dfB...F224F0921
0 ETH0.0021220216.86143867
Create Account199810742024-05-30 7:08:23177 days ago1717052903IN
0x02101dfB...F224F0921
0 ETH0.001438311.42864651
Create Account199314932024-05-23 8:48:47184 days ago1716454127IN
0x02101dfB...F224F0921
0 ETH0.000916857.285243
Create Account199314582024-05-23 8:41:47184 days ago1716453707IN
0x02101dfB...F224F0921
0 ETH0.000877436.97200822
Create Account198877102024-05-17 5:48:35190 days ago1715924915IN
0x02101dfB...F224F0921
0 ETH0.000494473.92945588
Create Account197083652024-04-22 3:50:11215 days ago1713757811IN
0x02101dfB...F224F0921
0 ETH0.000683387.09109293
Create Account196274782024-04-10 20:00:47226 days ago1712779247IN
0x02101dfB...F224F0921
0 ETH0.0031939425.37881739
Create Account196202672024-04-09 19:48:35227 days ago1712692115IN
0x02101dfB...F224F0921
0 ETH0.0030367324.12734014
Create Account196058012024-04-07 19:09:11229 days ago1712516951IN
0x02101dfB...F224F0921
0 ETH0.002069816.4464991
Create Account196019242024-04-07 6:07:11230 days ago1712470031IN
0x02101dfB...F224F0921
0 ETH0.0013300710.56861593
Create Account196019212024-04-07 6:06:35230 days ago1712469995IN
0x02101dfB...F224F0921
0 ETH0.0013409210.65489299
Create Account196019182024-04-07 6:05:59230 days ago1712469959IN
0x02101dfB...F224F0921
0 ETH0.0013131610.43430866
Create Account196019152024-04-07 6:05:23230 days ago1712469923IN
0x02101dfB...F224F0921
0 ETH0.0013581710.79192895
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
211905452024-11-15 3:55:358 days ago1731642935
0x02101dfB...F224F0921
 Contract Creation0 ETH
211905392024-11-15 3:54:238 days ago1731642863
0x02101dfB...F224F0921
 Contract Creation0 ETH
211763252024-11-13 4:17:1110 days ago1731471431
0x02101dfB...F224F0921
 Contract Creation0 ETH
210815942024-10-30 22:59:4723 days ago1730329187
0x02101dfB...F224F0921
 Contract Creation0 ETH
210086372024-10-20 18:39:3533 days ago1729449575
0x02101dfB...F224F0921
 Contract Creation0 ETH
204098432024-07-29 4:31:23117 days ago1722227483
0x02101dfB...F224F0921
 Contract Creation0 ETH
202539452024-07-07 10:09:23139 days ago1720346963
0x02101dfB...F224F0921
 Contract Creation0 ETH
201542892024-06-23 12:08:35153 days ago1719144515
0x02101dfB...F224F0921
 Contract Creation0 ETH
201449282024-06-22 4:41:35154 days ago1719031295
0x02101dfB...F224F0921
 Contract Creation0 ETH
201449282024-06-22 4:41:35154 days ago1719031295
0x02101dfB...F224F0921
 Contract Creation0 ETH
201357942024-06-20 22:03:47155 days ago1718921027
0x02101dfB...F224F0921
 Contract Creation0 ETH
201357332024-06-20 21:51:35155 days ago1718920295
0x02101dfB...F224F0921
 Contract Creation0 ETH
200347282024-06-06 18:59:23169 days ago1717700363
0x02101dfB...F224F0921
 Contract Creation0 ETH
199810742024-05-30 7:08:23177 days ago1717052903
0x02101dfB...F224F0921
 Contract Creation0 ETH
199314932024-05-23 8:48:47184 days ago1716454127
0x02101dfB...F224F0921
 Contract Creation0 ETH
199314582024-05-23 8:41:47184 days ago1716453707
0x02101dfB...F224F0921
 Contract Creation0 ETH
198877102024-05-17 5:48:35190 days ago1715924915
0x02101dfB...F224F0921
 Contract Creation0 ETH
197083652024-04-22 3:50:11215 days ago1713757811
0x02101dfB...F224F0921
 Contract Creation0 ETH
196274782024-04-10 20:00:47226 days ago1712779247
0x02101dfB...F224F0921
 Contract Creation0 ETH
196202672024-04-09 19:48:35227 days ago1712692115
0x02101dfB...F224F0921
 Contract Creation0 ETH
196058012024-04-07 19:09:11229 days ago1712516951
0x02101dfB...F224F0921
 Contract Creation0 ETH
196019242024-04-07 6:07:11230 days ago1712470031
0x02101dfB...F224F0921
 Contract Creation0 ETH
196019212024-04-07 6:06:35230 days ago1712469995
0x02101dfB...F224F0921
 Contract Creation0 ETH
196019182024-04-07 6:05:59230 days ago1712469959
0x02101dfB...F224F0921
 Contract Creation0 ETH
196019152024-04-07 6:05:23230 days ago1712469923
0x02101dfB...F224F0921
 Contract Creation0 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
ERC6551Registry

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 4 : ERC6551Registry.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;

import "openzeppelin-contracts/utils/Create2.sol";

import "./interfaces/IERC6551Registry.sol";
import "./lib/ERC6551BytecodeLib.sol";

contract ERC6551Registry is IERC6551Registry {
    error InitializationFailed();

    function createAccount(
        address implementation,
        uint256 chainId,
        address tokenContract,
        uint256 tokenId,
        uint256 salt,
        bytes calldata initData
    ) external returns (address) {
        bytes memory code = ERC6551BytecodeLib.getCreationCode(
            implementation,
            chainId,
            tokenContract,
            tokenId,
            salt
        );

        address _account = Create2.computeAddress(bytes32(salt), keccak256(code));

        if (_account.code.length != 0) return _account;

        emit AccountCreated(_account, implementation, chainId, tokenContract, tokenId, salt);

        _account = Create2.deploy(0, bytes32(salt), code);

        if (initData.length != 0) {
            (bool success, ) = _account.call(initData);
            if (!success) revert InitializationFailed();
        }

        return _account;
    }

    function account(
        address implementation,
        uint256 chainId,
        address tokenContract,
        uint256 tokenId,
        uint256 salt
    ) external view returns (address) {
        bytes32 bytecodeHash = keccak256(
            ERC6551BytecodeLib.getCreationCode(
                implementation,
                chainId,
                tokenContract,
                tokenId,
                salt
            )
        );

        return Create2.computeAddress(bytes32(salt), bytecodeHash);
    }
}

File 2 of 4 : Create2.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Create2.sol)

pragma solidity ^0.8.0;

/**
 * @dev Helper to make usage of the `CREATE2` EVM opcode easier and safer.
 * `CREATE2` can be used to compute in advance the address where a smart
 * contract will be deployed, which allows for interesting new mechanisms known
 * as 'counterfactual interactions'.
 *
 * See the https://eips.ethereum.org/EIPS/eip-1014#motivation[EIP] for more
 * information.
 */
library Create2 {
    /**
     * @dev Deploys a contract using `CREATE2`. The address where the contract
     * will be deployed can be known in advance via {computeAddress}.
     *
     * The bytecode for a contract can be obtained from Solidity with
     * `type(contractName).creationCode`.
     *
     * Requirements:
     *
     * - `bytecode` must not be empty.
     * - `salt` must have not been used for `bytecode` already.
     * - the factory must have a balance of at least `amount`.
     * - if `amount` is non-zero, `bytecode` must have a `payable` constructor.
     */
    function deploy(
        uint256 amount,
        bytes32 salt,
        bytes memory bytecode
    ) internal returns (address addr) {
        require(address(this).balance >= amount, "Create2: insufficient balance");
        require(bytecode.length != 0, "Create2: bytecode length is zero");
        /// @solidity memory-safe-assembly
        assembly {
            addr := create2(amount, add(bytecode, 0x20), mload(bytecode), salt)
        }
        require(addr != address(0), "Create2: Failed on deploy");
    }

    /**
     * @dev Returns the address where a contract will be stored if deployed via {deploy}. Any change in the
     * `bytecodeHash` or `salt` will result in a new destination address.
     */
    function computeAddress(bytes32 salt, bytes32 bytecodeHash) internal view returns (address) {
        return computeAddress(salt, bytecodeHash, address(this));
    }

    /**
     * @dev Returns the address where a contract will be stored if deployed via {deploy} from a contract located at
     * `deployer`. If `deployer` is this contract's address, returns the same value as {computeAddress}.
     */
    function computeAddress(
        bytes32 salt,
        bytes32 bytecodeHash,
        address deployer
    ) internal pure returns (address addr) {
        /// @solidity memory-safe-assembly
        assembly {
            let ptr := mload(0x40) // Get free memory pointer

            // |                   | ↓ ptr ...  ↓ ptr + 0x0B (start) ...  ↓ ptr + 0x20 ...  ↓ ptr + 0x40 ...   |
            // |-------------------|---------------------------------------------------------------------------|
            // | bytecodeHash      |                                                        CCCCCCCCCCCCC...CC |
            // | salt              |                                      BBBBBBBBBBBBB...BB                   |
            // | deployer          | 000000...0000AAAAAAAAAAAAAAAAAAA...AA                                     |
            // | 0xFF              |            FF                                                             |
            // |-------------------|---------------------------------------------------------------------------|
            // | memory            | 000000...00FFAAAAAAAAAAAAAAAAAAA...AABBBBBBBBBBBBB...BBCCCCCCCCCCCCC...CC |
            // | keccak(start, 85) |            ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑ |

            mstore(add(ptr, 0x40), bytecodeHash)
            mstore(add(ptr, 0x20), salt)
            mstore(ptr, deployer) // Right-aligned with 12 preceding garbage bytes
            let start := add(ptr, 0x0b) // The hashed data starts at the final garbage byte which we will set to 0xff
            mstore8(start, 0xff)
            addr := keccak256(start, 85)
        }
    }
}

File 3 of 4 : IERC6551Registry.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;

interface IERC6551Registry {
    event AccountCreated(
        address account,
        address implementation,
        uint256 chainId,
        address tokenContract,
        uint256 tokenId,
        uint256 salt
    );

    function createAccount(
        address implementation,
        uint256 chainId,
        address tokenContract,
        uint256 tokenId,
        uint256 seed,
        bytes calldata initData
    ) external returns (address);

    function account(
        address implementation,
        uint256 chainId,
        address tokenContract,
        uint256 tokenId,
        uint256 salt
    ) external view returns (address);
}

File 4 of 4 : ERC6551BytecodeLib.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

library ERC6551BytecodeLib {
    function getCreationCode(
        address implementation_,
        uint256 chainId_,
        address tokenContract_,
        uint256 tokenId_,
        uint256 salt_
    ) internal pure returns (bytes memory) {
        return
            abi.encodePacked(
                hex"3d60ad80600a3d3981f3363d3d373d3d3d363d73",
                implementation_,
                hex"5af43d82803e903d91602b57fd5bf3",
                abi.encode(salt_, chainId_, tokenContract_, tokenId_)
            );
    }
}

Settings
{
  "remappings": [
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "forge-std/=lib/forge-std/src/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/contracts/",
    "sstore2/=lib/sstore2/contracts/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "bytecodeHash": "ipfs"
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "london",
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[],"name":"InitializationFailed","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"address","name":"implementation","type":"address"},{"indexed":false,"internalType":"uint256","name":"chainId","type":"uint256"},{"indexed":false,"internalType":"address","name":"tokenContract","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"salt","type":"uint256"}],"name":"AccountCreated","type":"event"},{"inputs":[{"internalType":"address","name":"implementation","type":"address"},{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"address","name":"tokenContract","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"salt","type":"uint256"}],"name":"account","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"implementation","type":"address"},{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"address","name":"tokenContract","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"salt","type":"uint256"},{"internalType":"bytes","name":"initData","type":"bytes"}],"name":"createAccount","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b50610584806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80635e9bc5361461003b578063da7323b31461006a575b600080fd5b61004e6100493660046103be565b61007d565b6040516001600160a01b03909116815260200160405180910390f35b61004e61007836600461040c565b6100ac565b60008061008d87878787876101f2565b805160209091012090506100a1838261025b565b979650505050505050565b6000806100bc89898989896101f2565b905060006100d48660001b838051906020012061025b565b90506001600160a01b0381163b156100ef5791506100a19050565b604080516001600160a01b0383811682528c811660208301528183018c90528a1660608201526080810189905260a0810188905290517f07fba7bba1191da7ee1155dcfa0030701c9c9a9cc34a93b991fc6fd0c9268d8f9181900360c00190a161015b6000878461026f565b905083156101e5576000816001600160a01b0316868660405161017f9291906104bd565b6000604051808303816000865af19150503d80600081146101bc576040519150601f19603f3d011682016040523d82523d6000602084013e6101c1565b606091505b50509050806101e357604051630337323560e31b815260040160405180910390fd5b505b9998505050505050505050565b60408051602081018390529081018590526001600160a01b0384166060828101919091526080820184905290869060a00160408051601f198184030181529082905261024192916020016104cd565b604051602081830303815290604052905095945050505050565b6000610268838330610378565b9392505050565b6000834710156102c65760405162461bcd60e51b815260206004820152601d60248201527f437265617465323a20696e73756666696369656e742062616c616e636500000060448201526064015b60405180910390fd5b81516000036103175760405162461bcd60e51b815260206004820181905260248201527f437265617465323a2062797465636f6465206c656e677468206973207a65726f60448201526064016102bd565b8282516020840186f590506001600160a01b0381166102685760405162461bcd60e51b815260206004820152601960248201527f437265617465323a204661696c6564206f6e206465706c6f790000000000000060448201526064016102bd565b6000604051836040820152846020820152828152600b8101905060ff815360559020949350505050565b80356001600160a01b03811681146103b957600080fd5b919050565b600080600080600060a086880312156103d657600080fd5b6103df866103a2565b9450602086013593506103f4604087016103a2565b94979396509394606081013594506080013592915050565b600080600080600080600060c0888a03121561042757600080fd5b610430886103a2565b965060208801359550610445604089016103a2565b9450606088013593506080880135925060a088013567ffffffffffffffff8082111561047057600080fd5b818a0191508a601f83011261048457600080fd5b81358181111561049357600080fd5b8b60208285010111156104a557600080fd5b60208301945080935050505092959891949750929550565b8183823760009101908152919050565b733d60ad80600a3d3981f3363d3d373d3d3d363d7360601b8152606083901b6bffffffffffffffffffffffff191660148201526e5af43d82803e903d91602b57fd5bf360881b60288201528151600090815b8181101561053c576020818601810151603786840101520161051f565b5060009201603701918252509291505056fea2646970667358221220e2587fca867549b42048ba247681a3b9d8e4fe0d15087826dd42a21f64e2739664736f6c63430008110033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100365760003560e01c80635e9bc5361461003b578063da7323b31461006a575b600080fd5b61004e6100493660046103be565b61007d565b6040516001600160a01b03909116815260200160405180910390f35b61004e61007836600461040c565b6100ac565b60008061008d87878787876101f2565b805160209091012090506100a1838261025b565b979650505050505050565b6000806100bc89898989896101f2565b905060006100d48660001b838051906020012061025b565b90506001600160a01b0381163b156100ef5791506100a19050565b604080516001600160a01b0383811682528c811660208301528183018c90528a1660608201526080810189905260a0810188905290517f07fba7bba1191da7ee1155dcfa0030701c9c9a9cc34a93b991fc6fd0c9268d8f9181900360c00190a161015b6000878461026f565b905083156101e5576000816001600160a01b0316868660405161017f9291906104bd565b6000604051808303816000865af19150503d80600081146101bc576040519150601f19603f3d011682016040523d82523d6000602084013e6101c1565b606091505b50509050806101e357604051630337323560e31b815260040160405180910390fd5b505b9998505050505050505050565b60408051602081018390529081018590526001600160a01b0384166060828101919091526080820184905290869060a00160408051601f198184030181529082905261024192916020016104cd565b604051602081830303815290604052905095945050505050565b6000610268838330610378565b9392505050565b6000834710156102c65760405162461bcd60e51b815260206004820152601d60248201527f437265617465323a20696e73756666696369656e742062616c616e636500000060448201526064015b60405180910390fd5b81516000036103175760405162461bcd60e51b815260206004820181905260248201527f437265617465323a2062797465636f6465206c656e677468206973207a65726f60448201526064016102bd565b8282516020840186f590506001600160a01b0381166102685760405162461bcd60e51b815260206004820152601960248201527f437265617465323a204661696c6564206f6e206465706c6f790000000000000060448201526064016102bd565b6000604051836040820152846020820152828152600b8101905060ff815360559020949350505050565b80356001600160a01b03811681146103b957600080fd5b919050565b600080600080600060a086880312156103d657600080fd5b6103df866103a2565b9450602086013593506103f4604087016103a2565b94979396509394606081013594506080013592915050565b600080600080600080600060c0888a03121561042757600080fd5b610430886103a2565b965060208801359550610445604089016103a2565b9450606088013593506080880135925060a088013567ffffffffffffffff8082111561047057600080fd5b818a0191508a601f83011261048457600080fd5b81358181111561049357600080fd5b8b60208285010111156104a557600080fd5b60208301945080935050505092959891949750929550565b8183823760009101908152919050565b733d60ad80600a3d3981f3363d3d373d3d3d363d7360601b8152606083901b6bffffffffffffffffffffffff191660148201526e5af43d82803e903d91602b57fd5bf360881b60288201528151600090815b8181101561053c576020818601810151603786840101520161051f565b5060009201603701918252509291505056fea2646970667358221220e2587fca867549b42048ba247681a3b9d8e4fe0d15087826dd42a21f64e2739664736f6c63430008110033

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.