Goerli Testnet

Contract

0x000000006551c19487814612e58FE06813775758
Source Code
Transaction Hash
Method
Block
From
To
Value
Create Account101601612023-12-05 5:12:2411 hrs 7 mins ago1701753144IN
0x000000...13775758
0 ETH0.000057290.60364467
Create Account101601602023-12-05 5:12:0011 hrs 7 mins ago1701753120IN
0x000000...13775758
0 ETH0.000057290.60364467
Create Account101601442023-12-05 5:08:1211 hrs 11 mins ago1701752892IN
0x000000...13775758
0 ETH0.000000470.00496996
Create Account101553002023-12-04 8:58:121 day 7 hrs ago1701680292IN
0x000000...13775758
0 ETH0.000189832.00000001
Create Account101552732023-12-04 8:50:361 day 7 hrs ago1701679836IN
0x000000...13775758
0 ETH0.000189832.00000001
Create Account101511392023-12-03 15:51:242 days 28 mins ago1701618684IN
0x000000...13775758
0 ETH0.000284783.00000014
Create Account101485952023-12-03 5:10:122 days 11 hrs ago1701580212IN
0x000000...13775758
0 ETH0.000284783.00000001
Create Account101398332023-12-01 17:00:003 days 23 hrs ago1701450000IN
0x000000...13775758
0 ETH0.000142391.50000008
Create Account101217892023-11-28 12:54:007 days 3 hrs ago1701176040IN
0x000000...13775758
0 ETH0.000284783.00000001
Create Account101211882023-11-28 10:22:367 days 5 hrs ago1701166956IN
0x000000...13775758
0 ETH0.00003831.50000001
Create Account101199002023-11-28 4:55:127 days 11 hrs ago1701147312IN
0x000000...13775758
0 ETH00.00000001
Create Account100936242023-11-23 12:39:2412 days 3 hrs ago1700743164IN
0x000000...13775758
0 ETH0.000142981.50000002
Create Account100844712023-11-21 21:50:0013 days 18 hrs ago1700603400IN
0x000000...13775758
0 ETH0.000038331.5
Create Account100844592023-11-21 21:46:4813 days 18 hrs ago1700603208IN
0x000000...13775758
0 ETH0.000038331.5
Create Account100844562023-11-21 21:46:1213 days 18 hrs ago1700603172IN
0x000000...13775758
0 ETH0.000038331.5
Create Account100844452023-11-21 21:43:4813 days 18 hrs ago1700603028IN
0x000000...13775758
0 ETH0.000038331.5
Create Account100844432023-11-21 21:43:1213 days 18 hrs ago1700602992IN
0x000000...13775758
0 ETH0.000142411.5
Create Account100838872023-11-21 19:25:2413 days 20 hrs ago1700594724IN
0x000000...13775758
0 ETH0.000038321.5
Create Account100838842023-11-21 19:24:1213 days 20 hrs ago1700594652IN
0x000000...13775758
0 ETH0.000142391.5
Create Account100834262023-11-21 17:29:1213 days 22 hrs ago1700587752IN
0x000000...13775758
0 ETH0.000142391.50000001
Create Account100833852023-11-21 17:19:1213 days 23 hrs ago1700587152IN
0x000000...13775758
0 ETH0.000142411.50000001
Create Account100648402023-11-18 11:39:4817 days 4 hrs ago1700307588IN
0x000000...13775758
0 ETH0.000142371.50000001
Create Account100647902023-11-18 11:26:0017 days 4 hrs ago1700306760IN
0x000000...13775758
0 ETH0.000142371.50000001
Create Account100646852023-11-18 10:58:3617 days 5 hrs ago1700305116IN
0x000000...13775758
0 ETH0.000142371.50000001
Create Account100223182023-11-11 2:18:0024 days 14 hrs ago1699669080IN
0x000000...13775758
0 ETH0.000237382.5
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Txn Hash Block From To Value
101601612023-12-05 5:12:2411 hrs 7 mins ago1701753144
0x000000...13775758
 Contract Creation0 ETH
101601602023-12-05 5:12:0011 hrs 7 mins ago1701753120
0x000000...13775758
 Contract Creation0 ETH
101601442023-12-05 5:08:1211 hrs 11 mins ago1701752892
0x000000...13775758
 Contract Creation0 ETH
101582342023-12-04 21:12:2419 hrs 7 mins ago1701724344
0x000000...13775758
 Contract Creation0 ETH
101582342023-12-04 21:12:2419 hrs 7 mins ago1701724344
0x000000...13775758
0 ETH
101581652023-12-04 20:54:4819 hrs 24 mins ago1701723288
0x000000...13775758
 Contract Creation0 ETH
101581652023-12-04 20:54:4819 hrs 24 mins ago1701723288
0x000000...13775758
0 ETH
101579142023-12-04 19:50:1220 hrs 29 mins ago1701719412
0x000000...13775758
 Contract Creation0 ETH
101579142023-12-04 19:50:1220 hrs 29 mins ago1701719412
0x000000...13775758
0 ETH
101553002023-12-04 8:58:121 day 7 hrs ago1701680292
0x000000...13775758
 Contract Creation0 ETH
