Overview
ETH Balance
0 ETH
ETH Value
$0.00More Info
Private Name Tags
ContractCreator
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Latest 1 internal transaction
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
3552451 | 2 days ago | Contract Creation | 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 Source Code Verified (Exact Match)
Contract Name:
MagicDropTokenImplRegistry
Compiler Version
v0.8.24+commit.e11b9ed9
ZkSolc Version
v1.5.11
Optimization Enabled:
Yes with Mode 3
Other Settings:
shanghai EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.22; import {OwnableRoles} from "solady/src/auth/OwnableRoles.sol"; import {UUPSUpgradeable} from "solady/src/utils/UUPSUpgradeable.sol"; import {Initializable} from "solady/src/utils/Initializable.sol"; import {IMagicDropTokenImplRegistry, TokenStandard} from "./interfaces/IMagicDropTokenImplRegistry.sol"; import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.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, OwnableRoles, IMagicDropTokenImplRegistry, Initializable { /*============================================================== = STRUCTS = ==============================================================*/ struct RegistryData { bytes4 interfaceId; uint32 nextImplId; uint32 defaultImplId; mapping(uint256 => address) implementations; mapping(uint256 => uint256) deploymentFees; //implementationId => deploymentFee mapping(uint256 => uint256) mintFees; // implementationId => mintFee } struct RegistryStorage { mapping(TokenStandard => RegistryData) tokenStandardData; } /*============================================================== = STORAGE = ==============================================================*/ // keccak256(abi.encode(uint256(keccak256("magicdrop.registry.MagicDropTokenImplRegistry")) - 1)) & ~bytes32(uint256(0xff)) bytes32 internal constant MAGICDROP_REGISTRY_STORAGE = 0xfd008fcd1deb21680f735a35fafc51691c5fb3daec313cfea4dc62938bee9000; /// @notice The role for managing the registry uint256 public constant MANAGER_ROLE = 1 << 0; /// @notice Gap for future upgrades uint256[48] private __gap; /*============================================================== = EVENTS = ==============================================================*/ event ImplementationRegistered( TokenStandard standard, address impl, uint32 implId, uint256 deploymentFee, uint256 mintFee ); event ImplementationUnregistered(TokenStandard standard, uint32 implId); event DefaultImplementationSet(TokenStandard standard, uint32 implId); event DeploymentFeeSet(TokenStandard standard, uint32 implId, uint256 deploymentFee); event MintFeeSet(TokenStandard standard, uint32 implId, uint256 mintFee); /*============================================================== = ERRORS = ==============================================================*/ error InvalidImplementation(); error ImplementationDoesNotSupportStandard(); error UnsupportedTokenStandard(); error DefaultImplementationNotRegistered(); error NewImplementationCannotBeZero(); /*============================================================== = CONSTRUCTOR = ==============================================================*/ /// @dev Disables initializers for the implementation contract. constructor() { _disableInitializers(); } /// @param initialOwner The address of the initial owner function initialize(address initialOwner) public initializer { _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) { // solhint-disable-next-line no-inline-assembly 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) { // solhint-disable-next-line no-inline-assembly 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) { // solhint-disable-next-line no-inline-assembly 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) { // solhint-disable-next-line no-inline-assembly 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) } } /// @dev Gets the mint fee for a given token standard /// @param standard The token standard (ERC721, ERC1155, ERC20) /// @param implId The implementation ID /// @return mintFee The mint fee for the given standard function getMintFee(TokenStandard standard, uint32 implId) external view returns (uint256 mintFee) { // solhint-disable-next-line no-inline-assembly assembly { mstore(0x00, standard) mstore(0x20, MAGICDROP_REGISTRY_STORAGE) let slot := keccak256(0x00, 0x40) mstore(0x00, implId) mstore(0x20, add(slot, 3)) let implSlot := keccak256(0x00, 0x40) mintFee := sload(implSlot) } } /*============================================================== = INTERNAL HELPERS = ==============================================================*/ /// @dev Loads the registry storage. /// @return $ The registry storage. function _loadRegistryStorage() internal pure returns (RegistryStorage storage $) { // solhint-disable-next-line no-inline-assembly 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 /// @param mintFee The mint 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, uint256 mintFee ) external onlyOwnerOrRoles(MANAGER_ROLE) 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; $.tokenStandardData[standard].mintFees[implId] = mintFee; emit ImplementationRegistered(standard, impl, implId, deploymentFee, mintFee); 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 onlyOwnerOrRoles(MANAGER_ROLE) { 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 onlyOwnerOrRoles(MANAGER_ROLE) { 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 onlyOwnerOrRoles(MANAGER_ROLE) { RegistryStorage storage $ = _loadRegistryStorage(); $.tokenStandardData[standard].deploymentFees[implId] = deploymentFee; emit DeploymentFeeSet(standard, implId, deploymentFee); } /// @dev Sets the mint fee for an implementation /// @param standard The token standard (ERC721, ERC1155, ERC20) /// @param implId The implementation ID /// @param mintFee The mint fee to set /// @notice Only the contract owner can call this function function setMintFee(TokenStandard standard, uint32 implId, uint256 mintFee) external onlyOwnerOrRoles(MANAGER_ROLE) { RegistryStorage storage $ = _loadRegistryStorage(); $.tokenStandardData[standard].mintFees[implId] = mintFee; emit MintFeeSet(standard, implId, mintFee); } /// @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 virtual override onlyOwner { if (newImplementation == address(0)) { revert NewImplementationCannotBeZero(); } } /// @dev Overriden to prevent double-initialization of the owner. function _guardInitializeOwner() internal pure virtual override returns (bool) { return true; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import {Ownable} from "./Ownable.sol"; /// @notice Simple single owner and multiroles authorization mixin. /// @author Solady (https://github.com/vectorized/solady/blob/main/src/auth/OwnableRoles.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 OwnableRoles is Ownable { /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* EVENTS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev The `user`'s roles is updated to `roles`. /// Each bit of `roles` represents whether the role is set. event RolesUpdated(address indexed user, uint256 indexed roles); /// @dev `keccak256(bytes("RolesUpdated(address,uint256)"))`. uint256 private constant _ROLES_UPDATED_EVENT_SIGNATURE = 0x715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe26; /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* STORAGE */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev The role slot of `user` is given by: /// ``` /// mstore(0x00, or(shl(96, user), _ROLE_SLOT_SEED)) /// let roleSlot := keccak256(0x00, 0x20) /// ``` /// This automatically ignores the upper bits of the `user` in case /// they are not clean, as well as keep the `keccak256` under 32-bytes. /// /// Note: This is equivalent to `uint32(bytes4(keccak256("_OWNER_SLOT_NOT")))`. uint256 private constant _ROLE_SLOT_SEED = 0x8b78c6d8; /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* INTERNAL FUNCTIONS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Overwrite the roles directly without authorization guard. function _setRoles(address user, uint256 roles) internal virtual { /// @solidity memory-safe-assembly assembly { mstore(0x0c, _ROLE_SLOT_SEED) mstore(0x00, user) // Store the new value. sstore(keccak256(0x0c, 0x20), roles) // Emit the {RolesUpdated} event. log3(0, 0, _ROLES_UPDATED_EVENT_SIGNATURE, shr(96, mload(0x0c)), roles) } } /// @dev Updates the roles directly without authorization guard. /// If `on` is true, each set bit of `roles` will be turned on, /// otherwise, each set bit of `roles` will be turned off. function _updateRoles(address user, uint256 roles, bool on) internal virtual { /// @solidity memory-safe-assembly assembly { mstore(0x0c, _ROLE_SLOT_SEED) mstore(0x00, user) let roleSlot := keccak256(0x0c, 0x20) // Load the current value. let current := sload(roleSlot) // Compute the updated roles if `on` is true. let updated := or(current, roles) // Compute the updated roles if `on` is false. // Use `and` to compute the intersection of `current` and `roles`, // `xor` it with `current` to flip the bits in the intersection. if iszero(on) { updated := xor(current, and(current, roles)) } // Then, store the new value. sstore(roleSlot, updated) // Emit the {RolesUpdated} event. log3(0, 0, _ROLES_UPDATED_EVENT_SIGNATURE, shr(96, mload(0x0c)), updated) } } /// @dev Grants the roles directly without authorization guard. /// Each bit of `roles` represents the role to turn on. function _grantRoles(address user, uint256 roles) internal virtual { _updateRoles(user, roles, true); } /// @dev Removes the roles directly without authorization guard. /// Each bit of `roles` represents the role to turn off. function _removeRoles(address user, uint256 roles) internal virtual { _updateRoles(user, roles, false); } /// @dev Throws if the sender does not have any of the `roles`. function _checkRoles(uint256 roles) internal view virtual { /// @solidity memory-safe-assembly assembly { // Compute the role slot. mstore(0x0c, _ROLE_SLOT_SEED) mstore(0x00, caller()) // Load the stored value, and if the `and` intersection // of the value and `roles` is zero, revert. if iszero(and(sload(keccak256(0x0c, 0x20)), roles)) { mstore(0x00, 0x82b42900) // `Unauthorized()`. revert(0x1c, 0x04) } } } /// @dev Throws if the sender is not the owner, /// and does not have any of the `roles`. /// Checks for ownership first, then lazily checks for roles. function _checkOwnerOrRoles(uint256 roles) internal view virtual { /// @solidity memory-safe-assembly assembly { // If the caller is not the stored owner. // Note: `_ROLE_SLOT_SEED` is equal to `_OWNER_SLOT_NOT`. if iszero(eq(caller(), sload(not(_ROLE_SLOT_SEED)))) { // Compute the role slot. mstore(0x0c, _ROLE_SLOT_SEED) mstore(0x00, caller()) // Load the stored value, and if the `and` intersection // of the value and `roles` is zero, revert. if iszero(and(sload(keccak256(0x0c, 0x20)), roles)) { mstore(0x00, 0x82b42900) // `Unauthorized()`. revert(0x1c, 0x04) } } } } /// @dev Throws if the sender does not have any of the `roles`, /// and is not the owner. /// Checks for roles first, then lazily checks for ownership. function _checkRolesOrOwner(uint256 roles) internal view virtual { /// @solidity memory-safe-assembly assembly { // Compute the role slot. mstore(0x0c, _ROLE_SLOT_SEED) mstore(0x00, caller()) // Load the stored value, and if the `and` intersection // of the value and `roles` is zero, revert. if iszero(and(sload(keccak256(0x0c, 0x20)), roles)) { // If the caller is not the stored owner. // Note: `_ROLE_SLOT_SEED` is equal to `_OWNER_SLOT_NOT`. if iszero(eq(caller(), sload(not(_ROLE_SLOT_SEED)))) { mstore(0x00, 0x82b42900) // `Unauthorized()`. revert(0x1c, 0x04) } } } } /// @dev Convenience function to return a `roles` bitmap from an array of `ordinals`. /// This is meant for frontends like Etherscan, and is therefore not fully optimized. /// Not recommended to be called on-chain. /// Made internal to conserve bytecode. Wrap it in a public function if needed. function _rolesFromOrdinals(uint8[] memory ordinals) internal pure returns (uint256 roles) { /// @solidity memory-safe-assembly assembly { for { let i := shl(5, mload(ordinals)) } i { i := sub(i, 0x20) } { // We don't need to mask the values of `ordinals`, as Solidity // cleans dirty upper bits when storing variables into memory. roles := or(shl(mload(add(ordinals, i)), 1), roles) } } } /// @dev Convenience function to return an array of `ordinals` from the `roles` bitmap. /// This is meant for frontends like Etherscan, and is therefore not fully optimized. /// Not recommended to be called on-chain. /// Made internal to conserve bytecode. Wrap it in a public function if needed. function _ordinalsFromRoles(uint256 roles) internal pure returns (uint8[] memory ordinals) { /// @solidity memory-safe-assembly assembly { // Grab the pointer to the free memory. ordinals := mload(0x40) let ptr := add(ordinals, 0x20) let o := 0 // The absence of lookup tables, De Bruijn, etc., here is intentional for // smaller bytecode, as this function is not meant to be called on-chain. for { let t := roles } 1 {} { mstore(ptr, o) // `shr` 5 is equivalent to multiplying by 0x20. // Push back into the ordinals array if the bit is set. ptr := add(ptr, shl(5, and(t, 1))) o := add(o, 1) t := shr(o, roles) if iszero(t) { break } } // Store the length of `ordinals`. mstore(ordinals, shr(5, sub(ptr, add(ordinals, 0x20)))) // Allocate the memory. mstore(0x40, ptr) } } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* PUBLIC UPDATE FUNCTIONS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Allows the owner to grant `user` `roles`. /// If the `user` already has a role, then it will be an no-op for the role. function grantRoles(address user, uint256 roles) public payable virtual onlyOwner { _grantRoles(user, roles); } /// @dev Allows the owner to remove `user` `roles`. /// If the `user` does not have a role, then it will be an no-op for the role. function revokeRoles(address user, uint256 roles) public payable virtual onlyOwner { _removeRoles(user, roles); } /// @dev Allow the caller to remove their own roles. /// If the caller does not have a role, then it will be an no-op for the role. function renounceRoles(uint256 roles) public payable virtual { _removeRoles(msg.sender, roles); } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* PUBLIC READ FUNCTIONS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Returns the roles of `user`. function rolesOf(address user) public view virtual returns (uint256 roles) { /// @solidity memory-safe-assembly assembly { // Compute the role slot. mstore(0x0c, _ROLE_SLOT_SEED) mstore(0x00, user) // Load the stored value. roles := sload(keccak256(0x0c, 0x20)) } } /// @dev Returns whether `user` has any of `roles`. function hasAnyRole(address user, uint256 roles) public view virtual returns (bool) { return rolesOf(user) & roles != 0; } /// @dev Returns whether `user` has all of `roles`. function hasAllRoles(address user, uint256 roles) public view virtual returns (bool) { return rolesOf(user) & roles == roles; } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* MODIFIERS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Marks a function as only callable by an account with `roles`. modifier onlyRoles(uint256 roles) virtual { _checkRoles(roles); _; } /// @dev Marks a function as only callable by the owner or by an account /// with `roles`. Checks for ownership first, then lazily checks for roles. modifier onlyOwnerOrRoles(uint256 roles) virtual { _checkOwnerOrRoles(roles); _; } /// @dev Marks a function as only callable by an account with `roles` /// or the owner. Checks for roles first, then lazily checks for ownership. modifier onlyRolesOrOwner(uint256 roles) virtual { _checkRolesOrOwner(roles); _; } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* ROLE CONSTANTS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ // IYKYK uint256 internal constant _ROLE_0 = 1 << 0; uint256 internal constant _ROLE_1 = 1 << 1; uint256 internal constant _ROLE_2 = 1 << 2; uint256 internal constant _ROLE_3 = 1 << 3; uint256 internal constant _ROLE_4 = 1 << 4; uint256 internal constant _ROLE_5 = 1 << 5; uint256 internal constant _ROLE_6 = 1 << 6; uint256 internal constant _ROLE_7 = 1 << 7; uint256 internal constant _ROLE_8 = 1 << 8; uint256 internal constant _ROLE_9 = 1 << 9; uint256 internal constant _ROLE_10 = 1 << 10; uint256 internal constant _ROLE_11 = 1 << 11; uint256 internal constant _ROLE_12 = 1 << 12; uint256 internal constant _ROLE_13 = 1 << 13; uint256 internal constant _ROLE_14 = 1 << 14; uint256 internal constant _ROLE_15 = 1 << 15; uint256 internal constant _ROLE_16 = 1 << 16; uint256 internal constant _ROLE_17 = 1 << 17; uint256 internal constant _ROLE_18 = 1 << 18; uint256 internal constant _ROLE_19 = 1 << 19; uint256 internal constant _ROLE_20 = 1 << 20; uint256 internal constant _ROLE_21 = 1 << 21; uint256 internal constant _ROLE_22 = 1 << 22; uint256 internal constant _ROLE_23 = 1 << 23; uint256 internal constant _ROLE_24 = 1 << 24; uint256 internal constant _ROLE_25 = 1 << 25; uint256 internal constant _ROLE_26 = 1 << 26; uint256 internal constant _ROLE_27 = 1 << 27; uint256 internal constant _ROLE_28 = 1 << 28; uint256 internal constant _ROLE_29 = 1 << 29; uint256 internal constant _ROLE_30 = 1 << 30; uint256 internal constant _ROLE_31 = 1 << 31; uint256 internal constant _ROLE_32 = 1 << 32; uint256 internal constant _ROLE_33 = 1 << 33; uint256 internal constant _ROLE_34 = 1 << 34; uint256 internal constant _ROLE_35 = 1 << 35; uint256 internal constant _ROLE_36 = 1 << 36; uint256 internal constant _ROLE_37 = 1 << 37; uint256 internal constant _ROLE_38 = 1 << 38; uint256 internal constant _ROLE_39 = 1 << 39; uint256 internal constant _ROLE_40 = 1 << 40; uint256 internal constant _ROLE_41 = 1 << 41; uint256 internal constant _ROLE_42 = 1 << 42; uint256 internal constant _ROLE_43 = 1 << 43; uint256 internal constant _ROLE_44 = 1 << 44; uint256 internal constant _ROLE_45 = 1 << 45; uint256 internal constant _ROLE_46 = 1 << 46; uint256 internal constant _ROLE_47 = 1 << 47; uint256 internal constant _ROLE_48 = 1 << 48; uint256 internal constant _ROLE_49 = 1 << 49; uint256 internal constant _ROLE_50 = 1 << 50; uint256 internal constant _ROLE_51 = 1 << 51; uint256 internal constant _ROLE_52 = 1 << 52; uint256 internal constant _ROLE_53 = 1 << 53; uint256 internal constant _ROLE_54 = 1 << 54; uint256 internal constant _ROLE_55 = 1 << 55; uint256 internal constant _ROLE_56 = 1 << 56; uint256 internal constant _ROLE_57 = 1 << 57; uint256 internal constant _ROLE_58 = 1 << 58; uint256 internal constant _ROLE_59 = 1 << 59; uint256 internal constant _ROLE_60 = 1 << 60; uint256 internal constant _ROLE_61 = 1 << 61; uint256 internal constant _ROLE_62 = 1 << 62; uint256 internal constant _ROLE_63 = 1 << 63; uint256 internal constant _ROLE_64 = 1 << 64; uint256 internal constant _ROLE_65 = 1 << 65; uint256 internal constant _ROLE_66 = 1 << 66; uint256 internal constant _ROLE_67 = 1 << 67; uint256 internal constant _ROLE_68 = 1 << 68; uint256 internal constant _ROLE_69 = 1 << 69; uint256 internal constant _ROLE_70 = 1 << 70; uint256 internal constant _ROLE_71 = 1 << 71; uint256 internal constant _ROLE_72 = 1 << 72; uint256 internal constant _ROLE_73 = 1 << 73; uint256 internal constant _ROLE_74 = 1 << 74; uint256 internal constant _ROLE_75 = 1 << 75; uint256 internal constant _ROLE_76 = 1 << 76; uint256 internal constant _ROLE_77 = 1 << 77; uint256 internal constant _ROLE_78 = 1 << 78; uint256 internal constant _ROLE_79 = 1 << 79; uint256 internal constant _ROLE_80 = 1 << 80; uint256 internal constant _ROLE_81 = 1 << 81; uint256 internal constant _ROLE_82 = 1 << 82; uint256 internal constant _ROLE_83 = 1 << 83; uint256 internal constant _ROLE_84 = 1 << 84; uint256 internal constant _ROLE_85 = 1 << 85; uint256 internal constant _ROLE_86 = 1 << 86; uint256 internal constant _ROLE_87 = 1 << 87; uint256 internal constant _ROLE_88 = 1 << 88; uint256 internal constant _ROLE_89 = 1 << 89; uint256 internal constant _ROLE_90 = 1 << 90; uint256 internal constant _ROLE_91 = 1 << 91; uint256 internal constant _ROLE_92 = 1 << 92; uint256 internal constant _ROLE_93 = 1 << 93; uint256 internal constant _ROLE_94 = 1 << 94; uint256 internal constant _ROLE_95 = 1 << 95; uint256 internal constant _ROLE_96 = 1 << 96; uint256 internal constant _ROLE_97 = 1 << 97; uint256 internal constant _ROLE_98 = 1 << 98; uint256 internal constant _ROLE_99 = 1 << 99; uint256 internal constant _ROLE_100 = 1 << 100; uint256 internal constant _ROLE_101 = 1 << 101; uint256 internal constant _ROLE_102 = 1 << 102; uint256 internal constant _ROLE_103 = 1 << 103; uint256 internal constant _ROLE_104 = 1 << 104; uint256 internal constant _ROLE_105 = 1 << 105; uint256 internal constant _ROLE_106 = 1 << 106; uint256 internal constant _ROLE_107 = 1 << 107; uint256 internal constant _ROLE_108 = 1 << 108; uint256 internal constant _ROLE_109 = 1 << 109; uint256 internal constant _ROLE_110 = 1 << 110; uint256 internal constant _ROLE_111 = 1 << 111; uint256 internal constant _ROLE_112 = 1 << 112; uint256 internal constant _ROLE_113 = 1 << 113; uint256 internal constant _ROLE_114 = 1 << 114; uint256 internal constant _ROLE_115 = 1 << 115; uint256 internal constant _ROLE_116 = 1 << 116; uint256 internal constant _ROLE_117 = 1 << 117; uint256 internal constant _ROLE_118 = 1 << 118; uint256 internal constant _ROLE_119 = 1 << 119; uint256 internal constant _ROLE_120 = 1 << 120; uint256 internal constant _ROLE_121 = 1 << 121; uint256 internal constant _ROLE_122 = 1 << 122; uint256 internal constant _ROLE_123 = 1 << 123; uint256 internal constant _ROLE_124 = 1 << 124; uint256 internal constant _ROLE_125 = 1 << 125; uint256 internal constant _ROLE_126 = 1 << 126; uint256 internal constant _ROLE_127 = 1 << 127; uint256 internal constant _ROLE_128 = 1 << 128; uint256 internal constant _ROLE_129 = 1 << 129; uint256 internal constant _ROLE_130 = 1 << 130; uint256 internal constant _ROLE_131 = 1 << 131; uint256 internal constant _ROLE_132 = 1 << 132; uint256 internal constant _ROLE_133 = 1 << 133; uint256 internal constant _ROLE_134 = 1 << 134; uint256 internal constant _ROLE_135 = 1 << 135; uint256 internal constant _ROLE_136 = 1 << 136; uint256 internal constant _ROLE_137 = 1 << 137; uint256 internal constant _ROLE_138 = 1 << 138; uint256 internal constant _ROLE_139 = 1 << 139; uint256 internal constant _ROLE_140 = 1 << 140; uint256 internal constant _ROLE_141 = 1 << 141; uint256 internal constant _ROLE_142 = 1 << 142; uint256 internal constant _ROLE_143 = 1 << 143; uint256 internal constant _ROLE_144 = 1 << 144; uint256 internal constant _ROLE_145 = 1 << 145; uint256 internal constant _ROLE_146 = 1 << 146; uint256 internal constant _ROLE_147 = 1 << 147; uint256 internal constant _ROLE_148 = 1 << 148; uint256 internal constant _ROLE_149 = 1 << 149; uint256 internal constant _ROLE_150 = 1 << 150; uint256 internal constant _ROLE_151 = 1 << 151; uint256 internal constant _ROLE_152 = 1 << 152; uint256 internal constant _ROLE_153 = 1 << 153; uint256 internal constant _ROLE_154 = 1 << 154; uint256 internal constant _ROLE_155 = 1 << 155; uint256 internal constant _ROLE_156 = 1 << 156; uint256 internal constant _ROLE_157 = 1 << 157; uint256 internal constant _ROLE_158 = 1 << 158; uint256 internal constant _ROLE_159 = 1 << 159; uint256 internal constant _ROLE_160 = 1 << 160; uint256 internal constant _ROLE_161 = 1 << 161; uint256 internal constant _ROLE_162 = 1 << 162; uint256 internal constant _ROLE_163 = 1 << 163; uint256 internal constant _ROLE_164 = 1 << 164; uint256 internal constant _ROLE_165 = 1 << 165; uint256 internal constant _ROLE_166 = 1 << 166; uint256 internal constant _ROLE_167 = 1 << 167; uint256 internal constant _ROLE_168 = 1 << 168; uint256 internal constant _ROLE_169 = 1 << 169; uint256 internal constant _ROLE_170 = 1 << 170; uint256 internal constant _ROLE_171 = 1 << 171; uint256 internal constant _ROLE_172 = 1 << 172; uint256 internal constant _ROLE_173 = 1 << 173; uint256 internal constant _ROLE_174 = 1 << 174; uint256 internal constant _ROLE_175 = 1 << 175; uint256 internal constant _ROLE_176 = 1 << 176; uint256 internal constant _ROLE_177 = 1 << 177; uint256 internal constant _ROLE_178 = 1 << 178; uint256 internal constant _ROLE_179 = 1 << 179; uint256 internal constant _ROLE_180 = 1 << 180; uint256 internal constant _ROLE_181 = 1 << 181; uint256 internal constant _ROLE_182 = 1 << 182; uint256 internal constant _ROLE_183 = 1 << 183; uint256 internal constant _ROLE_184 = 1 << 184; uint256 internal constant _ROLE_185 = 1 << 185; uint256 internal constant _ROLE_186 = 1 << 186; uint256 internal constant _ROLE_187 = 1 << 187; uint256 internal constant _ROLE_188 = 1 << 188; uint256 internal constant _ROLE_189 = 1 << 189; uint256 internal constant _ROLE_190 = 1 << 190; uint256 internal constant _ROLE_191 = 1 << 191; uint256 internal constant _ROLE_192 = 1 << 192; uint256 internal constant _ROLE_193 = 1 << 193; uint256 internal constant _ROLE_194 = 1 << 194; uint256 internal constant _ROLE_195 = 1 << 195; uint256 internal constant _ROLE_196 = 1 << 196; uint256 internal constant _ROLE_197 = 1 << 197; uint256 internal constant _ROLE_198 = 1 << 198; uint256 internal constant _ROLE_199 = 1 << 199; uint256 internal constant _ROLE_200 = 1 << 200; uint256 internal constant _ROLE_201 = 1 << 201; uint256 internal constant _ROLE_202 = 1 << 202; uint256 internal constant _ROLE_203 = 1 << 203; uint256 internal constant _ROLE_204 = 1 << 204; uint256 internal constant _ROLE_205 = 1 << 205; uint256 internal constant _ROLE_206 = 1 << 206; uint256 internal constant _ROLE_207 = 1 << 207; uint256 internal constant _ROLE_208 = 1 << 208; uint256 internal constant _ROLE_209 = 1 << 209; uint256 internal constant _ROLE_210 = 1 << 210; uint256 internal constant _ROLE_211 = 1 << 211; uint256 internal constant _ROLE_212 = 1 << 212; uint256 internal constant _ROLE_213 = 1 << 213; uint256 internal constant _ROLE_214 = 1 << 214; uint256 internal constant _ROLE_215 = 1 << 215; uint256 internal constant _ROLE_216 = 1 << 216; uint256 internal constant _ROLE_217 = 1 << 217; uint256 internal constant _ROLE_218 = 1 << 218; uint256 internal constant _ROLE_219 = 1 << 219; uint256 internal constant _ROLE_220 = 1 << 220; uint256 internal constant _ROLE_221 = 1 << 221; uint256 internal constant _ROLE_222 = 1 << 222; uint256 internal constant _ROLE_223 = 1 << 223; uint256 internal constant _ROLE_224 = 1 << 224; uint256 internal constant _ROLE_225 = 1 << 225; uint256 internal constant _ROLE_226 = 1 << 226; uint256 internal constant _ROLE_227 = 1 << 227; uint256 internal constant _ROLE_228 = 1 << 228; uint256 internal constant _ROLE_229 = 1 << 229; uint256 internal constant _ROLE_230 = 1 << 230; uint256 internal constant _ROLE_231 = 1 << 231; uint256 internal constant _ROLE_232 = 1 << 232; uint256 internal constant _ROLE_233 = 1 << 233; uint256 internal constant _ROLE_234 = 1 << 234; uint256 internal constant _ROLE_235 = 1 << 235; uint256 internal constant _ROLE_236 = 1 << 236; uint256 internal constant _ROLE_237 = 1 << 237; uint256 internal constant _ROLE_238 = 1 << 238; uint256 internal constant _ROLE_239 = 1 << 239; uint256 internal constant _ROLE_240 = 1 << 240; uint256 internal constant _ROLE_241 = 1 << 241; uint256 internal constant _ROLE_242 = 1 << 242; uint256 internal constant _ROLE_243 = 1 << 243; uint256 internal constant _ROLE_244 = 1 << 244; uint256 internal constant _ROLE_245 = 1 << 245; uint256 internal constant _ROLE_246 = 1 << 246; uint256 internal constant _ROLE_247 = 1 << 247; uint256 internal constant _ROLE_248 = 1 << 248; uint256 internal constant _ROLE_249 = 1 << 249; uint256 internal constant _ROLE_250 = 1 << 250; uint256 internal constant _ROLE_251 = 1 << 251; uint256 internal constant _ROLE_252 = 1 << 252; uint256 internal constant _ROLE_253 = 1 << 253; uint256 internal constant _ROLE_254 = 1 << 254; uint256 internal constant _ROLE_255 = 1 << 255; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; /// @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) } } _; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; /// @notice Initializable mixin for the upgradeable contracts. /// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/Initializable.sol) /// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/tree/master/contracts/proxy/utils/Initializable.sol) abstract contract Initializable { /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* CUSTOM ERRORS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev The contract is already initialized. error InvalidInitialization(); /// @dev The contract is not initializing. error NotInitializing(); /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* EVENTS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Triggered when the contract has been initialized. event Initialized(uint64 version); /// @dev `keccak256(bytes("Initialized(uint64)"))`. bytes32 private constant _INTIALIZED_EVENT_SIGNATURE = 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2; /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* STORAGE */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev The default initializable slot is given by: /// `bytes32(~uint256(uint32(bytes4(keccak256("_INITIALIZABLE_SLOT")))))`. /// /// Bits Layout: /// - [0] `initializing` /// - [1..64] `initializedVersion` bytes32 private constant _INITIALIZABLE_SLOT = 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf601132; /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* CONSTRUCTOR */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ constructor() { // Construction time check to ensure that `_initializableSlot()` is not // overridden to zero. Will be optimized away if there is no revert. require(_initializableSlot() != bytes32(0)); } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* OPERATIONS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Override to return a non-zero custom storage slot if required. function _initializableSlot() internal pure virtual returns (bytes32) { return _INITIALIZABLE_SLOT; } /// @dev Guards an initializer function so that it can be invoked at most once. /// /// You can guard a function with `onlyInitializing` such that it can be called /// through a function guarded with `initializer`. /// /// This is similar to `reinitializer(1)`, except that in the context of a constructor, /// an `initializer` guarded function can be invoked multiple times. /// This can be useful during testing and is not expected to be used in production. /// /// Emits an {Initialized} event. modifier initializer() virtual { bytes32 s = _initializableSlot(); /// @solidity memory-safe-assembly assembly { let i := sload(s) // Set `initializing` to 1, `initializedVersion` to 1. sstore(s, 3) // If `!(initializing == 0 && initializedVersion == 0)`. if i { // If `!(address(this).code.length == 0 && initializedVersion == 1)`. if iszero(lt(extcodesize(address()), eq(shr(1, i), 1))) { mstore(0x00, 0xf92ee8a9) // `InvalidInitialization()`. revert(0x1c, 0x04) } s := shl(shl(255, i), s) // Skip initializing if `initializing == 1`. } } _; /// @solidity memory-safe-assembly assembly { if s { // Set `initializing` to 0, `initializedVersion` to 1. sstore(s, 2) // Emit the {Initialized} event. mstore(0x20, 1) log1(0x20, 0x20, _INTIALIZED_EVENT_SIGNATURE) } } } /// @dev Guards an reinitialzer function so that it can be invoked at most once. /// /// You can guard a function with `onlyInitializing` such that it can be called /// through a function guarded with `reinitializer`. /// /// Emits an {Initialized} event. modifier reinitializer(uint64 version) virtual { bytes32 s = _initializableSlot(); /// @solidity memory-safe-assembly assembly { // Clean upper bits, and shift left by 1 to make space for the initializing bit. version := shl(1, and(version, 0xffffffffffffffff)) let i := sload(s) // If `initializing == 1 || initializedVersion >= version`. if iszero(lt(and(i, 1), lt(i, version))) { mstore(0x00, 0xf92ee8a9) // `InvalidInitialization()`. revert(0x1c, 0x04) } // Set `initializing` to 1, `initializedVersion` to `version`. sstore(s, or(1, version)) } _; /// @solidity memory-safe-assembly assembly { // Set `initializing` to 0, `initializedVersion` to `version`. sstore(s, version) // Emit the {Initialized} event. mstore(0x20, shr(1, version)) log1(0x20, 0x20, _INTIALIZED_EVENT_SIGNATURE) } } /// @dev Guards a function such that it can only be called in the scope /// of a function guarded with `initializer` or `reinitializer`. modifier onlyInitializing() virtual { _checkInitializing(); _; } /// @dev Reverts if the contract is not initializing. function _checkInitializing() internal view virtual { bytes32 s = _initializableSlot(); /// @solidity memory-safe-assembly assembly { if iszero(and(1, sload(s))) { mstore(0x00, 0xd7e6bcf8) // `NotInitializing()`. revert(0x1c, 0x04) } } } /// @dev Locks any future initializations by setting the initialized version to `2**64 - 1`. /// /// Calling this in the constructor will prevent the contract from being initialized /// or reinitialized. It is recommended to use this to lock implementation contracts /// that are designed to be called through proxies. /// /// Emits an {Initialized} event the first time it is successfully called. function _disableInitializers() internal virtual { bytes32 s = _initializableSlot(); /// @solidity memory-safe-assembly assembly { let i := sload(s) if and(i, 1) { mstore(0x00, 0xf92ee8a9) // `InvalidInitialization()`. revert(0x1c, 0x04) } let uint64max := 0xffffffffffffffff if iszero(eq(shr(1, i), uint64max)) { // Set `initializing` to 0, `initializedVersion` to `2**64 - 1`. sstore(s, shl(1, uint64max)) // Emit the {Initialized} event. mstore(0x20, uint64max) log1(0x20, 0x20, _INTIALIZED_EVENT_SIGNATURE) } } } /// @dev Returns the highest version that has been initialized. function _getInitializedVersion() internal view virtual returns (uint64 version) { bytes32 s = _initializableSlot(); /// @solidity memory-safe-assembly assembly { version := shr(1, sload(s)) } } /// @dev Returns whether the contract is currently initializing. function _isInitializing() internal view virtual returns (bool result) { bytes32 s = _initializableSlot(); /// @solidity memory-safe-assembly assembly { result := and(1, sload(s)) } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.22; import {TokenStandard} from "../../common/Structs.sol"; interface IMagicDropTokenImplRegistry { function registerImplementation( TokenStandard standard, address impl, bool isDefault, uint256 deploymentFee, uint256 mintFee ) 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; function getMintFee(TokenStandard standard, uint32 implId) external view returns (uint256); function setMintFee(TokenStandard standard, uint32 implId, uint256 mintFee) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @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); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; /// @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(); _; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.22; enum TokenStandard { ERC721, ERC1155, ERC20 } struct MintStageInfo { uint80 price; 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; 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; /// @dev The mint fee per token. uint256 mintFee; }
{ "viaIR": true, "codegen": "yul", "remappings": [ "solady/=lib/solady/", "solemate/=/lib/solemate/src/", "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/", "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/", "forge-std/=lib/forge-std/src/", "erc721a/contracts/=lib/ERC721A/contracts/", "erc721a-upgradeable/contracts/=lib/ERC721A-Upgradeable/contracts/", "@limitbreak/creator-token-standards/src/=lib/creator-token-standards/src/", "@ensdomains/=node_modules/@ensdomains/", "@layerzerolabs/=node_modules/@layerzerolabs/", "@limitbreak/permit-c/=lib/creator-token-standards/lib/PermitC/src/", "@opensea/tstorish/=lib/creator-token-standards/lib/tstorish/src/", "@openzeppelin-3/=node_modules/@openzeppelin-3/", "@rari-capital/solmate/=lib/creator-token-standards/lib/PermitC/lib/solmate/", "@uniswap/=node_modules/@uniswap/", "ERC721A-Upgradeable/=lib/ERC721A-Upgradeable/contracts/", "ERC721A/=lib/ERC721A/contracts/", "PermitC/=lib/creator-token-standards/lib/PermitC/", "creator-token-standards/=lib/creator-token-standards/", "ds-test/=lib/solmate/lib/ds-test/src/", "erc4626-tests/=lib/operator-filter-registry/lib/openzeppelin-contracts/lib/erc4626-tests/", "eth-gas-reporter/=node_modules/eth-gas-reporter/", "forge-gas-metering/=lib/creator-token-standards/lib/PermitC/lib/forge-gas-metering/", "hardhat-deploy/=node_modules/hardhat-deploy/", "hardhat/=node_modules/hardhat/", "murky/=lib/creator-token-standards/lib/murky/", "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/", "openzeppelin-contracts/=lib/openzeppelin-contracts/", "openzeppelin/=lib/creator-token-standards/lib/PermitC/lib/openzeppelin-contracts/contracts/", "operator-filter-registry/=lib/operator-filter-registry/", "solmate/=lib/solmate/src/", "tstorish/=lib/creator-token-standards/lib/tstorish/src/" ], "evmVersion": "shanghai", "outputSelection": { "*": { "*": [ "abi" ] } }, "optimizer": { "enabled": true, "mode": "3", "fallback_to_optimizing_for_size": false, "disable_system_request_memoization": true }, "metadata": {}, "libraries": {}, "enableEraVMExtensions": false, "forceEVMLA": false }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"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":"InvalidInitialization","type":"error"},{"inputs":[],"name":"NewImplementationCannotBeZero","type":"error"},{"inputs":[],"name":"NewOwnerIsZeroAddress","type":"error"},{"inputs":[],"name":"NoHandoverRequest","type":"error"},{"inputs":[],"name":"NotInitializing","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"},{"indexed":false,"internalType":"uint256","name":"mintFee","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":false,"internalType":"uint64","name":"version","type":"uint64"}],"name":"Initialized","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":"mintFee","type":"uint256"}],"name":"MintFeeSet","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":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"roles","type":"uint256"}],"name":"RolesUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"inputs":[],"name":"MANAGER_ROLE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"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":[{"internalType":"enum TokenStandard","name":"standard","type":"uint8"},{"internalType":"uint32","name":"implId","type":"uint32"}],"name":"getMintFee","outputs":[{"internalType":"uint256","name":"mintFee","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"roles","type":"uint256"}],"name":"grantRoles","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"roles","type":"uint256"}],"name":"hasAllRoles","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"roles","type":"uint256"}],"name":"hasAnyRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"initialOwner","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","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"},{"internalType":"uint256","name":"mintFee","type":"uint256"}],"name":"registerImplementation","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"roles","type":"uint256"}],"name":"renounceRoles","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"requestOwnershipHandover","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"roles","type":"uint256"}],"name":"revokeRoles","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"rolesOf","outputs":[{"internalType":"uint256","name":"roles","type":"uint256"}],"stateMutability":"view","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":"enum TokenStandard","name":"standard","type":"uint8"},{"internalType":"uint32","name":"implId","type":"uint32"},{"internalType":"uint256","name":"mintFee","type":"uint256"}],"name":"setMintFee","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
9c4d535b0000000000000000000000000000000000000000000000000000000000000000010002552766c2e87e501801c968660c914327dd37fde63a4d4b2b16015dcd8d00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x00020000000000020006000000000002000100000001035500000001002001900000002f0000c13d0000006002100270000001e8022001970000008003000039000000400030043f000000040020008c0000049d0000413d000000000301043b000000e003300270000001ef0030009c000000560000a13d000001f00030009c000000830000213d000001fa0030009c0000015e0000a13d000001fb0030009c0000021d0000213d000001fe0030009c000002530000613d000001ff0030009c0000049d0000c13d0000021701000041000000000501041a0000000001000411000000000051004b000005820000c13d0000000001000414000001e80010009c000001e801008041000000c00110021000000227011001c70000800d02000039000000030300003900000228040000410000000006000019079a078b0000040f00000001002001900000049d0000613d00000226010000410000021702000041000000000012041b00000000010000190000079b0001042e000000a001000039000000400010043f0000000001000416000000000001004b0000049d0000c13d0000000001000410000000800010043f000001e902000041000000000202041a0000000100200190000003e50000c13d0000025202200197000001ea0020009c0000004e0000613d000001ea01000041000001e902000041000000000012041b000001eb01000041000000200010043f0000000001000414000001e80010009c000001e801008041000000c001100210000001ec011001c70000800d020000390000000103000039000001ed04000041079a078b0000040f00000001002001900000049d0000613d000000800100043d000000010200003900000140000004430000016000100443000000200100003900000100001004430000012000200443000001ee010000410000079b0001042e000002030030009c000000ba0000a13d000002040030009c000001820000a13d000002050030009c0000022a0000213d000002080030009c0000026b0000613d000002090030009c0000049d0000c13d000000240020008c0000049d0000413d0000000002000416000000000002004b0000049d0000c13d0000000401100370000000000101043b000000020010008c0000049d0000213d000000000010043f0000021e01000041000000200010043f0000000001000414000001e80010009c000001e801008041000000c0011002100000021f011001c70000801002000039079a07900000040f00000001002001900000049d0000613d000000000101043b000000000201041a0000004002200270000001e8022001980000017e0000613d000000000020043f0000000101100039000000200010043f00000040020000390000000001000019079a07760000040f000000000101041a0000021401100197000004270000013d000001f10030009c000001970000a13d000001f20030009c000002400000213d000001f50030009c0000028a0000613d000001f60030009c0000049d0000c13d000000240020008c0000049d0000413d0000000401100370000000000101043b000600000001001d000002140010009c0000049d0000213d0000021701000041000000000101041a0000000002000411000000000012004b000005820000c13d00000215010000410000000c0010043f0000000601000029000000000010043f0000000001000414000001e80010009c000001e801008041000000c0011002100000021a011001c70000801002000039079a07900000040f00000001002001900000049d0000613d000000000101043b000400000001001d000000000101041a000500000001001d0000021b0100004100000000001004430000000001000414000001e80010009c000001e801008041000000c0011002100000021c011001c70000800b02000039079a07900000040f0000000100200190000006400000613d000000000101043b000000050010006c000005030000a13d0000021d01000041000000000010043f00000219010000410000079c000104300000020d0030009c000001cd0000213d000002110030009c000002910000613d000002120030009c000002cc0000613d000002130030009c0000049d0000c13d000000440020008c0000049d0000413d0000000002000416000000000002004b0000049d0000c13d0000000402100370000000000202043b000600000002001d000000020020008c0000049d0000213d0000002401100370000000000101043b000500000001001d000001e80010009c0000049d0000213d0000021701000041000000000201041a0000000001000411000000000021004b000004ae0000c13d0000000601000029000000000010043f0000021e01000041000000200010043f0000000001000414000001e80010009c000001e801008041000000c0011002100000021f011001c70000801002000039079a07900000040f00000001002001900000049d0000613d000000000101043b0000000502000029000000000020043f0000000101100039000000200010043f0000000001000414000001e80010009c000001e801008041000000c0011002100000021f011001c70000801002000039079a07900000040f00000001002001900000049d0000613d000000000101043b000000000101041a0000021400100198000002c40000613d0000000601000029000000000010043f0000021e01000041000000200010043f0000000001000414000001e80010009c000001e801008041000000c0011002100000021f011001c70000801002000039079a07900000040f00000001002001900000049d0000613d000000000101043b0000000502000029000000000020043f0000000101100039000000200010043f0000000001000414000001e80010009c000001e801008041000000c0011002100000021f011001c70000801002000039079a07900000040f00000001002001900000049d0000613d000000000101043b000000000201041a0000023402200197000000000021041b0000000601000029000000000010043f0000021e01000041000000200010043f0000000001000414000001e80010009c000001e801008041000000c0011002100000021f011001c70000801002000039079a07900000040f00000001002001900000049d0000613d000000000101043b000000000101041a0000004001100270000001e801100197000000050010006c0000014b0000c13d0000000601000029000000000010043f0000021e01000041000000200010043f0000000001000414000001e80010009c000001e801008041000000c0011002100000021f011001c70000801002000039079a07900000040f00000001002001900000049d0000613d000000000101043b000000000201041a0000023a02200197000000000021041b000000400100043d000000060200002900000000022104360000000000020435000001e80010009c000001e80100804100000040011002100000000002000414000001e80020009c000001e802008041000000c002200210000000000112019f0000021f011001c70000800d0200003900000001030000390000023b04000041079a078b0000040f00000001002001900000049d0000613d000000400100043d00000020021000390000000503000029000000000032043500000006020000290000000000210435000001e80010009c000001e80100804100000040011002100000000002000414000001e80020009c000001e802008041000000c002200210000000000112019f0000021f011001c70000800d0200003900000001030000390000024e04000041000003300000013d000002000030009c000002d40000613d000002010030009c000002f10000613d000002020030009c0000049d0000c13d000000240020008c0000049d0000413d0000000002000416000000000002004b0000049d0000c13d0000000401100370000000000101043b000000020010008c0000049d0000213d000000000010043f0000021e01000041000000200010043f0000000001000414000001e80010009c000001e801008041000000c0011002100000021f011001c70000801002000039079a07900000040f00000001002001900000049d0000613d000000000101043b000000000101041a0000004001100270000001e801100198000004270000c13d0000024901000041000000000010043f00000219010000410000079c000104300000020a0030009c000003090000613d0000020b0030009c000003350000613d0000020c0030009c0000049d0000c13d000000440020008c0000049d0000413d0000000401100370000000000101043b000600000001001d000002140010009c0000049d0000213d079a072e0000040f00000024010000390000000101100367000000000201043b0000000601000029079a07510000040f00000000010000190000079b0001042e000001f70030009c000003400000613d000001f80030009c0000038a0000613d000001f90030009c0000049d0000c13d000000440020008c0000049d0000413d0000000002000416000000000002004b0000049d0000c13d0000000402100370000000000202043b000000020020008c0000049d0000213d0000002401100370000000000101043b000600000001001d000001e80010009c0000049d0000213d000000000020043f0000021e01000041000000200010043f0000000001000414000001e80010009c000001e801008041000000c0011002100000021f011001c70000801002000039079a07900000040f00000001002001900000049d0000613d000000000101043b0000000602000029000000000020043f0000000101100039000000200010043f0000000001000414000001e80010009c000001e801008041000000c0011002100000021f011001c70000801002000039079a07900000040f00000001002001900000049d0000613d000000000101043b000000000101041a000000000001004b000000810000c13d0000022101000041000000000010043f00000219010000410000079c000104300000020e0030009c000003e90000613d0000020f0030009c000004150000613d000002100030009c0000049d0000c13d000000640020008c0000049d0000413d0000000002000416000000000002004b0000049d0000c13d0000000402100370000000000202043b000600000002001d000000020020008c0000049d0000213d0000002402100370000000000202043b000500000002001d000001e80020009c0000049d0000213d0000004401100370000000000101043b000400000001001d0000021701000041000000000201041a0000000001000411000000000021004b000004bf0000c13d0000000601000029000000000010043f0000021e01000041000000200010043f0000000001000414000001e80010009c000001e801008041000000c0011002100000021f011001c70000801002000039079a07900000040f00000001002001900000049d0000613d000000000101043b0000000502000029000000000020043f0000000301100039000000200010043f0000000001000414000001e80010009c000001e801008041000000c0011002100000021f011001c70000801002000039079a07900000040f00000001002001900000049d0000613d000000000101043b0000000403000029000000000031041b000000400100043d0000004002100039000000000032043500000020021000390000000503000029000000000032043500000006020000290000000000210435000001e80010009c000001e80100804100000040011002100000000002000414000001e80020009c000001e802008041000000c002200210000000000112019f0000022f011001c70000800d0200003900000001030000390000024c04000041000003300000013d000001fc0030009c0000042e0000613d000001fd0030009c0000049d0000c13d0000000001000416000000000001004b0000049d0000c13d0000021701000041000000000101041a0000021401100197000000800010043f00000216010000410000079b0001042e000002060030009c000004690000613d000002070030009c0000049d0000c13d000000440020008c0000049d0000413d0000000002000416000000000002004b0000049d0000c13d0000000402100370000000000202043b000002140020009c0000049d0000213d0000002401100370000000000101043b000600000001001d0000000001020019079a071d0000040f00000006001001800000000001000039000000010100c039000004270000013d000001f30030009c000004970000613d000001f40030009c0000049d0000c13d000000240020008c0000049d0000413d0000000002000416000000000002004b0000049d0000c13d0000000401100370000000000101043b000002140010009c0000049d0000213d00000215020000410000000c0020043f000000000010043f0000000c010000390000002002000039000002850000013d000000440020008c0000049d0000413d0000000002000416000000000002004b0000049d0000c13d0000000402100370000000000202043b000000020020008c0000049d0000213d0000002401100370000000000101043b000600000001001d000001e80010009c0000049d0000213d000000000020043f0000021e01000041000000200010043f00000040020000390000000001000019079a07760000040f0000000602000029000000000020043f0000000201100039000002820000013d000000440020008c0000049d0000413d0000000002000416000000000002004b0000049d0000c13d0000000402100370000000000202043b000000020020008c0000049d0000213d0000002401100370000000000101043b000600000001001d000001e80010009c0000049d0000213d000000000020043f0000021e01000041000000200010043f00000040020000390000000001000019079a07760000040f0000000602000029000000000020043f0000000301100039000000200010043f00000000010000190000004002000039079a07760000040f000000000101041a000000800010043f00000216010000410000079b0001042e0000000001000416000000000001004b0000049d0000c13d0000000101000039000000800010043f00000216010000410000079b0001042e000000440020008c0000049d0000413d0000000002000416000000000002004b0000049d0000c13d0000000402100370000000000202043b000600000002001d000000020020008c0000049d0000213d0000002401100370000000000101043b000500000001001d000001e80010009c0000049d0000213d0000021701000041000000000201041a0000000001000411000000000021004b000004d00000c13d0000000601000029000000000010043f0000021e01000041000000200010043f0000000001000414000001e80010009c000001e801008041000000c0011002100000021f011001c70000801002000039079a07900000040f00000001002001900000049d0000613d000000000101043b0000000502000029000000000020043f0000000101100039000000200010043f0000000001000414000001e80010009c000001e801008041000000c0011002100000021f011001c70000801002000039079a07900000040f00000001002001900000049d0000613d000000000101043b000000000101041a0000021400100198000005090000c13d000000400100043d00000251020000410000000000210435000001e80010009c000001e80100804100000040011002100000023e011001c70000079c00010430000000240020008c0000049d0000413d0000000401100370000000000201043b0000000001000411079a07510000040f00000000010000190000079b0001042e0000000001000416000000000001004b0000049d0000c13d000002410100004100000000001004430000000001000412000000040010044300000024000004430000000001000414000001e80010009c000001e801008041000000c00110021000000242011001c70000800502000039079a07900000040f0000000100200190000006400000613d000000000101043b0000000002000410000000000021004b000004930000c13d000000400100043d00000243020000410000000000210435000001e80010009c000001e801008041000000400110021000000220011001c70000079b0001042e00000215010000410000000c0010043f0000000001000411000000000010043f0000000001000414000001e80010009c000001e801008041000000c0011002100000021a011001c70000801002000039079a07900000040f00000001002001900000049d0000613d000000000101043b000000000001041b0000000001000414000001e80010009c000001e801008041000000c00110021000000227011001c70000800d02000039000000020300003900000240040000410000032f0000013d00000215010000410000000c0010043f0000000001000411000000000010043f0000021b0100004100000000001004430000000001000414000001e80010009c000001e801008041000000c0011002100000021c011001c70000800b02000039079a07900000040f0000000100200190000006400000613d000000000101043b000600000001001d0000000001000414000001e80010009c000001e801008041000000c0011002100000021a011001c70000801002000039079a07900000040f00000001002001900000049d0000613d000000000101043b00000006020000290000024a0220009a000000000021041b0000000001000414000001e80010009c000001e801008041000000c00110021000000227011001c70000800d0200003900000002030000390000024b040000410000000005000411079a078b0000040f00000001002001900000049d0000613d00000000010000190000079b0001042e000000240020008c0000049d0000413d0000000002000416000000000002004b0000049d0000c13d0000000401100370000000000101043b000002140010009c0000049d0000213d079a071d0000040f000004270000013d000000640020008c0000049d0000413d0000000002000416000000000002004b0000049d0000c13d0000000402100370000000000202043b000600000002001d000000020020008c0000049d0000213d0000002402100370000000000202043b000500000002001d000001e80020009c0000049d0000213d0000004401100370000000000101043b000400000001001d0000021701000041000000000201041a0000000001000411000000000021004b000004e10000c13d0000000601000029000000000010043f0000021e01000041000000200010043f0000000001000414000001e80010009c000001e801008041000000c0011002100000021f011001c70000801002000039079a07900000040f00000001002001900000049d0000613d000000000101043b0000000502000029000000000020043f0000000201100039000000200010043f0000000001000414000001e80010009c000001e801008041000000c0011002100000021f011001c70000801002000039079a07900000040f00000001002001900000049d0000613d000000000101043b0000000403000029000000000031041b000000400100043d0000004002100039000000000032043500000020021000390000000503000029000000000032043500000006020000290000000000210435000001e80010009c000001e80100804100000040011002100000000002000414000001e80020009c000001e802008041000000c002200210000000000112019f0000022f011001c70000800d0200003900000001030000390000023004000041000003300000013d000000240020008c0000049d0000413d0000000002000416000000000002004b0000049d0000c13d0000000401100370000000000101043b000600000001001d000002140010009c0000049d0000213d000001e903000041000000000203041a0000000301000039000000000013041b000000000002004b000003b20000613d000500000002001d00000222010000410000000000100443000000000100041000000004001004430000000001000414000001e80010009c000001e801008041000000c00110021000000223011001c70000800202000039079a07900000040f0000000100200190000006400000613d00000005030000290000025202300197000000000101043b000000020020008c000003e50000c13d000000000001004b000003e50000c13d00000001003001900000000003000019000001e9030060410000021701000041000000000201041a000000000002004b000004aa0000c13d000500000003001d0000000606000029000000000006004b00000000020000190000022602006041000000000262019f000000000021041b0000000001000414000001e80010009c000001e801008041000000c00110021000000227011001c70000800d02000039000000030300003900000228040000410000000005000019079a078b0000040f00000001002001900000049d0000613d0000022901000041000000000201041a0000022a022001970000022b022001c7000000000021041b0000022c01000041000000000201041a0000000103000039000000000030043f0000021e04000041000000200040043f0000022a022001970000022d022001c7000000000021041b000000050000006b000003330000613d00000002010000390000000502000029000000000012041b000000200030043f0000000001000414000001e80010009c000001e801008041000000c001100210000001ec011001c70000800d02000039000001ed04000041000003300000013d0000022401000041000000000010043f00000219010000410000079c00010430000000440020008c0000049d0000413d0000000401100370000000000101043b000002140010009c0000049d0000213d0000021702000041000000000202041a0000000003000411000000000023004b000005820000c13d0000022e020000410000000c0020043f000000000010043f0000000001000414000001e80010009c000001e801008041000000c0011002100000021a011001c70000801002000039079a07900000040f00000001002001900000049d0000613d00000024020000390000000102200367000000000202043b000000000101043b000000000301041a000000000623019f000000000061041b0000000c0100043d00000000020004140000006005100270000001e80020009c000001e802008041000000c00120021000000227011001c70000800d0200003900000003030000390000024d04000041079a078b0000040f0000000100200190000003330000c13d0000049d0000013d000000440020008c0000049d0000413d0000000002000416000000000002004b0000049d0000c13d0000000402100370000000000202043b000002140020009c0000049d0000213d0000002401100370000000000101043b000600000001001d0000000001020019079a071d0000040f000000060110017f000000060010006c00000000010000390000000101006039000000400200043d0000000000120435000001e80020009c000001e802008041000000400120021000000220011001c70000079b0001042e000000a40020008c0000049d0000413d0000000002000416000000000002004b0000049d0000c13d0000000402100370000000000202043b000600000002001d000000020020008c0000049d0000213d0000002402100370000000000202043b000500000002001d000002140020009c0000049d0000213d0000004402100370000000000302043b000000000003004b0000000002000039000000010200c039000400000003001d000000000023004b0000049d0000c13d0000008402100370000000000202043b000200000002001d0000006401100370000000000101043b000300000001001d0000021701000041000000000201041a0000000001000411000000000021004b000004f20000c13d0000000601000029000000000010043f0000021e01000041000000200010043f0000000001000414000001e80010009c000001e801008041000000c0011002100000021f011001c70000801002000039079a07900000040f00000001002001900000049d0000613d000000400300043d000000000101043b000000000101041a000000e001100212000005300000c13d0000023f010000410000000000130435000001e80030009c000001e80300804100000040013002100000023e011001c70000079c00010430000000440020008c0000049d0000413d0000000403100370000000000303043b000600000003001d000002140030009c0000049d0000213d0000002403100370000000000303043b000001eb0030009c0000049d0000213d0000002304300039000000000024004b0000049d0000813d000400040030003d0000000401100360000000000101043b000500000001001d000001eb0010009c0000049d0000213d00000005013000290000002401100039000000000021004b0000049d0000213d000002410100004100000000001004430000000001000412000000040010044300000024000004430000000001000414000001e80010009c000001e801008041000000c00110021000000242011001c70000800502000039079a07900000040f0000000100200190000006400000613d000000000101043b0000000002000410000000000021004b000005780000c13d0000024801000041000000000010043f00000219010000410000079c00010430000000240020008c0000049d0000413d0000000401100370000000000101043b000002140010009c0000049f0000a13d00000000010000190000079c000104300000021702000041000000000202041a0000000003000411000000000023004b000005820000c13d000000000001004b000005060000c13d0000021801000041000000000010043f00000219010000410000079c000104300000022501000041000000000010043f00000219010000410000079c000104300000022e020000410000000c0020043f000000000010043f0000000001000414000001e80010009c000001e801008041000000c0011002100000021a011001c70000801002000039079a07900000040f00000001002001900000049d0000613d000000000101043b000000000101041a0000000100100190000000d60000c13d000005820000013d0000022e020000410000000c0020043f000000000010043f0000000001000414000001e80010009c000001e801008041000000c0011002100000021a011001c70000801002000039079a07900000040f00000001002001900000049d0000613d000000000101043b000000000101041a0000000100100190000001ea0000c13d000005820000013d0000022e020000410000000c0020043f000000000010043f0000000001000414000001e80010009c000001e801008041000000c0011002100000021a011001c70000801002000039079a07900000040f00000001002001900000049d0000613d000000000101043b000000000101041a0000000100100190000002a50000c13d000005820000013d0000022e020000410000000c0020043f000000000010043f0000000001000414000001e80010009c000001e801008041000000c0011002100000021a011001c70000801002000039079a07900000040f00000001002001900000049d0000613d000000000101043b000000000101041a0000000100100190000003570000c13d000005820000013d0000022e020000410000000c0020043f000000000010043f0000000001000414000001e80010009c000001e801008041000000c0011002100000021a011001c70000801002000039079a07900000040f00000001002001900000049d0000613d000000000101043b000000000101041a0000000100100190000004500000c13d000005820000013d0000000401000029000000000001041b0000000601000029079a07380000040f00000000010000190000079b0001042e0000000601000029000000000010043f0000021e01000041000000200010043f0000000001000414000001e80010009c000001e801008041000000c0011002100000021f011001c70000801002000039079a07900000040f00000001002001900000049d0000613d000000050400002900000040024002100000025002200197000000000101043b000000000301041a0000023a03300197000000000223019f000000000021041b000000400100043d0000002002100039000000000042043500000006020000290000000000210435000001e80010009c000001e80100804100000040011002100000000002000414000001e80020009c000001e802008041000000c002200210000000000112019f0000021f011001c70000800d0200003900000001030000390000023b04000041000003300000013d0000023102000041000000000023043500000004023000390000000000120435000001e80030009c000001e801000041000000000103401900000040011002100000000002000414000001e80020009c000001e802008041000000c002200210000000000112019f00000232011001c70000000502000029000100000003001d079a07900000040f0000006003100270000001e803300197000000200030008c000000200400003900000000040340190000001f0640018f0000002007400190000000010b0000290000000105700029000005510000613d000000000801034f00000000090b0019000000008a08043c0000000009a90436000000000059004b0000054d0000c13d000000000006004b0000055e0000613d000000000771034f0000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f0000000100200190000005860000613d0000001f01400039000000600210018f0000000001b20019000000000021004b00000000020000390000000102004039000001eb0010009c000005a40000213d0000000100200190000005a40000c13d000000400010043f000000200030008c0000049d0000413d00000000020b0433000000000002004b0000000003000039000000010300c039000000000032004b0000049d0000c13d000000000002004b000006450000c13d0000023d02000041000002c60000013d0000021701000041000000000101041a0000000002000411000000000012004b000005820000c13d000000060000006b000005aa0000c13d000000400100043d0000024702000041000002c60000013d0000024f01000041000000000010043f00000219010000410000079c000104300000001f0530018f0000023306300198000000400200043d0000000004620019000005910000613d000000000701034f0000000008020019000000007907043c0000000008980436000000000048004b0000058d0000c13d000000000005004b0000059e0000613d000000000161034f0000000305500210000000000604043300000000065601cf000000000656022f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f00000000001404350000006001300210000001e80020009c000001e8020080410000004002200210000000000112019f0000079c000104300000023c01000041000000000010043f0000004101000039000000040010043f00000232010000410000079c000104300000000001000031000000000010043f0000020001000041000000010010043f0000000001000414000001e80010009c000001e801008041000000c00110021000000244011001c70000000602000029079a07900000040f0000006003100270000001e803300197000000200030008c000000200400003900000000040340190000001f0540018f000000200640019000000001046001bf000005c40000613d0000000107000039000000000801034f000000008908043c0000000007970436000000000047004b000005c00000c13d000000010220018f000000000005004b000005d20000613d000000000161034f0000000305500210000000000604043300000000065601cf000000000656022f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f0000000000140435000000000003001f0000000001020433000002430010009c000006410000c13d0000000001000414000001e80010009c000001e801008041000000c00110021000000227011001c70000800d02000039000000020300003900000246040000410000000605000029079a078b0000040f00000001002001900000049d0000613d00000243010000410000000602000029000000000021041b000000050000006b000003330000613d000000050300002900000253023001980000001f0330018f000000400100043d000300000001001d0000000001210019000000040400002900000020044000390000000104400367000005f70000613d000000000504034f0000000306000029000000005705043c0000000006760436000000000016004b000005f30000c13d000000000003004b000006040000613d000000000224034f0000000303300210000000000401043300000000043401cf000000000434022f000000000202043b0000010003300089000000000232022f00000000023201cf000000000242019f000000000021043500000222010000410000000000100443000000000100041200000004001004430000000001000414000001e80010009c000001e801008041000000c00110021000000223011001c70000800202000039079a07900000040f0000000100200190000006400000613d0000000501000029000001e80010009c000001e80100804100000060011002100000000002000414000001e80020009c000001e802008041000000c002200210000000000112019f0000000302000029000001e80020009c000001e802008041000500400020021800000005011001af0000000602000029079a07950000040f0000006003100270000001e80030019d0000000100200190000003330000c13d000001e8023001970000001f0420018f000002330520019800000003080000290000000003580019000006300000613d000000000601034f000000006706043c0000000008780436000000000038004b0000062c0000c13d000000000004004b0000063d0000613d000000000151034f0000000304400210000000000503043300000000054501cf000000000545022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000130435000000600120021000000005011001af0000079c00010430000000000001042f0000024501000041000000010010043f00000244010000410000079c000104300000000601000029000000000010043f0000021e01000041000000200010043f0000000001000414000001e80010009c000001e801008041000000c0011002100000021f011001c70000801002000039079a07900000040f00000001002001900000049d0000613d000000000101043b000000000101041a000100000001001d0000000601000029000000000010043f0000021e01000041000000200010043f0000000001000414000001e80010009c000001e801008041000000c0011002100000021f011001c70000801002000039079a07900000040f00000001002001900000049d0000613d00000001020000290000002002200270000001e802200197000000000101043b000100000002001d000000000020043f0000000101100039000000200010043f0000000001000414000001e80010009c000001e801008041000000c0011002100000021f011001c70000801002000039079a07900000040f00000001002001900000049d0000613d000000000101043b000000000201041a000002340220019700000005022001af000000000021041b0000000101000029000001e80010009c000006810000c13d0000023c01000041000000000010043f0000001101000039000000040010043f00000232010000410000079c000104300000000601000029000000000010043f0000021e01000041000000200010043f0000000001000414000001e80010009c000001e801008041000000c0011002100000021f011001c70000801002000039079a07900000040f00000001002001900000049d0000613d00000001020000290000002002200210000002350220009a0000023602200197000000000101043b000000000301041a0000023703300197000000000223019f000000000021041b0000000601000029000000000010043f0000021e01000041000000200010043f0000000001000414000001e80010009c000001e801008041000000c0011002100000021f011001c70000801002000039079a07900000040f00000001002001900000049d0000613d000000000101043b0000000102000029000000000020043f0000000201100039000000200010043f0000000001000414000001e80010009c000001e801008041000000c0011002100000021f011001c70000801002000039079a07900000040f00000001002001900000049d0000613d000000000101043b0000000302000029000000000021041b0000000601000029000000000010043f0000021e01000041000000200010043f0000000001000414000001e80010009c000001e801008041000000c0011002100000021f011001c70000801002000039079a07900000040f00000001002001900000049d0000613d000000000101043b0000000102000029000000000020043f0000000301100039000000200010043f0000000001000414000001e80010009c000001e801008041000000c0011002100000021f011001c70000801002000039079a07900000040f00000001002001900000049d0000613d000000000101043b0000000203000029000000000031041b000000400100043d0000008002100039000000000032043500000060021000390000000303000029000000000032043500000040021000390000000103000029000000000032043500000020021000390000000503000029000000000032043500000006020000290000000000210435000001e80010009c000001e80100804100000040011002100000000002000414000001e80020009c000001e802008041000000c002200210000000000112019f00000238011001c70000800d0200003900000001030000390000023904000041079a078b0000040f00000001002001900000049d0000613d000000040000006b0000071a0000613d0000000601000029000000000010043f0000021e01000041000000200010043f0000000001000414000001e80010009c000001e801008041000000c0011002100000021f011001c70000801002000039079a07900000040f00000001002001900000049d0000613d000000000101043b000000000201041a0000023a0220019700000001040000290000004003400210000000000232019f000000000021041b000000400100043d0000002002100039000000000042043500000006020000290000000000210435000001e80010009c000001e80100804100000040011002100000000002000414000001e80020009c000001e802008041000000c002200210000000000112019f0000021f011001c70000800d0200003900000001030000390000023b04000041079a078b0000040f00000001002001900000049d0000613d000000400100043d0000000102000029000002eb0000013d0000022e020000410000000c0020043f000000000010043f0000000001000414000001e80010009c000001e801008041000000c0011002100000021a011001c70000801002000039079a07900000040f00000001002001900000072c0000613d000000000101043b000000000101041a000000000001042d00000000010000190000079c000104300000021701000041000000000101041a0000000002000411000000000012004b000007340000c13d000000000001042d0000024f01000041000000000010043f00000219010000410000079c0001043000010000000000020000021702000041000000000502041a00000000020004140000021406100197000001e80020009c000001e802008041000000c00120021000000227011001c70000800d0200003900000003030000390000022804000041000100000006001d079a078b0000040f00000001002001900000074f0000613d000000010000006b0000000001000019000002260100604100000001011001af0000021702000041000000000012041b000000000001042d00000000010000190000079c000104300001000000000002000100000002001d0000022e020000410000000c0020043f000000000010043f0000000001000414000001e80010009c000001e801008041000000c0011002100000021a011001c70000801002000039079a07900000040f0000000100200190000007730000613d000000010200008a000000010220014f000000000101043b000000000301041a000000000623016f000000000061041b0000000c0100043d00000000020004140000006005100270000001e80020009c000001e802008041000000c00120021000000227011001c70000800d0200003900000003030000390000024d04000041079a078b0000040f0000000100200190000007730000613d000000000001042d00000000010000190000079c00010430000000000001042f000001e80010009c000001e8010080410000004001100210000001e80020009c000001e8020080410000006002200210000000000112019f0000000002000414000001e80020009c000001e802008041000000c002200210000000000112019f00000227011001c70000801002000039079a07900000040f0000000100200190000007890000613d000000000101043b000000000001042d00000000010000190000079c000104300000078e002104210000000102000039000000000001042d0000000002000019000000000001042d00000793002104230000000102000039000000000001042d0000000002000019000000000001042d00000798002104250000000102000039000000000001042d0000000002000019000000000001042d0000079a000004320000079b0001042e0000079c0001043000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf601132000000000000000000000000000000000000000000000001fffffffffffffffe000000000000000000000000000000000000000000000000ffffffffffffffff0200000000000000000000000000000000000020000000200000000000000000c7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d200000002000000000000000000000000000000800000010000000000000000000000000000000000000000000000000000000000000000000000000052d1902c00000000000000000000000000000000000000000000000000000000a22882aa00000000000000000000000000000000000000000000000000000000ec87621b00000000000000000000000000000000000000000000000000000000f2fde38a00000000000000000000000000000000000000000000000000000000f2fde38b00000000000000000000000000000000000000000000000000000000fee81cf400000000000000000000000000000000000000000000000000000000ec87621c00000000000000000000000000000000000000000000000000000000f04e283e00000000000000000000000000000000000000000000000000000000a22882ab00000000000000000000000000000000000000000000000000000000c4d66de800000000000000000000000000000000000000000000000000000000d8da022b000000000000000000000000000000000000000000000000000000006a0ddc79000000000000000000000000000000000000000000000000000000007d000591000000000000000000000000000000000000000000000000000000007d000592000000000000000000000000000000000000000000000000000000008da5cb5b000000000000000000000000000000000000000000000000000000006a0ddc7a00000000000000000000000000000000000000000000000000000000715018a60000000000000000000000000000000000000000000000000000000052d1902d0000000000000000000000000000000000000000000000000000000054d1f13d00000000000000000000000000000000000000000000000000000000608411dc0000000000000000000000000000000000000000000000000000000025692961000000000000000000000000000000000000000000000000000000004b196c35000000000000000000000000000000000000000000000000000000004f1ef285000000000000000000000000000000000000000000000000000000004f1ef28600000000000000000000000000000000000000000000000000000000514e62fc000000000000000000000000000000000000000000000000000000004b196c36000000000000000000000000000000000000000000000000000000004df2715c0000000000000000000000000000000000000000000000000000000025692962000000000000000000000000000000000000000000000000000000002de94807000000000000000000000000000000000000000000000000000000004a4ee7b1000000000000000000000000000000000000000000000000000000001c10893e000000000000000000000000000000000000000000000000000000001c10893f000000000000000000000000000000000000000000000000000000001cd64df40000000000000000000000000000000000000000000000000000000021299a9d000000000000000000000000000000000000000000000000000000001224178e00000000000000000000000000000000000000000000000000000000183a4f6e000000000000000000000000000000000000000000000000000000001917461b000000000000000000000000ffffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000389a75e10000000000000000000000000000000000000020000000800000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927000000000000000000000000000000000000000000000000000000007448fbae00000000000000000000000000000000000000040000001c000000000000000002000000000000000000000000000000000000200000000c0000000000000000796b89b91644bc98cd93958e4c9038275d622183e25ac5af08cc6b5d955391320200000200000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000006f5e8818fd008fcd1deb21680f735a35fafc51691c5fb3daec313cfea4dc62938bee9000020000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000068155f9a1806aa1896bbf26568e884a7374b41e002500962caba6a15023a8d90e8508b83020000020000000000000000000000000000002400000000000000000000000000000000000000000000000000000000000000000000000000000000f92ee8a9000000000000000000000000000000000000000000000000000000000dc149f0800000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000008be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e005dca32b875e2fff92cceaa0f3b2d2066cac0c050bdfbcf9d761069d0eb122c0ffffffffffffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000000000000000000180ac58cd241afc64c1f6ed41103830e539be6b862210a249bbde5703287eeb43bd2994e300000000000000000000000000000000000000000000000000000001d9b67a26000000000000000000000000000000000000000000000000000000008b78c6d8020000000000000000000000000000000000006000000000000000000000000053bb5bd6d66ea1be1233b474098525597362059e95776d1465c5aea564530b4d01ffc9a700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffe0ffffffffffffffffffffffff0000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000ffffffff00000000ffffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffff02000000000000000000000000000000000000a0000000000000000000000000d481ebf033b61c50d993fe3d1fe65fa96bf818a0ea1b416b61be612c1c6b92ecffffffffffffffffffffffffffffffffffffffff00000000ffffffffffffffff84e49eeb45577717af0d6484bb55c8e0a6c74df5ef53de564c57fc2b485c06be4e487b7100000000000000000000000000000000000000000000000000000000d3d569780000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000009a9d6f4f00000000000000000000000000000000000000000000000000000000fa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92310ab089e4439a4c15d089f94afb7896ff553aecb10793d0ab882de59d99a32e0200000200000000000000000000000000000044000000000000000000000000360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc00000000000000000000000000000000000000040000001d00000000000000000000000000000000000000000000000000000000000000000000000055299b49bc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3bbbb5169c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009f03a02600000000000000000000000000000000000000000000000000000000161378fcfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd5d00dbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d098acec49518e661f4c38d4ee8007294e1bed0b344f5abec275bf6a318692ad5715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe26364123fbcbe9ed81a800eab4b3e02353e68f129c98c4c3cb15f45b92633219710000000000000000000000000000000000000000000000000000000082b429000000000000000000000000000000000000000000ffffffff000000000000000068155f9a00000000000000000000000000000000000000000000000000000000fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0dec0aa317a7d106a7569df9d6a86c4f300e36e3b72d997a127145b34cb9ee0a0
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 35 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
[ 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.