ETH Price: $3,454.17 (-1.15%)
Gas: 48 Gwei

Contract

0x02101dfB77FDE026414827Fdc604ddAF224F0921
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
0xeeee14f5490ffcbfefb4152839b4ca53bfbbee80a9c2fbc29a84faa88326b880Create Account(pending)2024-04-11 21:30:4016 hrs ago1712871040IN
0x02101dfB...F224F0921
0 ETH(Pending)(Pending)
0x20719c8d151b1fe912ab6b4a8324d23e8a3e683557702a63b9026dcaa7feac92Create Account(pending)2024-04-07 13:49:025 days ago1712497742IN
0x02101dfB...F224F0921
0 ETH(Pending)(Pending)
Create Account196274782024-04-10 20:00:4742 hrs ago1712779247IN
0x02101dfB...F224F0921
0 ETH0.0031939425.37881739
Create Account196202672024-04-09 19:48:352 days ago1712692115IN
0x02101dfB...F224F0921
0 ETH0.0030367324.12734014
Create Account196058012024-04-07 19:09:114 days ago1712516951IN
0x02101dfB...F224F0921
0 ETH0.002069816.4464991
Create Account196019242024-04-07 6:07:115 days ago1712470031IN
0x02101dfB...F224F0921
0 ETH0.0013300710.56861593
Create Account196019212024-04-07 6:06:355 days ago1712469995IN
0x02101dfB...F224F0921
0 ETH0.0013409210.65489299
Create Account196019182024-04-07 6:05:595 days ago1712469959IN
0x02101dfB...F224F0921
0 ETH0.0013131610.43430866
Create Account196019152024-04-07 6:05:235 days ago1712469923IN
0x02101dfB...F224F0921
0 ETH0.0013581710.79192895
Create Account195754532024-04-03 13:10:359 days ago1712149835IN
0x02101dfB...F224F0921
0 ETH0.0033122626.32399159
Create Account194555392024-03-17 15:46:1125 days ago1710690371IN
0x02101dfB...F224F0921
0 ETH0.0045448236.11271252
Create Account194315512024-03-14 6:44:4729 days ago1710398687IN
0x02101dfB...F224F0921
0 ETH0.0057647745.80632335
Create Account193366712024-03-01 0:13:1142 days ago1709251991IN
0x02101dfB...F224F0921
0 ETH0.007070556.18155934
Create Account193103352024-02-26 7:45:3546 days ago1708933535IN
0x02101dfB...F224F0921
0 ETH0.004143832.92942564
Create Account192525042024-02-18 5:04:5954 days ago1708232699IN
0x02101dfB...F224F0921
0 ETH0.001825314.50511884
Create Account192162792024-02-13 3:01:4759 days ago1707793307IN
0x02101dfB...F224F0921
0 ETH0.0032623825.92263651
Create Account191577382024-02-04 21:53:4767 days ago1707083627IN
0x02101dfB...F224F0921
0 ETH0.0017873714.20227695
Create Account191566292024-02-04 18:08:5967 days ago1707070139IN
0x02101dfB...F224F0921
0 ETH0.0020711716.45731946
Create Account191441712024-02-03 0:06:3569 days ago1706918795IN
0x02101dfB...F224F0921
0 ETH0.0016283512.93873469
Create Account191429462024-02-02 19:58:5969 days ago1706903939IN
0x02101dfB...F224F0921
0 ETH0.0023965319.04263972
Create Account191362082024-02-01 21:17:3570 days ago1706822255IN
0x02101dfB...F224F0921
0 ETH0.003876230.79998288
Create Account191358472024-02-01 20:05:1170 days ago1706817911IN
0x02101dfB...F224F0921
0 ETH0.0045923636.49048497
Create Account191351022024-02-01 17:35:2370 days ago1706808923IN
0x02101dfB...F224F0921
0 ETH0.0038010630.20293351
Create Account191019362024-01-28 2:02:3575 days ago1706407355IN
0x02101dfB...F224F0921
0 ETH0.001144549.09442848
Create Account191009062024-01-27 22:33:1175 days ago1706394791IN
0x02101dfB...F224F0921
0 ETH0.00117099.30389279
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Txn Hash Block From To Value
196274782024-04-10 20:00:4742 hrs ago1712779247
0x02101dfB...F224F0921
 Contract Creation0 ETH
196202672024-04-09 19:48:352 days ago1712692115
0x02101dfB...F224F0921
 Contract Creation0 ETH
196058012024-04-07 19:09:114 days ago1712516951
0x02101dfB...F224F0921
 Contract Creation0 ETH
196019242024-04-07 6:07:115 days ago1712470031
0x02101dfB...F224F0921
 Contract Creation0 ETH
196019212024-04-07 6:06:355 days ago1712469995
0x02101dfB...F224F0921
 Contract Creation0 ETH
196019182024-04-07 6:05:595 days ago1712469959
0x02101dfB...F224F0921
 Contract Creation0 ETH
196019152024-04-07 6:05:235 days ago1712469923
0x02101dfB...F224F0921
 Contract Creation0 ETH
195754532024-04-03 13:10:359 days ago1712149835
0x02101dfB...F224F0921
 Contract Creation0 ETH
194555392024-03-17 15:46:1125 days ago1710690371
0x02101dfB...F224F0921
 Contract Creation0 ETH
194315512024-03-14 6:44:4729 days ago1710398687
0x02101dfB...F224F0921
 Contract Creation0 ETH
193451002024-03-02 4:28:1141 days ago1709353691
0x02101dfB...F224F0921
 Contract Creation0 ETH
193366712024-03-01 0:13:1142 days ago1709251991
0x02101dfB...F224F0921
 Contract Creation0 ETH
193105412024-02-26 8:26:5946 days ago1708936019
0x02101dfB...F224F0921
 Contract Creation0 ETH
193104382024-02-26 8:06:1146 days ago1708934771
0x02101dfB...F224F0921
 Contract Creation0 ETH
193103352024-02-26 7:45:3546 days ago1708933535
0x02101dfB...F224F0921
 Contract Creation0 ETH
192758572024-02-21 11:52:4751 days ago1708516367
0x02101dfB...F224F0921
 Contract Creation0 ETH
192533972024-02-18 8:06:5954 days ago1708243619
0x02101dfB...F224F0921
 Contract Creation0 ETH
192525042024-02-18 5:04:5954 days ago1708232699
0x02101dfB...F224F0921
 Contract Creation0 ETH
192517982024-02-18 2:41:3554 days ago1708224095
0x02101dfB...F224F0921
 Contract Creation0 ETH
192489872024-02-17 17:13:3554 days ago1708190015
0x02101dfB...F224F0921
 Contract Creation0 ETH
192162792024-02-13 3:01:4759 days ago1707793307
0x02101dfB...F224F0921
 Contract Creation0 ETH
191608432024-02-05 8:19:3567 days ago1707121175
0x02101dfB...F224F0921
 Contract Creation0 ETH
191577382024-02-04 21:53:4767 days ago1707083627
0x02101dfB...F224F0921
 Contract Creation0 ETH
191566292024-02-04 18:08:5967 days ago1707070139
0x02101dfB...F224F0921
 Contract Creation0 ETH
191502102024-02-03 20:29:1168 days ago1706992151
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 3 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 4 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 5 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

Txn 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.