Source Code
Overview
ETH Balance
0 ETH
More Info
ContractCreator
Multichain Info
N/A
Latest 25 internal transactions (View All)
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
5068127 | 11 days ago | 0 ETH | ||||
5068127 | 11 days ago | 0 ETH | ||||
5068127 | 11 days ago | 0 ETH | ||||
5068127 | 11 days ago | 0 ETH | ||||
5068127 | 11 days ago | 0 ETH | ||||
5068127 | 11 days ago | 0 ETH | ||||
5068127 | 11 days ago | 0 ETH | ||||
5068127 | 11 days ago | 0 ETH | ||||
5068127 | 11 days ago | 0 ETH | ||||
5068127 | 11 days ago | 0 ETH | ||||
5068127 | 11 days ago | 0 ETH | ||||
5068127 | 11 days ago | 0 ETH | ||||
5068127 | 11 days ago | 0 ETH | ||||
5067644 | 11 days ago | 0 ETH | ||||
5067644 | 11 days ago | 0 ETH | ||||
5067644 | 11 days ago | 0 ETH | ||||
5067644 | 11 days ago | 0 ETH | ||||
5067644 | 11 days ago | 0 ETH | ||||
5067644 | 11 days ago | 0 ETH | ||||
5067644 | 11 days ago | 0 ETH | ||||
5067644 | 11 days ago | 0 ETH | ||||
5067644 | 11 days ago | 0 ETH | ||||
5067644 | 11 days ago | 0 ETH | ||||
5067644 | 11 days ago | 0 ETH | ||||
5067644 | 11 days ago | 0 ETH |
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:
MagicDropTokenImplRegistry
Compiler Version
v0.8.22-1.0.1
ZkSolc Version
v1.5.7
Contract Source Code (Solidity)
/** *Submitted for verification at sepolia.abscan.org on 2025-01-25 */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.0 ^0.8.22 ^0.8.4; // lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); } // lib/solady/src/auth/Ownable.sol /// @notice Simple single owner authorization mixin. /// @author Solady (https://github.com/vectorized/solady/blob/main/src/auth/Ownable.sol) /// /// @dev Note: /// This implementation does NOT auto-initialize the owner to `msg.sender`. /// You MUST call the `_initializeOwner` in the constructor / initializer. /// /// While the ownable portion follows /// [EIP-173](https://eips.ethereum.org/EIPS/eip-173) for compatibility, /// the nomenclature for the 2-step ownership handover may be unique to this codebase. abstract contract Ownable { /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* CUSTOM ERRORS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev The caller is not authorized to call the function. error Unauthorized(); /// @dev The `newOwner` cannot be the zero address. error NewOwnerIsZeroAddress(); /// @dev The `pendingOwner` does not have a valid handover request. error NoHandoverRequest(); /// @dev Cannot double-initialize. error AlreadyInitialized(); /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* EVENTS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev The ownership is transferred from `oldOwner` to `newOwner`. /// This event is intentionally kept the same as OpenZeppelin's Ownable to be /// compatible with indexers and [EIP-173](https://eips.ethereum.org/EIPS/eip-173), /// despite it not being as lightweight as a single argument event. event OwnershipTransferred(address indexed oldOwner, address indexed newOwner); /// @dev An ownership handover to `pendingOwner` has been requested. event OwnershipHandoverRequested(address indexed pendingOwner); /// @dev The ownership handover to `pendingOwner` has been canceled. event OwnershipHandoverCanceled(address indexed pendingOwner); /// @dev `keccak256(bytes("OwnershipTransferred(address,address)"))`. uint256 private constant _OWNERSHIP_TRANSFERRED_EVENT_SIGNATURE = 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0; /// @dev `keccak256(bytes("OwnershipHandoverRequested(address)"))`. uint256 private constant _OWNERSHIP_HANDOVER_REQUESTED_EVENT_SIGNATURE = 0xdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d; /// @dev `keccak256(bytes("OwnershipHandoverCanceled(address)"))`. uint256 private constant _OWNERSHIP_HANDOVER_CANCELED_EVENT_SIGNATURE = 0xfa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92; /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* STORAGE */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev The owner slot is given by: /// `bytes32(~uint256(uint32(bytes4(keccak256("_OWNER_SLOT_NOT")))))`. /// It is intentionally chosen to be a high value /// to avoid collision with lower slots. /// The choice of manual storage layout is to enable compatibility /// with both regular and upgradeable contracts. bytes32 internal constant _OWNER_SLOT = 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927; /// The ownership handover slot of `newOwner` is given by: /// ``` /// mstore(0x00, or(shl(96, user), _HANDOVER_SLOT_SEED)) /// let handoverSlot := keccak256(0x00, 0x20) /// ``` /// It stores the expiry timestamp of the two-step ownership handover. uint256 private constant _HANDOVER_SLOT_SEED = 0x389a75e1; /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* INTERNAL FUNCTIONS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Override to return true to make `_initializeOwner` prevent double-initialization. function _guardInitializeOwner() internal pure virtual returns (bool guard) {} /// @dev Initializes the owner directly without authorization guard. /// This function must be called upon initialization, /// regardless of whether the contract is upgradeable or not. /// This is to enable generalization to both regular and upgradeable contracts, /// and to save gas in case the initial owner is not the caller. /// For performance reasons, this function will not check if there /// is an existing owner. function _initializeOwner(address newOwner) internal virtual { if (_guardInitializeOwner()) { /// @solidity memory-safe-assembly assembly { let ownerSlot := _OWNER_SLOT if sload(ownerSlot) { mstore(0x00, 0x0dc149f0) // `AlreadyInitialized()`. revert(0x1c, 0x04) } // Clean the upper 96 bits. newOwner := shr(96, shl(96, newOwner)) // Store the new value. sstore(ownerSlot, or(newOwner, shl(255, iszero(newOwner)))) // Emit the {OwnershipTransferred} event. log3(0, 0, _OWNERSHIP_TRANSFERRED_EVENT_SIGNATURE, 0, newOwner) } } else { /// @solidity memory-safe-assembly assembly { // Clean the upper 96 bits. newOwner := shr(96, shl(96, newOwner)) // Store the new value. sstore(_OWNER_SLOT, newOwner) // Emit the {OwnershipTransferred} event. log3(0, 0, _OWNERSHIP_TRANSFERRED_EVENT_SIGNATURE, 0, newOwner) } } } /// @dev Sets the owner directly without authorization guard. function _setOwner(address newOwner) internal virtual { if (_guardInitializeOwner()) { /// @solidity memory-safe-assembly assembly { let ownerSlot := _OWNER_SLOT // Clean the upper 96 bits. newOwner := shr(96, shl(96, newOwner)) // Emit the {OwnershipTransferred} event. log3(0, 0, _OWNERSHIP_TRANSFERRED_EVENT_SIGNATURE, sload(ownerSlot), newOwner) // Store the new value. sstore(ownerSlot, or(newOwner, shl(255, iszero(newOwner)))) } } else { /// @solidity memory-safe-assembly assembly { let ownerSlot := _OWNER_SLOT // Clean the upper 96 bits. newOwner := shr(96, shl(96, newOwner)) // Emit the {OwnershipTransferred} event. log3(0, 0, _OWNERSHIP_TRANSFERRED_EVENT_SIGNATURE, sload(ownerSlot), newOwner) // Store the new value. sstore(ownerSlot, newOwner) } } } /// @dev Throws if the sender is not the owner. function _checkOwner() internal view virtual { /// @solidity memory-safe-assembly assembly { // If the caller is not the stored owner, revert. if iszero(eq(caller(), sload(_OWNER_SLOT))) { mstore(0x00, 0x82b42900) // `Unauthorized()`. revert(0x1c, 0x04) } } } /// @dev Returns how long a two-step ownership handover is valid for in seconds. /// Override to return a different value if needed. /// Made internal to conserve bytecode. Wrap it in a public function if needed. function _ownershipHandoverValidFor() internal view virtual returns (uint64) { return 48 * 3600; } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* PUBLIC UPDATE FUNCTIONS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Allows the owner to transfer the ownership to `newOwner`. function transferOwnership(address newOwner) public payable virtual onlyOwner { /// @solidity memory-safe-assembly assembly { if iszero(shl(96, newOwner)) { mstore(0x00, 0x7448fbae) // `NewOwnerIsZeroAddress()`. revert(0x1c, 0x04) } } _setOwner(newOwner); } /// @dev Allows the owner to renounce their ownership. function renounceOwnership() public payable virtual onlyOwner { _setOwner(address(0)); } /// @dev Request a two-step ownership handover to the caller. /// The request will automatically expire in 48 hours (172800 seconds) by default. function requestOwnershipHandover() public payable virtual { unchecked { uint256 expires = block.timestamp + _ownershipHandoverValidFor(); /// @solidity memory-safe-assembly assembly { // Compute and set the handover slot to `expires`. mstore(0x0c, _HANDOVER_SLOT_SEED) mstore(0x00, caller()) sstore(keccak256(0x0c, 0x20), expires) // Emit the {OwnershipHandoverRequested} event. log2(0, 0, _OWNERSHIP_HANDOVER_REQUESTED_EVENT_SIGNATURE, caller()) } } } /// @dev Cancels the two-step ownership handover to the caller, if any. function cancelOwnershipHandover() public payable virtual { /// @solidity memory-safe-assembly assembly { // Compute and set the handover slot to 0. mstore(0x0c, _HANDOVER_SLOT_SEED) mstore(0x00, caller()) sstore(keccak256(0x0c, 0x20), 0) // Emit the {OwnershipHandoverCanceled} event. log2(0, 0, _OWNERSHIP_HANDOVER_CANCELED_EVENT_SIGNATURE, caller()) } } /// @dev Allows the owner to complete the two-step ownership handover to `pendingOwner`. /// Reverts if there is no existing ownership handover requested by `pendingOwner`. function completeOwnershipHandover(address pendingOwner) public payable virtual onlyOwner { /// @solidity memory-safe-assembly assembly { // Compute and set the handover slot to 0. mstore(0x0c, _HANDOVER_SLOT_SEED) mstore(0x00, pendingOwner) let handoverSlot := keccak256(0x0c, 0x20) // If the handover does not exist, or has expired. if gt(timestamp(), sload(handoverSlot)) { mstore(0x00, 0x6f5e8818) // `NoHandoverRequest()`. revert(0x1c, 0x04) } // Set the handover slot to 0. sstore(handoverSlot, 0) } _setOwner(pendingOwner); } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* PUBLIC READ FUNCTIONS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Returns the owner of the contract. function owner() public view virtual returns (address result) { /// @solidity memory-safe-assembly assembly { result := sload(_OWNER_SLOT) } } /// @dev Returns the expiry timestamp for the two-step ownership handover to `pendingOwner`. function ownershipHandoverExpiresAt(address pendingOwner) public view virtual returns (uint256 result) { /// @solidity memory-safe-assembly assembly { // Compute the handover slot. mstore(0x0c, _HANDOVER_SLOT_SEED) mstore(0x00, pendingOwner) // Load the handover slot. result := sload(keccak256(0x0c, 0x20)) } } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* MODIFIERS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Marks a function as only callable by the owner. modifier onlyOwner() virtual { _checkOwner(); _; } } // lib/solady/src/utils/UUPSUpgradeable.sol /// @notice UUPS proxy mixin. /// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/UUPSUpgradeable.sol) /// @author Modified from OpenZeppelin /// (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/proxy/utils/UUPSUpgradeable.sol) /// /// @dev Note: /// - This implementation is intended to be used with ERC1967 proxies. /// See: `LibClone.deployERC1967` and related functions. /// - This implementation is NOT compatible with legacy OpenZeppelin proxies /// which do not store the implementation at `_ERC1967_IMPLEMENTATION_SLOT`. abstract contract UUPSUpgradeable { /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* CUSTOM ERRORS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev The upgrade failed. error UpgradeFailed(); /// @dev The call is from an unauthorized call context. error UnauthorizedCallContext(); /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* IMMUTABLES */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev For checking if the context is a delegate call. uint256 private immutable __self = uint256(uint160(address(this))); /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* EVENTS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Emitted when the proxy's implementation is upgraded. event Upgraded(address indexed implementation); /// @dev `keccak256(bytes("Upgraded(address)"))`. uint256 private constant _UPGRADED_EVENT_SIGNATURE = 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b; /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* STORAGE */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev The ERC-1967 storage slot for the implementation in the proxy. /// `uint256(keccak256("eip1967.proxy.implementation")) - 1`. bytes32 internal constant _ERC1967_IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* UUPS OPERATIONS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Please override this function to check if `msg.sender` is authorized /// to upgrade the proxy to `newImplementation`, reverting if not. /// ``` /// function _authorizeUpgrade(address) internal override onlyOwner {} /// ``` function _authorizeUpgrade(address newImplementation) internal virtual; /// @dev Returns the storage slot used by the implementation, /// as specified in [ERC1822](https://eips.ethereum.org/EIPS/eip-1822). /// /// Note: The `notDelegated` modifier prevents accidental upgrades to /// an implementation that is a proxy contract. function proxiableUUID() public view virtual notDelegated returns (bytes32) { // This function must always return `_ERC1967_IMPLEMENTATION_SLOT` to comply with ERC1967. return _ERC1967_IMPLEMENTATION_SLOT; } /// @dev Upgrades the proxy's implementation to `newImplementation`. /// Emits a {Upgraded} event. /// /// Note: Passing in empty `data` skips the delegatecall to `newImplementation`. function upgradeToAndCall(address newImplementation, bytes calldata data) public payable virtual onlyProxy { _authorizeUpgrade(newImplementation); /// @solidity memory-safe-assembly assembly { newImplementation := shr(96, shl(96, newImplementation)) // Clears upper 96 bits. mstore(0x00, returndatasize()) mstore(0x01, 0x52d1902d) // `proxiableUUID()`. let s := _ERC1967_IMPLEMENTATION_SLOT // Check if `newImplementation` implements `proxiableUUID` correctly. if iszero(eq(mload(staticcall(gas(), newImplementation, 0x1d, 0x04, 0x01, 0x20)), s)) { mstore(0x01, 0x55299b49) // `UpgradeFailed()`. revert(0x1d, 0x04) } // Emit the {Upgraded} event. log2(codesize(), 0x00, _UPGRADED_EVENT_SIGNATURE, newImplementation) sstore(s, newImplementation) // Updates the implementation. // Perform a delegatecall to `newImplementation` if `data` is non-empty. if data.length { // Forwards the `data` to `newImplementation` via delegatecall. let m := mload(0x40) calldatacopy(m, data.offset, data.length) if iszero(delegatecall(gas(), newImplementation, m, data.length, codesize(), 0x00)) { // Bubble up the revert if the call reverts. returndatacopy(m, 0x00, returndatasize()) revert(m, returndatasize()) } } } } /// @dev Requires that the execution is performed through a proxy. modifier onlyProxy() { uint256 s = __self; /// @solidity memory-safe-assembly assembly { // To enable use cases with an immutable default implementation in the bytecode, // (see: ERC6551Proxy), we don't require that the proxy address must match the // value stored in the implementation slot, which may not be initialized. if eq(s, address()) { mstore(0x00, 0x9f03a026) // `UnauthorizedCallContext()`. revert(0x1c, 0x04) } } _; } /// @dev Requires that the execution is NOT performed via delegatecall. /// This is the opposite of `onlyProxy`. modifier notDelegated() { uint256 s = __self; /// @solidity memory-safe-assembly assembly { if iszero(eq(s, address())) { mstore(0x00, 0x9f03a026) // `UnauthorizedCallContext()`. revert(0x1c, 0x04) } } _; } } // src/common/Structs.sol enum TokenStandard { ERC721, ERC1155, ERC20 } struct MintStageInfo { uint80 price; uint80 mintFee; uint32 walletLimit; // 0 for unlimited bytes32 merkleRoot; // 0x0 for no presale enforced uint24 maxStageSupply; // 0 for unlimited uint256 startTimeUnixSeconds; uint256 endTimeUnixSeconds; } struct MintStageInfo1155 { uint80[] price; uint80[] mintFee; uint32[] walletLimit; // 0 for unlimited bytes32[] merkleRoot; // 0x0 for no presale enforced uint24[] maxStageSupply; // 0 for unlimited uint256 startTimeUnixSeconds; uint256 endTimeUnixSeconds; } struct SetupConfig { /// @dev The maximum number of tokens that can be minted. /// - Can be decreased if current supply < new max supply /// - Cannot be increased once set uint256 maxSupply; /// @dev The maximum number of tokens that can be minted per wallet /// @notice A value of 0 indicates unlimited mints per wallet uint256 walletLimit; /// @dev The base URI of the token. string baseURI; /// @dev The contract URI of the token. string contractURI; /// @dev The mint stages of the token. MintStageInfo[] stages; /// @dev The payout recipient of the token. address payoutRecipient; /// @dev The royalty recipient of the token. address royaltyRecipient; /// @dev The royalty basis points of the token. uint96 royaltyBps; } // src/registry/interfaces/IMagicDropTokenImplRegistry.sol interface IMagicDropTokenImplRegistry { function registerImplementation(TokenStandard standard, address impl, bool isDefault, uint256 deploymentFee) external returns (uint32); function unregisterImplementation(TokenStandard standard, uint32 implId) external; function getImplementation(TokenStandard standard, uint32 implId) external view returns (address); function getDeploymentFee(TokenStandard standard, uint32 implId) external view returns (uint256); function setDeploymentFee(TokenStandard standard, uint32 implId, uint256 deploymentFee) external; } // src/registry/MagicDropTokenImplRegistry.sol /// @title MagicDropTokenImplRegistry /// @dev A registry for managing token implementation addresses for different token standards. /// This contract is upgradeable and uses the UUPS pattern. contract MagicDropTokenImplRegistry is UUPSUpgradeable, Ownable, IMagicDropTokenImplRegistry { /*============================================================== = STRUCTS = ==============================================================*/ struct RegistryData { bytes4 interfaceId; uint32 nextImplId; uint32 defaultImplId; mapping(uint256 => address) implementations; mapping(uint256 => uint256) deploymentFees; //implementationId => deploymentFee } struct RegistryStorage { mapping(TokenStandard => RegistryData) tokenStandardData; } /*============================================================== = STORAGE = ==============================================================*/ // keccak256(abi.encode(uint256(keccak256("magicdrop.registry.MagicDropTokenImplRegistry")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant MAGICDROP_REGISTRY_STORAGE = 0xfd008fcd1deb21680f735a35fafc51691c5fb3daec313cfea4dc62938bee9000; /*============================================================== = EVENTS = ==============================================================*/ event ImplementationRegistered(TokenStandard standard, address impl, uint32 implId, uint256 deploymentFee); event ImplementationUnregistered(TokenStandard standard, uint32 implId); event DefaultImplementationSet(TokenStandard standard, uint32 implId); event DeploymentFeeSet(TokenStandard standard, uint32 implId, uint256 deploymentFee); /*============================================================== = ERRORS = ==============================================================*/ error InvalidImplementation(); error ImplementationDoesNotSupportStandard(); error UnsupportedTokenStandard(); error DefaultImplementationNotRegistered(); /*============================================================== = CONSTRUCTOR = ==============================================================*/ /// @param initialOwner The address of the initial owner constructor(address initialOwner) public { _initializeOwner(initialOwner); // Initialize nextImplId and interface IDs for each token standard RegistryStorage storage $ = _loadRegistryStorage(); $.tokenStandardData[TokenStandard.ERC721].nextImplId = 1; $.tokenStandardData[TokenStandard.ERC721].interfaceId = 0x80ac58cd; // ERC721 interface ID $.tokenStandardData[TokenStandard.ERC1155].nextImplId = 1; $.tokenStandardData[TokenStandard.ERC1155].interfaceId = 0xd9b67a26; // ERC1155 interface ID } /*============================================================== = PUBLIC VIEW METHODS = ==============================================================*/ /// @dev Retrieves the implementation address for a given token standard and implementation ID. /// @param standard The token standard (ERC721, ERC1155). /// @param implId The ID of the implementation. /// @notice Reverts if the implementation is not registered. /// @return implAddress The address of the implementation contract. function getImplementation(TokenStandard standard, uint32 implId) external view returns (address implAddress) { assembly { // Compute s1 = keccak256(abi.encode(standard, MAGICDROP_REGISTRY_STORAGE)) mstore(0x00, standard) mstore(0x20, MAGICDROP_REGISTRY_STORAGE) let s1 := keccak256(0x00, 0x40) // Compute storage slot for implementations[implId] mstore(0x00, implId) mstore(0x20, add(s1, 1)) let implSlot := keccak256(0x00, 0x40) implAddress := sload(implSlot) // Revert if the implementation is not registered if iszero(implAddress) { mstore(0x00, 0x68155f9a) // revert InvalidImplementation() revert(0x1c, 0x04) } } } /// @dev Gets the default implementation ID for a given token standard /// @param standard The token standard (ERC721, ERC1155) /// @notice Reverts if the default implementation is not registered. /// @return defaultImplId The default implementation ID for the given standard function getDefaultImplementationID(TokenStandard standard) external view returns (uint32 defaultImplId) { assembly { // Compute storage slot for tokenStandardData[standard] mstore(0x00, standard) mstore(0x20, MAGICDROP_REGISTRY_STORAGE) let slot := keccak256(0x00, 0x40) // Extract 'defaultImplId' by shifting and masking // Shift right by 64 bits to bring 'defaultImplId' to bits 0-31 let shiftedData := shr(64, sload(slot)) // Mask to extract the lower 32 bits defaultImplId := and(shiftedData, 0xffffffff) // Check if defaultImplId is 0 and revert if so if iszero(defaultImplId) { // revert DefaultImplementationNotRegistered() mstore(0x00, 0x161378fc) revert(0x1c, 0x04) } } } /// @dev Gets the default implementation address for a given token standard /// @param standard The token standard (ERC721, ERC1155) /// @notice Reverts if the default implementation is not registered. /// @return implAddress The default implementation address for the given standard function getDefaultImplementation(TokenStandard standard) external view returns (address implAddress) { assembly { mstore(0x00, standard) mstore(0x20, MAGICDROP_REGISTRY_STORAGE) let slot := keccak256(0x00, 0x40) // Extract 'defaultImplId' by shifting and masking // Shift right by 64 bits to bring 'defaultImplId' to bits 0-31 let shiftedData := shr(64, sload(slot)) // Mask to extract the lower 32 bits let defaultImplId := and(shiftedData, 0xffffffff) // Revert if the default implementation is not registered if iszero(defaultImplId) { // revert DefaultImplementationNotRegistered() mstore(0x00, 0x161378fc) revert(0x1c, 0x04) } // Compute storage slot for implementations[defaultImplId] mstore(0x00, defaultImplId) mstore(0x20, add(slot, 1)) let implSlot := keccak256(0x00, 0x40) implAddress := sload(implSlot) } } /// @dev Gets the deployment fee for a given token standard /// @param standard The token standard (ERC721, ERC1155, ERC20) /// @param implId The implementation ID /// @return deploymentFee The deployment fee for the given standard function getDeploymentFee(TokenStandard standard, uint32 implId) external view returns (uint256 deploymentFee) { assembly { mstore(0x00, standard) mstore(0x20, MAGICDROP_REGISTRY_STORAGE) let slot := keccak256(0x00, 0x40) mstore(0x00, implId) mstore(0x20, add(slot, 2)) let implSlot := keccak256(0x00, 0x40) deploymentFee := sload(implSlot) } } /*============================================================== = INTERNAL HELPERS = ==============================================================*/ /// @dev Loads the registry storage. /// @return $ The registry storage. function _loadRegistryStorage() internal pure returns (RegistryStorage storage $) { assembly { $.slot := MAGICDROP_REGISTRY_STORAGE } } /*============================================================== = ADMIN OPERATIONS = ==============================================================*/ /// @dev Registers a new implementation for a given token standard. /// @param standard The token standard (ERC721, ERC1155, ERC20). /// @param impl The address of the implementation contract. /// @param isDefault Whether the implementation should be set as the default implementation /// @param deploymentFee The deployment fee for the implementation /// @notice Only the contract owner can call this function. /// @notice Reverts if an implementation with the same name is already registered. /// @return The ID of the newly registered implementation function registerImplementation(TokenStandard standard, address impl, bool isDefault, uint256 deploymentFee) external onlyOwner returns (uint32) { RegistryStorage storage $ = _loadRegistryStorage(); bytes4 interfaceId = $.tokenStandardData[standard].interfaceId; if (interfaceId == 0) { revert UnsupportedTokenStandard(); } if (!IERC165(impl).supportsInterface(interfaceId)) { revert ImplementationDoesNotSupportStandard(); } uint32 implId = $.tokenStandardData[standard].nextImplId; $.tokenStandardData[standard].implementations[implId] = impl; $.tokenStandardData[standard].nextImplId = implId + 1; $.tokenStandardData[standard].deploymentFees[implId] = deploymentFee; emit ImplementationRegistered(standard, impl, implId, deploymentFee); emit DeploymentFeeSet(standard, implId, deploymentFee); if (isDefault) { $.tokenStandardData[standard].defaultImplId = implId; emit DefaultImplementationSet(standard, implId); } return implId; } /// @dev Unregisters an implementation for a given token standard. /// @param standard The token standard (ERC721, ERC1155). /// @param implId The ID of the implementation to unregister. /// @notice Only the contract owner can call this function. /// @notice Reverts if the implementation is not registered. function unregisterImplementation(TokenStandard standard, uint32 implId) external onlyOwner { RegistryStorage storage $ = _loadRegistryStorage(); address implData = $.tokenStandardData[standard].implementations[implId]; if (implData == address(0)) { revert InvalidImplementation(); } $.tokenStandardData[standard].implementations[implId] = address(0); if ($.tokenStandardData[standard].defaultImplId == implId) { $.tokenStandardData[standard].defaultImplId = 0; emit DefaultImplementationSet(standard, 0); } emit ImplementationUnregistered(standard, implId); } /// @dev Sets the default implementation ID for a given token standard /// @param standard The token standard (ERC721, ERC1155, ERC20) /// @param implId The ID of the implementation to set as default /// @notice Reverts if the implementation is not registered. /// @notice Only the contract owner can call this function function setDefaultImplementation(TokenStandard standard, uint32 implId) external onlyOwner { RegistryStorage storage $ = _loadRegistryStorage(); address implData = $.tokenStandardData[standard].implementations[implId]; if (implData == address(0)) { revert InvalidImplementation(); } $.tokenStandardData[standard].defaultImplId = implId; emit DefaultImplementationSet(standard, implId); } /// @dev Sets the deployment fee for an implementation /// @param standard The token standard (ERC721, ERC1155, ERC20) /// @param implId The implementation ID /// @param deploymentFee The deployment fee to set /// @notice Only the contract owner can call this function function setDeploymentFee(TokenStandard standard, uint32 implId, uint256 deploymentFee) external onlyOwner { RegistryStorage storage $ = _loadRegistryStorage(); $.tokenStandardData[standard].deploymentFees[implId] = deploymentFee; emit DeploymentFeeSet(standard, implId, deploymentFee); } /// @dev Internal function to authorize an upgrade. /// @param newImplementation Address of the new implementation. /// @notice Only the contract owner can upgrade the contract. function _authorizeUpgrade(address newImplementation) internal override onlyOwner {} /// @dev Overriden to prevent double-initialization of the owner. function _guardInitializeOwner() internal pure virtual override returns (bool) { return true; } }
[{"inputs":[{"internalType":"address","name":"initialOwner","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AlreadyInitialized","type":"error"},{"inputs":[],"name":"DefaultImplementationNotRegistered","type":"error"},{"inputs":[],"name":"ImplementationDoesNotSupportStandard","type":"error"},{"inputs":[],"name":"InvalidImplementation","type":"error"},{"inputs":[],"name":"NewOwnerIsZeroAddress","type":"error"},{"inputs":[],"name":"NoHandoverRequest","type":"error"},{"inputs":[],"name":"Unauthorized","type":"error"},{"inputs":[],"name":"UnauthorizedCallContext","type":"error"},{"inputs":[],"name":"UnsupportedTokenStandard","type":"error"},{"inputs":[],"name":"UpgradeFailed","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"enum TokenStandard","name":"standard","type":"uint8"},{"indexed":false,"internalType":"uint32","name":"implId","type":"uint32"}],"name":"DefaultImplementationSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"enum TokenStandard","name":"standard","type":"uint8"},{"indexed":false,"internalType":"uint32","name":"implId","type":"uint32"},{"indexed":false,"internalType":"uint256","name":"deploymentFee","type":"uint256"}],"name":"DeploymentFeeSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"enum TokenStandard","name":"standard","type":"uint8"},{"indexed":false,"internalType":"address","name":"impl","type":"address"},{"indexed":false,"internalType":"uint32","name":"implId","type":"uint32"},{"indexed":false,"internalType":"uint256","name":"deploymentFee","type":"uint256"}],"name":"ImplementationRegistered","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"enum TokenStandard","name":"standard","type":"uint8"},{"indexed":false,"internalType":"uint32","name":"implId","type":"uint32"}],"name":"ImplementationUnregistered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"pendingOwner","type":"address"}],"name":"OwnershipHandoverCanceled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"pendingOwner","type":"address"}],"name":"OwnershipHandoverRequested","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"inputs":[],"name":"cancelOwnershipHandover","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"pendingOwner","type":"address"}],"name":"completeOwnershipHandover","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"enum TokenStandard","name":"standard","type":"uint8"}],"name":"getDefaultImplementation","outputs":[{"internalType":"address","name":"implAddress","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"enum TokenStandard","name":"standard","type":"uint8"}],"name":"getDefaultImplementationID","outputs":[{"internalType":"uint32","name":"defaultImplId","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"enum TokenStandard","name":"standard","type":"uint8"},{"internalType":"uint32","name":"implId","type":"uint32"}],"name":"getDeploymentFee","outputs":[{"internalType":"uint256","name":"deploymentFee","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"enum TokenStandard","name":"standard","type":"uint8"},{"internalType":"uint32","name":"implId","type":"uint32"}],"name":"getImplementation","outputs":[{"internalType":"address","name":"implAddress","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"result","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"pendingOwner","type":"address"}],"name":"ownershipHandoverExpiresAt","outputs":[{"internalType":"uint256","name":"result","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proxiableUUID","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"enum TokenStandard","name":"standard","type":"uint8"},{"internalType":"address","name":"impl","type":"address"},{"internalType":"bool","name":"isDefault","type":"bool"},{"internalType":"uint256","name":"deploymentFee","type":"uint256"}],"name":"registerImplementation","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"requestOwnershipHandover","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"enum TokenStandard","name":"standard","type":"uint8"},{"internalType":"uint32","name":"implId","type":"uint32"}],"name":"setDefaultImplementation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"enum TokenStandard","name":"standard","type":"uint8"},{"internalType":"uint32","name":"implId","type":"uint32"},{"internalType":"uint256","name":"deploymentFee","type":"uint256"}],"name":"setDeploymentFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"enum TokenStandard","name":"standard","type":"uint8"},{"internalType":"uint32","name":"implId","type":"uint32"}],"name":"unregisterImplementation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"upgradeToAndCall","outputs":[],"stateMutability":"payable","type":"function"}]
Contract Creation Code
9c4d535b0000000000000000000000000000000000000000000000000000000000000000010001d142608808c951edd2f5ad362975dc36b64fdc6b3a8f2296618e76f86000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000020000000000000000000000000b968ddc6b417978b42b591976b440a5a0c05b62b
Deployed Bytecode
0x000200000000000200050000000000020001000000010355000000600310027000000179033001970000000100200190000000280000c13d0000008002000039000000400020043f000000040030008c0000004b0000413d000000000201043b000000e0022002700000018a0020009c0000004d0000a13d0000018b0020009c0000011e0000a13d0000018c0020009c000001610000a13d0000018d0020009c0000022f0000613d0000018e0020009c0000025e0000613d0000018f0020009c0000004b0000c13d000000240030008c0000004b0000413d0000000002000416000000000002004b0000004b0000c13d0000000401100370000000000101043b0000017c0010009c0000004b0000213d000001a2020000410000000c0020043f000000000010043f0000000c010000390000002002000039000002c40000013d0000000002000416000000000002004b0000004b0000c13d0000001f023000390000017a02200197000000a002200039000000400020043f0000001f0430018f0000017b05300198000000a002500039000000390000613d000000a006000039000000000701034f000000007807043c0000000006860436000000000026004b000000350000c13d000000000004004b000000460000613d000000000151034f0000000304400210000000000502043300000000054501cf000000000545022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000200030008c0000004b0000413d000000a00100043d0000017c0010009c000000f10000a13d0000000001000019000005e100010430000001970020009c0000013a0000213d0000019d0020009c000001950000213d000001a00020009c0000026f0000613d000001a10020009c0000004b0000c13d000000440030008c0000004b0000413d0000000002000416000000000002004b0000004b0000c13d0000000402100370000000000202043b000500000002001d000000020020008c0000004b0000213d0000002401100370000000000101043b000400000001001d000001790010009c0000004b0000213d0000017d01000041000000000101041a0000000002000411000000000012004b000003c00000c13d0000000501000029000000000010043f0000018301000041000000200010043f0000000001000414000001790010009c0000017901008041000000c001100210000001a9011001c7000080100200003905df05d50000040f00000001002001900000004b0000613d000000000101043b0000000402000029000000000020043f0000000101100039000000200010043f0000000001000414000001790010009c0000017901008041000000c001100210000001a9011001c7000080100200003905df05d50000040f00000001002001900000004b0000613d000000000101043b000000000101041a0000017c00100198000002a20000613d0000000501000029000000000010043f0000018301000041000000200010043f0000000001000414000001790010009c0000017901008041000000c001100210000001a9011001c7000080100200003905df05d50000040f00000001002001900000004b0000613d000000000101043b0000000402000029000000000020043f0000000101100039000000200010043f0000000001000414000001790010009c0000017901008041000000c001100210000001a9011001c7000080100200003905df05d50000040f00000001002001900000004b0000613d000000000101043b000000000201041a000001af02200197000000000021041b0000000501000029000000000010043f0000018301000041000000200010043f0000000001000414000001790010009c0000017901008041000000c001100210000001a9011001c7000080100200003905df05d50000040f00000001002001900000004b0000613d000000000101043b000000000101041a00000040011002700000017901100197000000040010006c000000de0000c13d0000000501000029000000000010043f0000018301000041000000200010043f0000000001000414000001790010009c0000017901008041000000c001100210000001a9011001c7000080100200003905df05d50000040f00000001002001900000004b0000613d000000000101043b000000000201041a000001b702200197000000000021041b000000400100043d000000050200002900000000022104360000000000020435000001790010009c000001790100804100000040011002100000000002000414000001790020009c0000017902008041000000c002200210000000000112019f000001a9011001c70000800d020000390000000103000039000001b80400004105df05d00000040f00000001002001900000004b0000613d000000400100043d00000020021000390000000403000029000000000032043500000005020000290000000000210435000001790010009c000001790100804100000040011002100000000002000414000001790020009c0000017902008041000000c002200210000000000112019f000001a9011001c70000800d020000390000000103000039000001ca04000041000002090000013d0000000002000410000000800020043f0000017d02000041000000000302041a000000000003004b0000015d0000c13d0000017c0610019800000000010000190000018001006041000000000161019f000000000012041b0000000001000414000001790010009c0000017901008041000000c00110021000000181011001c70000800d0200003900000003030000390000018204000041000000000500001905df05d00000040f00000001002001900000004b0000613d0000018301000041000000200010043f0000018401000041000000000201041a000001850220019700000186022001c7000000000021041b0000000101000039000000000010043f0000018702000041000000000302041a000001850330019700000188033001c7000000000032041b000000800200043d000001400000044300000160002004430000002002000039000001000020044300000120001004430000018901000041000005e00001042e000001920020009c000001bc0000213d000001950020009c000002aa0000613d000001960020009c0000004b0000c13d0000017d01000041000000000501041a0000000001000411000000000051004b000003c00000c13d0000000001000414000001790010009c0000017901008041000000c00110021000000181011001c70000800d0200003900000003030000390000018204000041000000000600001905df05d00000040f00000001002001900000004b0000613d00000180010000410000017d02000041000000000012041b0000000001000019000005e00001042e000001980020009c0000020d0000213d0000019b0020009c000002c90000613d0000019c0020009c0000004b0000c13d0000000001000416000000000001004b0000004b0000c13d000001be0100004100000000001004430000000001000412000000040010044300000024000004430000000001000414000001790010009c0000017901008041000000c001100210000001bf011001c7000080050200003905df05d50000040f0000000100200190000004af0000613d000000000101043b0000000002000410000000000021004b000002f30000c13d000000400100043d000001c0020000410000000000210435000001790010009c00000179010080410000004001100210000001aa011001c7000005e00001042e0000017e01000041000000000010043f0000017f01000041000005e100010430000001900020009c000002f70000613d000001910020009c0000004b0000c13d000000440030008c0000004b0000413d0000000002000416000000000002004b0000004b0000c13d0000000402100370000000000202043b000000020020008c0000004b0000213d0000002401100370000000000101043b000500000001001d000001790010009c0000004b0000213d000000000020043f0000018301000041000000200010043f0000000001000414000001790010009c0000017901008041000000c001100210000001a9011001c7000080100200003905df05d50000040f00000001002001900000004b0000613d000000000101043b0000000502000029000000000020043f0000000101100039000000200010043f0000000001000414000001790010009c0000017901008041000000c001100210000001a9011001c7000080100200003905df05d50000040f00000001002001900000004b0000613d000000000101043b000000000101041a000000000001004b000001ba0000c13d000001ab01000041000000000010043f0000017f01000041000005e1000104300000019e0020009c0000032f0000613d0000019f0020009c0000004b0000c13d000000240030008c0000004b0000413d0000000002000416000000000002004b0000004b0000c13d0000000401100370000000000101043b000000020010008c0000004b0000213d000000000010043f0000018301000041000000200010043f0000000001000414000001790010009c0000017901008041000000c001100210000001a9011001c7000080100200003905df05d50000040f00000001002001900000004b0000613d000000000101043b000000000201041a000000400220027000000179022001980000022b0000613d000000000020043f0000000101100039000000200010043f0000004002000039000000000100001905df05bb0000040f000000000101041a0000017c011001970000037c0000013d000001930020009c000003560000613d000001940020009c0000004b0000c13d000000640030008c0000004b0000413d0000000002000416000000000002004b0000004b0000c13d0000000402100370000000000202043b000500000002001d000000020020008c0000004b0000213d0000002402100370000000000202043b000400000002001d000001790020009c0000004b0000213d0000004401100370000000000301043b0000017d01000041000000000101041a0000000002000411000000000012004b000003c00000c13d000300000003001d0000000501000029000000000010043f0000018301000041000000200010043f0000000001000414000001790010009c0000017901008041000000c001100210000001a9011001c7000080100200003905df05d50000040f00000001002001900000004b0000613d000000000101043b0000000402000029000000000020043f0000000201100039000000200010043f0000000001000414000001790010009c0000017901008041000000c001100210000001a9011001c7000080100200003905df05d50000040f00000001002001900000004b0000613d000000000101043b0000000303000029000000000031041b000000400100043d0000004002100039000000000032043500000020021000390000000403000029000000000032043500000005020000290000000000210435000001790010009c000001790100804100000040011002100000000002000414000001790020009c0000017902008041000000c002200210000000000112019f000001b5011001c70000800d020000390000000103000039000001b60400004105df05d00000040f00000001002001900000004b0000613d0000037a0000013d000001990020009c0000035f0000613d0000019a0020009c0000004b0000c13d000000240030008c0000004b0000413d0000000002000416000000000002004b0000004b0000c13d0000000401100370000000000101043b000000020010008c0000004b0000213d000000000010043f0000018301000041000000200010043f0000000001000414000001790010009c0000017901008041000000c001100210000001a9011001c7000080100200003905df05d50000040f00000001002001900000004b0000613d000000000101043b000000000101041a000000400110027000000179011001980000037c0000c13d000001c701000041000000000010043f0000017f01000041000005e100010430000000240030008c0000004b0000413d0000000401100370000000000101043b000500000001001d0000017c0010009c0000004b0000213d0000017d01000041000000000101041a0000000002000411000000000012004b000003c00000c13d000001a2010000410000000c0010043f0000000501000029000000000010043f0000000001000414000001790010009c0000017901008041000000c001100210000001a5011001c7000080100200003905df05d50000040f00000001002001900000004b0000613d000000000101043b000300000001001d000000000101041a000400000001001d000001a60100004100000000001004430000000001000414000001790010009c0000017901008041000000c001100210000001a7011001c70000800b0200003905df05d50000040f0000000100200190000004af0000613d000000000101043b000000040010006c000003830000a13d000001a801000041000000000010043f0000017f01000041000005e100010430000000240030008c0000004b0000413d0000000401100370000000000101043b0000017c0010009c0000004b0000213d0000017d02000041000000000202041a0000000003000411000000000023004b000003c00000c13d000000000001004b000003860000c13d000001a401000041000000000010043f0000017f01000041000005e100010430000000440030008c0000004b0000413d0000000002000416000000000002004b0000004b0000c13d0000000402100370000000000202043b000500000002001d000000020020008c0000004b0000213d0000002401100370000000000101043b000400000001001d000001790010009c0000004b0000213d0000017d01000041000000000101041a0000000002000411000000000012004b000003c00000c13d0000000501000029000000000010043f0000018301000041000000200010043f0000000001000414000001790010009c0000017901008041000000c001100210000001a9011001c7000080100200003905df05d50000040f00000001002001900000004b0000613d000000000101043b0000000402000029000000000020043f0000000101100039000000200010043f0000000001000414000001790010009c0000017901008041000000c001100210000001a9011001c7000080100200003905df05d50000040f00000001002001900000004b0000613d000000000101043b000000000101041a0000017c00100198000003890000c13d000000400100043d000001cd020000410000000000210435000001790010009c00000179010080410000004001100210000001bb011001c7000005e100010430000000440030008c0000004b0000413d0000000002000416000000000002004b0000004b0000c13d0000000402100370000000000202043b000000020020008c0000004b0000213d0000002401100370000000000101043b000500000001001d000001790010009c0000004b0000213d000000000020043f0000018301000041000000200010043f0000004002000039000000000100001905df05bb0000040f0000000502000029000000000020043f0000000201100039000000200010043f0000000001000019000000400200003905df05bb0000040f000000000101041a000000800010043f000001a301000041000005e00001042e000000440030008c0000004b0000413d0000000402100370000000000202043b000500000002001d0000017c0020009c0000004b0000213d0000002402100370000000000202043b000001ae0020009c0000004b0000213d0000002304200039000000000034004b0000004b0000813d000300040020003d0000000301100360000000000101043b000400000001001d000001ae0010009c0000004b0000213d00000004012000290000002401100039000000000031004b0000004b0000213d000001be0100004100000000001004430000000001000412000000040010044300000024000004430000000001000414000001790010009c0000017901008041000000c001100210000001bf011001c7000080050200003905df05d50000040f0000000100200190000004af0000613d000000000101043b0000000002000410000000000021004b000003b00000c13d000001c601000041000000000010043f0000017f01000041000005e100010430000000840030008c0000004b0000413d0000000002000416000000000002004b0000004b0000c13d0000000402100370000000000202043b000500000002001d000000020020008c0000004b0000213d0000002402100370000000000202043b000400000002001d0000017c0020009c0000004b0000213d0000004402100370000000000302043b000000000003004b0000000002000039000000010200c039000300000003001d000000000023004b0000004b0000c13d0000006401100370000000000301043b0000017d01000041000000000101041a0000000002000411000000000012004b000003c00000c13d000200000003001d0000000501000029000000000010043f0000018301000041000000200010043f0000000001000414000001790010009c0000017901008041000000c001100210000001a9011001c7000080100200003905df05d50000040f00000001002001900000004b0000613d000000400500043d000000000101043b000000000101041a000000e001100212000003c40000c13d000001bc010000410000000000150435000001790050009c00000179050080410000004001500210000001bb011001c7000005e100010430000001a2010000410000000c0010043f0000000001000411000000000010043f000001a60100004100000000001004430000000001000414000001790010009c0000017901008041000000c001100210000001a7011001c70000800b0200003905df05d50000040f0000000100200190000004af0000613d000000000101043b000500000001001d0000000001000414000001790010009c0000017901008041000000c001100210000001a5011001c7000080100200003905df05d50000040f00000001002001900000004b0000613d000000000101043b0000000502000029000001c80220009a000000000021041b0000000001000414000001790010009c0000017901008041000000c00110021000000181011001c70000800d020000390000000203000039000001c904000041000003760000013d0000000001000416000000000001004b0000004b0000c13d0000017d01000041000000000101041a0000017c01100197000000800010043f000001a301000041000005e00001042e000001a2010000410000000c0010043f0000000001000411000000000010043f0000000001000414000001790010009c0000017901008041000000c001100210000001a5011001c7000080100200003905df05d50000040f00000001002001900000004b0000613d000000000101043b000000000001041b0000000001000414000001790010009c0000017901008041000000c00110021000000181011001c70000800d020000390000000203000039000001bd04000041000000000500041105df05d00000040f00000001002001900000004b0000613d0000000001000019000005e00001042e000000400200043d0000000000120435000001790020009c00000179020080410000004001200210000001aa011001c7000005e00001042e0000000301000029000000000001041b000000050100002905df05a10000040f0000000001000019000005e00001042e0000000501000029000000000010043f0000018301000041000000200010043f0000000001000414000001790010009c0000017901008041000000c001100210000001a9011001c7000080100200003905df05d50000040f00000001002001900000004b0000613d00000004040000290000004002400210000001cc02200197000000000101043b000000000301041a000001b703300197000000000223019f000000000021041b000000400100043d0000002002100039000000000042043500000005020000290000000000210435000001790010009c000001790100804100000040011002100000000002000414000001790020009c0000017902008041000000c002200210000000000112019f000001a9011001c70000800d020000390000000103000039000001b804000041000002090000013d0000017d01000041000000000101041a0000000002000411000000000012004b000003c00000c13d0000000001000031000000000010043f0000019c01000041000000010010043f00000000010004140000000502000029000000040020008c0000041b0000c13d0000001d0100043d000000010010043f000004400000013d000001cb01000041000000000010043f0000017f01000041000005e100010430000001ac0200004100000000002504350000000402500039000000000012043500000000010004140000000402000029000000040020008c000003d10000c13d0000000003000031000000200030008c00000020040000390000000004034019000003fe0000013d000001790050009c000001790200004100000000020540190000004002200210000001790010009c0000017901008041000000c001100210000000000121019f000001ad011001c70000000402000029000100000005001d05df05d50000040f00000060031002700000017903300197000000200030008c000000200400003900000000040340190000001f0640018f0000002007400190000000010b0000290000000105700029000003ed0000613d000000000801034f00000000090b0019000000008a08043c0000000009a90436000000000059004b000003e90000c13d000000000006004b000003fa0000613d000000000771034f0000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f0000000100200190000004b00000613d00000000050b00190000001f01400039000000600210018f0000000001520019000000000021004b00000000020000390000000102004039000001ae0010009c000004150000213d0000000100200190000004150000c13d000000400010043f000000200030008c0000004b0000413d0000000002050433000000000002004b0000000003000039000000010300c039000000000032004b0000004b0000c13d000000000002004b000004d20000c13d000001ba02000041000002a40000013d000001b901000041000000000010043f0000004101000039000000040010043f000001ad01000041000005e100010430000001790010009c0000017901008041000000c001100210000001c1011001c7000000050200002905df05d50000040f00000060031002700000017903300197000000200030008c000000200400003900000000040340190000001f0540018f000000200640019000000001046001bf000004300000613d0000000107000039000000000801034f000000008908043c0000000007970436000000000047004b0000042c0000c13d000000010220018f000000000005004b0000043e0000613d000000000161034f0000000305500210000000000604043300000000065601cf000000000656022f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f0000000000140435000000000003001f0000000001020433000001c00010009c000004ce0000c13d0000000001000414000001790010009c0000017901008041000000c00110021000000181011001c70000800d020000390000000203000039000001c304000041000000050500002905df05d00000040f00000001002001900000004b0000613d000001c0010000410000000502000029000000000021041b000000040000006b0000037a0000613d0000000403000029000001ce023001980000001f0330018f000000400100043d000200000001001d0000000001210019000000030400002900000020044000390000000104400367000004630000613d000000000504034f0000000206000029000000005705043c0000000006760436000000000016004b0000045f0000c13d000000000003004b000004700000613d000000000224034f0000000303300210000000000401043300000000043401cf000000000434022f000000000202043b0000010003300089000000000232022f00000000023201cf000000000242019f0000000000210435000001c4010000410000000000100443000000000100041200000004001004430000000001000414000001790010009c0000017901008041000000c001100210000001c5011001c7000080020200003905df05d50000040f0000000100200190000004af0000613d00000000010004140000000502000029000000040020008c0000037a0000613d0000000402000029000001790020009c00000179020080410000006002200210000001790010009c0000017901008041000000c001100210000000000121019f0000000202000029000001790020009c0000017902008041000400400020021800000004011001af000000050200002905df05da0000040f0000006003100270000001790030019d00000001002001900000037a0000c13d00000179023001970000001f0420018f0000017b05200198000000020800002900000000035800190000049f0000613d000000000601034f000000006706043c0000000008780436000000000038004b0000049b0000c13d000000000004004b000004ac0000613d000000000151034f0000000304400210000000000503043300000000054501cf000000000545022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000130435000000600120021000000004011001af000005e100010430000000000001042f0000001f0530018f0000017b06300198000000400200043d0000000004620019000004bb0000613d000000000701034f0000000008020019000000007907043c0000000008980436000000000048004b000004b70000c13d000000000005004b000004c80000613d000000000161034f0000000305500210000000000604043300000000065601cf000000000656022f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f00000000001404350000006001300210000001790020009c00000179020080410000004002200210000000000112019f000005e100010430000001c201000041000000010010043f000001c101000041000005e1000104300000000501000029000000000010043f0000018301000041000000200010043f0000000001000414000001790010009c0000017901008041000000c001100210000001a9011001c7000080100200003905df05d50000040f00000001002001900000004b0000613d000000000101043b000000000101041a000100000001001d0000000501000029000000000010043f0000018301000041000000200010043f0000000001000414000001790010009c0000017901008041000000c001100210000001a9011001c7000080100200003905df05d50000040f00000001002001900000004b0000613d000000010200002900000020022002700000017902200197000000000101043b000100000002001d000000000020043f0000000101100039000000200010043f0000000001000414000001790010009c0000017901008041000000c001100210000001a9011001c7000080100200003905df05d50000040f00000001002001900000004b0000613d000000000101043b000000000201041a000001af0220019700000004022001af000000000021041b0000000101000029000001790010009c0000050e0000c13d000001b901000041000000000010043f0000001101000039000000040010043f000001ad01000041000005e1000104300000000501000029000000000010043f0000018301000041000000200010043f0000000001000414000001790010009c0000017901008041000000c001100210000001a9011001c7000080100200003905df05d50000040f00000001002001900000004b0000613d00000001020000290000002002200210000001b00220009a000001b102200197000000000101043b000000000301041a000001b203300197000000000223019f000000000021041b0000000501000029000000000010043f0000018301000041000000200010043f0000000001000414000001790010009c0000017901008041000000c001100210000001a9011001c7000080100200003905df05d50000040f00000001002001900000004b0000613d000000000101043b0000000102000029000000000020043f0000000201100039000000200010043f0000000001000414000001790010009c0000017901008041000000c001100210000001a9011001c7000080100200003905df05d50000040f00000001002001900000004b0000613d000000000101043b0000000203000029000000000031041b000000400100043d0000006002100039000000000032043500000040021000390000000103000029000000000032043500000020021000390000000403000029000000000032043500000005020000290000000000210435000001790010009c000001790100804100000040011002100000000002000414000001790020009c0000017902008041000000c002200210000000000112019f000001b3011001c70000800d020000390000000103000039000001b40400004105df05d00000040f00000001002001900000004b0000613d000000400100043d00000040021000390000000203000029000000000032043500000020021000390000000103000029000000000032043500000005020000290000000000210435000001790010009c000001790100804100000040011002100000000002000414000001790020009c0000017902008041000000c002200210000000000112019f000001b5011001c70000800d020000390000000103000039000001b60400004105df05d00000040f00000001002001900000004b0000613d000000030000006b0000059e0000613d0000000501000029000000000010043f0000018301000041000000200010043f0000000001000414000001790010009c0000017901008041000000c001100210000001a9011001c7000080100200003905df05d50000040f00000001002001900000004b0000613d000000000101043b000000000201041a000001b70220019700000001040000290000004003400210000000000232019f000000000021041b000000400100043d0000002002100039000000000042043500000005020000290000000000210435000001790010009c000001790100804100000040011002100000000002000414000001790020009c0000017902008041000000c002200210000000000112019f000001a9011001c70000800d020000390000000103000039000001b80400004105df05d00000040f00000001002001900000004b0000613d000000400100043d0000000102000029000001570000013d00010000000000020000017d02000041000000000502041a00000000020004140000017c06100197000001790020009c0000017902008041000000c00120021000000181011001c70000800d0200003900000003030000390000018204000041000100000006001d05df05d00000040f0000000100200190000005b80000613d000000010000006b0000000001000019000001800100604100000001011001af0000017d02000041000000000012041b000000000001042d0000000001000019000005e100010430000000000001042f000001790010009c00000179010080410000004001100210000001790020009c00000179020080410000006002200210000000000112019f0000000002000414000001790020009c0000017902008041000000c002200210000000000112019f00000181011001c7000080100200003905df05d50000040f0000000100200190000005ce0000613d000000000101043b000000000001042d0000000001000019000005e100010430000005d3002104210000000102000039000000000001042d0000000002000019000000000001042d000005d8002104230000000102000039000000000001042d0000000002000019000000000001042d000005dd002104250000000102000039000000000001042d0000000002000019000000000001042d000005df00000432000005e00001042e000005e1000104300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffff00000000000000000000000000000000000000000000000000000001ffffffe000000000000000000000000000000000000000000000000000000000ffffffe0000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927000000000000000000000000000000000000000000000000000000000dc149f000000000000000000000000000000000000000040000001c0000000000000000800000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000008be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0fd008fcd1deb21680f735a35fafc51691c5fb3daec313cfea4dc62938bee900005dca32b875e2fff92cceaa0f3b2d2066cac0c050bdfbcf9d761069d0eb122c0ffffffffffffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000000000000000000180ac58cd241afc64c1f6ed41103830e539be6b862210a249bbde5703287eeb43bd2994e300000000000000000000000000000000000000000000000000000001d9b67a260000000200000000000000000000000000000080000001000000000000000000000000000000000000000000000000000000000000000000000000006a0ddc7900000000000000000000000000000000000000000000000000000000af54f48d00000000000000000000000000000000000000000000000000000000f04e283d00000000000000000000000000000000000000000000000000000000f04e283e00000000000000000000000000000000000000000000000000000000f2fde38b00000000000000000000000000000000000000000000000000000000fee81cf400000000000000000000000000000000000000000000000000000000af54f48e00000000000000000000000000000000000000000000000000000000d8da022b000000000000000000000000000000000000000000000000000000008da5cb5a000000000000000000000000000000000000000000000000000000008da5cb5b00000000000000000000000000000000000000000000000000000000a22882ab000000000000000000000000000000000000000000000000000000006a0ddc7a00000000000000000000000000000000000000000000000000000000715018a6000000000000000000000000000000000000000000000000000000004f1ef2850000000000000000000000000000000000000000000000000000000054d1f13c0000000000000000000000000000000000000000000000000000000054d1f13d00000000000000000000000000000000000000000000000000000000608411dc000000000000000000000000000000000000000000000000000000004f1ef2860000000000000000000000000000000000000000000000000000000052d1902d00000000000000000000000000000000000000000000000000000000256929610000000000000000000000000000000000000000000000000000000025692962000000000000000000000000000000000000000000000000000000004df2715c000000000000000000000000000000000000000000000000000000001224178e000000000000000000000000000000000000000000000000000000001917461b00000000000000000000000000000000000000000000000000000000389a75e10000000000000000000000000000000000000020000000800000000000000000000000000000000000000000000000000000000000000000000000007448fbae02000000000000000000000000000000000000200000000c0000000000000000796b89b91644bc98cd93958e4c9038275d622183e25ac5af08cc6b5d955391320200000200000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000006f5e8818020000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000068155f9a01ffc9a7000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000ffffffff00000000ffffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffff02000000000000000000000000000000000000800000000000000000000000006c0f66d932d1e78ba1cfb55795c2f241fb100a0bde7f31f7e7453bd18a0aaa2a020000000000000000000000000000000000006000000000000000000000000053bb5bd6d66ea1be1233b474098525597362059e95776d1465c5aea564530b4dffffffffffffffffffffffffffffffffffffffff00000000ffffffffffffffff84e49eeb45577717af0d6484bb55c8e0a6c74df5ef53de564c57fc2b485c06be4e487b7100000000000000000000000000000000000000000000000000000000d3d569780000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000009a9d6f4f00000000000000000000000000000000000000000000000000000000fa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92310ab089e4439a4c15d089f94afb7896ff553aecb10793d0ab882de59d99a32e0200000200000000000000000000000000000044000000000000000000000000360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc00000000000000000000000000000000000000040000001d00000000000000000000000000000000000000000000000000000000000000000000000055299b49bc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b1806aa1896bbf26568e884a7374b41e002500962caba6a15023a8d90e8508b830200000200000000000000000000000000000024000000000000000000000000000000000000000000000000000000000000000000000000000000009f03a02600000000000000000000000000000000000000000000000000000000161378fcfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd5d00dbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d364123fbcbe9ed81a800eab4b3e02353e68f129c98c4c3cb15f45b92633219710000000000000000000000000000000000000000000000000000000082b429000000000000000000000000000000000000000000ffffffff000000000000000068155f9a00000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0000000000000000000000000000000000000000000000000000000000000000056f7667691b8e5e2639660306c2480158361585e9bb5b0ae2c61c844f7c4e564
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000b968ddc6b417978b42b591976b440a5a0c05b62b
-----Decoded View---------------
Arg [0] : initialOwner (address): 0xB968DDC6B417978b42B591976B440a5a0c05B62B
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000b968ddc6b417978b42b591976b440a5a0c05b62b
Loading...
Loading
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.