101552732023-12-04 8:50:361 day 7 hrs ago1701679836
0x000000...13775758
 Contract Creation0 ETH
101541002023-12-04 3:59:481 day 12 hrs ago1701662388
0x000000...13775758
 Contract Creation0 ETH
101541002023-12-04 3:59:481 day 12 hrs ago1701662388
0x000000...13775758
0 ETH
101511392023-12-03 15:51:242 days 28 mins ago1701618684
0x000000...13775758
 Contract Creation0 ETH
101494502023-12-03 8:43:122 days 7 hrs ago1701592992
0x000000...13775758
 Contract Creation0 ETH
101494502023-12-03 8:43:122 days 7 hrs ago1701592992
0x000000...13775758
0 ETH
101485952023-12-03 5:10:122 days 11 hrs ago1701580212
0x000000...13775758
 Contract Creation0 ETH
101445722023-12-02 12:43:243 days 3 hrs ago1701521004
0x000000...13775758
 Contract Creation0 ETH
101445722023-12-02 12:43:243 days 3 hrs ago1701521004
0x000000...13775758
0 ETH
101445722023-12-02 12:43:243 days 3 hrs ago1701521004
0x000000...13775758
0 ETH
101444612023-12-02 12:16:483 days 4 hrs ago1701519408
0x000000...13775758
0 ETH
101444592023-12-02 12:16:243 days 4 hrs ago1701519384
0x000000...13775758
 Contract Creation0 ETH
101444592023-12-02 12:16:243 days 4 hrs ago1701519384
0x000000...13775758
0 ETH
101444592023-12-02 12:16:243 days 4 hrs ago1701519384
0x000000...13775758
0 ETH
101430342023-12-02 6:24:003 days 9 hrs ago1701498240
0x000000...13775758
 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:
london EvmVersion

Contract Source Code (Solidity Standard Json-Input format)

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

interface IERC6551Registry {
    /**
     * @dev The registry MUST emit the ERC6551AccountCreated event upon successful account creation.
     */
    event ERC6551AccountCreated(
        address account,
        address indexed implementation,
        bytes32 salt,
        uint256 chainId,
        address indexed tokenContract,
        uint256 indexed tokenId
    );

    /**
     * @dev The registry MUST revert with AccountCreationFailed error if the create2 operation fails.
     */
    error AccountCreationFailed();

    /**
     * @dev Creates a token bound account for a non-fungible token.
     *
     * If account has already been created, returns the account address without calling create2.
     *
     * Emits ERC6551AccountCreated event.
     *
     * @return account The address of the token bound account
     */
    function createAccount(
        address implementation,
        bytes32 salt,
        uint256 chainId,
        address tokenContract,
        uint256 tokenId
    ) external returns (address account);

    /**
     * @dev Returns the computed token bound account address for a non-fungible token.
     *
     * @return account The address of the token bound account
     */
    function account(
        address implementation,
        bytes32 salt,
        uint256 chainId,
        address tokenContract,
        uint256 tokenId
    ) external view returns (address account);
}

contract ERC6551Registry is IERC6551Registry {
    function createAccount(
        address implementation,
        bytes32 salt,
        uint256 chainId,
        address tokenContract,
        uint256 tokenId
    ) external returns (address) {
        assembly {
            // Memory Layout:
            // ----
            // 0x00   0xff                           (1 byte)
            // 0x01   registry (address)             (20 bytes)
            // 0x15   salt (bytes32)                 (32 bytes)
            // 0x35   Bytecode Hash (bytes32)        (32 bytes)
            // ----
            // 0x55   ERC-1167 Constructor + Header  (20 bytes)
            // 0x69   implementation (address)       (20 bytes)
            // 0x5D   ERC-1167 Footer                (15 bytes)
            // 0x8C   salt (uint256)                 (32 bytes)
            // 0xAC   chainId (uint256)              (32 bytes)
            // 0xCC   tokenContract (address)        (32 bytes)
            // 0xEC   tokenId (uint256)              (32 bytes)

            // Silence unused variable warnings
            pop(chainId)

            // Copy bytecode + constant data to memory
            calldatacopy(0x8c, 0x24, 0x80) // salt, chainId, tokenContract, tokenId
            mstore(0x6c, 0x5af43d82803e903d91602b57fd5bf3) // ERC-1167 footer
            mstore(0x5d, implementation) // implementation
            mstore(0x49, 0x3d60ad80600a3d3981f3363d3d373d3d3d363d73) // ERC-1167 constructor + header

            // Copy create2 computation data to memory
            mstore8(0x00, 0xff) // 0xFF
            mstore(0x35, keccak256(0x55, 0xb7)) // keccak256(bytecode)
            mstore(0x01, shl(96, address())) // registry address
            mstore(0x15, salt) // salt

            // Compute account address
            let computed := keccak256(0x00, 0x55)

            // If the account has not yet been deployed
            if iszero(extcodesize(computed)) {
                // Deploy account contract
                let deployed := create2(0, 0x55, 0xb7, salt)

                // Revert if the deployment fails
                if iszero(deployed) {
                    mstore(0x00, 0x20188a59) // `AccountCreationFailed()`
                    revert(0x1c, 0x04)
                }

                // Store account address in memory before salt and chainId
                mstore(0x6c, deployed)

                // Emit the ERC6551AccountCreated event
                log4(
                    0x6c,
                    0x60,
                    // `ERC6551AccountCreated(address,address,bytes32,uint256,address,uint256)`
                    0x79f19b3655ee38b1ce526556b7731a20c8f218fbda4a3990b6cc4172fdf88722,
                    implementation,
                    tokenContract,
                    tokenId
                )

                // Return the account address
                return(0x6c, 0x20)
            }

            // Otherwise, return the computed account address
            mstore(0x00, shr(96, shl(96, computed)))
            return(0x00, 0x20)
        }
    }

    function account(
        address implementation,
        bytes32 salt,
        uint256 chainId,
        address tokenContract,
        uint256 tokenId
    ) external view returns (address) {
        assembly {
            // Silence unused variable warnings
            pop(chainId)
            pop(tokenContract)
            pop(tokenId)

            // Copy bytecode + constant data to memory
            calldatacopy(0x8c, 0x24, 0x80) // salt, chainId, tokenContract, tokenId
            mstore(0x6c, 0x5af43d82803e903d91602b57fd5bf3) // ERC-1167 footer
            mstore(0x5d, implementation) // implementation
            mstore(0x49, 0x3d60ad80600a3d3981f3363d3d373d3d3d363d73) // ERC-1167 constructor + header

            // Copy create2 computation data to memory
            mstore8(0x00, 0xff) // 0xFF
            mstore(0x35, keccak256(0x55, 0xb7)) // keccak256(bytecode)
            mstore(0x01, shl(96, address())) // registry address
            mstore(0x15, salt) // salt

            // Store computed account address in memory
            mstore(0x00, shr(96, shl(96, keccak256(0x00, 0x55))))

            // Return computed account address
            return(0x00, 0x20)
        }
    }
}

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

