Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
0x807578ca9ef18bd365928c5040eb84e191dea73e9a1940d1d13bab5607946585 | Create Account | (pending) | 19 days ago | IN | 0 ETH | (Pending) | |||
Create Account | 21190545 | 8 days ago | IN | 0 ETH | 0.00200398 | ||||
Create Account | 21190539 | 8 days ago | IN | 0 ETH | 0.0019854 | ||||
Create Account | 21176325 | 10 days ago | IN | 0 ETH | 0.00317146 | ||||
Create Account | 21081597 | 23 days ago | IN | 0 ETH | 0.00033369 | ||||
Create Account | 21081594 | 23 days ago | IN | 0 ETH | 0.0014962 | ||||
Create Account | 21008637 | 33 days ago | IN | 0 ETH | 0.00147715 | ||||
Create Account | 20253945 | 139 days ago | IN | 0 ETH | 0.00018353 | ||||
Create Account | 20144928 | 154 days ago | IN | 0 ETH | 0.0002517 | ||||
Create Account | 20144928 | 154 days ago | IN | 0 ETH | 0.0002517 | ||||
Create Account | 20135794 | 155 days ago | IN | 0 ETH | 0.00059453 | ||||
Create Account | 20135733 | 155 days ago | IN | 0 ETH | 0.00076187 | ||||
Create Account | 20034728 | 169 days ago | IN | 0 ETH | 0.00212202 | ||||
Create Account | 19981074 | 177 days ago | IN | 0 ETH | 0.0014383 | ||||
Create Account | 19931493 | 184 days ago | IN | 0 ETH | 0.00091685 | ||||
Create Account | 19931458 | 184 days ago | IN | 0 ETH | 0.00087743 | ||||
Create Account | 19887710 | 190 days ago | IN | 0 ETH | 0.00049447 | ||||
Create Account | 19708365 | 215 days ago | IN | 0 ETH | 0.00068338 | ||||
Create Account | 19627478 | 226 days ago | IN | 0 ETH | 0.00319394 | ||||
Create Account | 19620267 | 227 days ago | IN | 0 ETH | 0.00303673 | ||||
Create Account | 19605801 | 229 days ago | IN | 0 ETH | 0.0020698 | ||||
Create Account | 19601924 | 230 days ago | IN | 0 ETH | 0.00133007 | ||||
Create Account | 19601921 | 230 days ago | IN | 0 ETH | 0.00134092 | ||||
Create Account | 19601918 | 230 days ago | IN | 0 ETH | 0.00131316 | ||||
Create Account | 19601915 | 230 days ago | IN | 0 ETH | 0.00135817 |
Latest 25 internal transactions (View All)
Advanced mode:
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
ERC6551Registry
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// 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); } }
// 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) } } }
// 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); }
// 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_) ); } }
{ "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
- No Contract Security Audit Submitted- Submit Audit Here
[{"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"}]
Contract Creation Code
608060405234801561001057600080fd5b50610584806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80635e9bc5361461003b578063da7323b31461006a575b600080fd5b61004e6100493660046103be565b61007d565b6040516001600160a01b03909116815260200160405180910390f35b61004e61007836600461040c565b6100ac565b60008061008d87878787876101f2565b805160209091012090506100a1838261025b565b979650505050505050565b6000806100bc89898989896101f2565b905060006100d48660001b838051906020012061025b565b90506001600160a01b0381163b156100ef5791506100a19050565b604080516001600160a01b0383811682528c811660208301528183018c90528a1660608201526080810189905260a0810188905290517f07fba7bba1191da7ee1155dcfa0030701c9c9a9cc34a93b991fc6fd0c9268d8f9181900360c00190a161015b6000878461026f565b905083156101e5576000816001600160a01b0316868660405161017f9291906104bd565b6000604051808303816000865af19150503d80600081146101bc576040519150601f19603f3d011682016040523d82523d6000602084013e6101c1565b606091505b50509050806101e357604051630337323560e31b815260040160405180910390fd5b505b9998505050505050505050565b60408051602081018390529081018590526001600160a01b0384166060828101919091526080820184905290869060a00160408051601f198184030181529082905261024192916020016104cd565b604051602081830303815290604052905095945050505050565b6000610268838330610378565b9392505050565b6000834710156102c65760405162461bcd60e51b815260206004820152601d60248201527f437265617465323a20696e73756666696369656e742062616c616e636500000060448201526064015b60405180910390fd5b81516000036103175760405162461bcd60e51b815260206004820181905260248201527f437265617465323a2062797465636f6465206c656e677468206973207a65726f60448201526064016102bd565b8282516020840186f590506001600160a01b0381166102685760405162461bcd60e51b815260206004820152601960248201527f437265617465323a204661696c6564206f6e206465706c6f790000000000000060448201526064016102bd565b6000604051836040820152846020820152828152600b8101905060ff815360559020949350505050565b80356001600160a01b03811681146103b957600080fd5b919050565b600080600080600060a086880312156103d657600080fd5b6103df866103a2565b9450602086013593506103f4604087016103a2565b94979396509394606081013594506080013592915050565b600080600080600080600060c0888a03121561042757600080fd5b610430886103a2565b965060208801359550610445604089016103a2565b9450606088013593506080880135925060a088013567ffffffffffffffff8082111561047057600080fd5b818a0191508a601f83011261048457600080fd5b81358181111561049357600080fd5b8b60208285010111156104a557600080fd5b60208301945080935050505092959891949750929550565b8183823760009101908152919050565b733d60ad80600a3d3981f3363d3d373d3d3d363d7360601b8152606083901b6bffffffffffffffffffffffff191660148201526e5af43d82803e903d91602b57fd5bf360881b60288201528151600090815b8181101561053c576020818601810151603786840101520161051f565b5060009201603701918252509291505056fea2646970667358221220e2587fca867549b42048ba247681a3b9d8e4fe0d15087826dd42a21f64e2739664736f6c63430008110033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100365760003560e01c80635e9bc5361461003b578063da7323b31461006a575b600080fd5b61004e6100493660046103be565b61007d565b6040516001600160a01b03909116815260200160405180910390f35b61004e61007836600461040c565b6100ac565b60008061008d87878787876101f2565b805160209091012090506100a1838261025b565b979650505050505050565b6000806100bc89898989896101f2565b905060006100d48660001b838051906020012061025b565b90506001600160a01b0381163b156100ef5791506100a19050565b604080516001600160a01b0383811682528c811660208301528183018c90528a1660608201526080810189905260a0810188905290517f07fba7bba1191da7ee1155dcfa0030701c9c9a9cc34a93b991fc6fd0c9268d8f9181900360c00190a161015b6000878461026f565b905083156101e5576000816001600160a01b0316868660405161017f9291906104bd565b6000604051808303816000865af19150503d80600081146101bc576040519150601f19603f3d011682016040523d82523d6000602084013e6101c1565b606091505b50509050806101e357604051630337323560e31b815260040160405180910390fd5b505b9998505050505050505050565b60408051602081018390529081018590526001600160a01b0384166060828101919091526080820184905290869060a00160408051601f198184030181529082905261024192916020016104cd565b604051602081830303815290604052905095945050505050565b6000610268838330610378565b9392505050565b6000834710156102c65760405162461bcd60e51b815260206004820152601d60248201527f437265617465323a20696e73756666696369656e742062616c616e636500000060448201526064015b60405180910390fd5b81516000036103175760405162461bcd60e51b815260206004820181905260248201527f437265617465323a2062797465636f6465206c656e677468206973207a65726f60448201526064016102bd565b8282516020840186f590506001600160a01b0381166102685760405162461bcd60e51b815260206004820152601960248201527f437265617465323a204661696c6564206f6e206465706c6f790000000000000060448201526064016102bd565b6000604051836040820152846020820152828152600b8101905060ff815360559020949350505050565b80356001600160a01b03811681146103b957600080fd5b919050565b600080600080600060a086880312156103d657600080fd5b6103df866103a2565b9450602086013593506103f4604087016103a2565b94979396509394606081013594506080013592915050565b600080600080600080600060c0888a03121561042757600080fd5b610430886103a2565b965060208801359550610445604089016103a2565b9450606088013593506080880135925060a088013567ffffffffffffffff8082111561047057600080fd5b818a0191508a601f83011261048457600080fd5b81358181111561049357600080fd5b8b60208285010111156104a557600080fd5b60208301945080935050505092959891949750929550565b8183823760009101908152919050565b733d60ad80600a3d3981f3363d3d373d3d3d363d7360601b8152606083901b6bffffffffffffffffffffffff191660148201526e5af43d82803e903d91602b57fd5bf360881b60288201528151600090815b8181101561053c576020818601810151603786840101520161051f565b5060009201603701918252509291505056fea2646970667358221220e2587fca867549b42048ba247681a3b9d8e4fe0d15087826dd42a21f64e2739664736f6c63430008110033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.