Contract ABI

[{"inputs":[],"name":"AccountCreationFailed","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"implementation","type":"address"},{"indexed":false,"internalType":"bytes32","name":"salt","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"chainId","type":"uint256"},{"indexed":true,"internalType":"address","name":"tokenContract","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ERC6551AccountCreated","type":"event"},{"inputs":[{"internalType":"address","name":"implementation","type":"address"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"address","name":"tokenContract","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"account","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"implementation","type":"address"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"address","name":"tokenContract","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"createAccount","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b5061023b806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c8063246a00211461003b5780638a54c52f1461006a575b600080fd5b61004e6100493660046101b7565b61007d565b6040516001600160a01b03909116815260200160405180910390f35b61004e6100783660046101b7565b6100e1565b600060806024608c376e5af43d82803e903d91602b57fd5bf3606c5285605d52733d60ad80600a3d3981f3363d3d373d3d3d363d7360495260ff60005360b76055206035523060601b60015284601552605560002060601b60601c60005260206000f35b600060806024608c376e5af43d82803e903d91602b57fd5bf3606c5285605d52733d60ad80600a3d3981f3363d3d373d3d3d363d7360495260ff60005360b76055206035523060601b600152846015526055600020803b61018b578560b760556000f580610157576320188a596000526004601cfd5b80606c52508284887f79f19b3655ee38b1ce526556b7731a20c8f218fbda4a3990b6cc4172fdf887226060606ca46020606cf35b8060601b60601c60005260206000f35b80356001600160a01b03811681146101b257600080fd5b919050565b600080600080600060a086880312156101cf57600080fd5b6101d88661019b565b945060208601359350604086013592506101f46060870161019b565b94979396509194608001359291505056fea2646970667358221220ea2fe53af507453c64dd7c1db05549fa47a298dfb825d6d11e1689856135f16764736f6c63430008110033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100365760003560e01c8063246a00211461003b5780638a54c52f1461006a575b600080fd5b61004e6100493660046101b7565b61007d565b6040516001600160a01b03909116815260200160405180910390f35b61004e6100783660046101b7565b6100e1565b600060806024608c376e5af43d82803e903d91602b57fd5bf3606c5285605d52733d60ad80600a3d3981f3363d3d373d3d3d363d7360495260ff60005360b76055206035523060601b60015284601552605560002060601b60601c60005260206000f35b600060806024608c376e5af43d82803e903d91602b57fd5bf3606c5285605d52733d60ad80600a3d3981f3363d3d373d3d3d363d7360495260ff60005360b76055206035523060601b600152846015526055600020803b61018b578560b760556000f580610157576320188a596000526004601cfd5b80606c52508284887f79f19b3655ee38b1ce526556b7731a20c8f218fbda4a3990b6cc4172fdf887226060606ca46020606cf35b8060601b60601c60005260206000f35b80356001600160a01b03811681146101b257600080fd5b919050565b600080600080600060a086880312156101cf57600080fd5b6101d88661019b565b945060208601359350604086013592506101f46060870161019b565b94979396509194608001359291505056fea2646970667358221220ea2fe53af507453c64dd7c1db05549fa47a298dfb825d6d11e1689856135f16764736f6c63430008110033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
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.