ERC-721
Overview
Max Total Supply
0 MOON
Holders
28
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
43 MOONLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Source Code Verified (Exact Match)
Contract Name:
Aside0x02
Compiler Version
v0.8.25+commit.b61c2a91
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.25; import {AsideBase} from "./AsideBase.sol"; contract Aside0x02 is AsideBase { error DisabledFunction(); /** * @notice Creates a new Aside0x02 contract. * @param baseURI_ The base URI of the token. * @param admin_ The address to set as the DEFAULT_ADMIN of this contract. * @param minter_ The address to set as the MINTER of this contract. * @param verse_ The address of Verse's custodial wallet. * @param timelock_ The duration of the timelock upon which all tokens are automatically unlocked. */ constructor(string memory baseURI_, address admin_, address minter_, address verse_, uint256 timelock_) AsideBase("Ray Marching the Moon: Full & New", "MOON", baseURI_, 130, admin_, minter_, verse_, timelock_) { _aMint(0x4D3DfD28AA35869D52C5cE077Aa36E3944b48d1C, 120); _aMint(0x4CD7d2004a323133330D5A62aD7C734fAfD35236, 121); _aMint(0x3c7e48216C74D7818aB1Fd226e56C60C4D659bA6, 122); _aMint(0x3c7e48216C74D7818aB1Fd226e56C60C4D659bA6, 123); _aMint(0x3c7e48216C74D7818aB1Fd226e56C60C4D659bA6, 124); _aMint(0x4D3DfD28AA35869D52C5cE077Aa36E3944b48d1C, 125); _aMint(0x4CD7d2004a323133330D5A62aD7C734fAfD35236, 126); _aMint(0x3c7e48216C74D7818aB1Fd226e56C60C4D659bA6, 127); _aMint(0x3c7e48216C74D7818aB1Fd226e56C60C4D659bA6, 128); _aMint(0x3c7e48216C74D7818aB1Fd226e56C60C4D659bA6, 129); } /** * @notice This function is disabled on this drop. Each token is automatically unlocked once the moon's phase it is tied to is reached. */ function unlock(uint256[] calldata) external pure override { revert DisabledFunction(); } // #region getter functions /** * @notice Returns the timestamp of the moon phase associated to token `tokenId`. * @dev `tokenId` must exist. * @return date The timestamp of the moon phase associated to token `tokenId`. */ function moonOf(uint256 tokenId) public view returns (uint256) { _requireOwned(tokenId); return _moonOf(tokenId); } // #endregion // #region internal and private functions function _isUnlocked(uint256 tokenId) internal view override returns (bool) { return block.timestamp >= _moonOf(tokenId) || _areAllUnlocked(); } function _moonOf(uint256 tokenId) private pure returns (uint256) { if (tokenId < 5) return 1_720_137_600; if (tokenId < 10) return 1_721_520_000; if (tokenId < 15) return 1_722_729_600; if (tokenId < 20) return 1_724_025_600; if (tokenId < 25) return 1_725_235_200; if (tokenId < 30) return 1_726_531_200; if (tokenId < 35) return 1_727_827_200; if (tokenId < 40) return 1_729_123_200; if (tokenId < 45) return 1_730_419_200; if (tokenId < 50) return 1_731_628_800; if (tokenId < 55) return 1_732_924_800; if (tokenId < 60) return 1_734_220_800; if (tokenId < 65) return 1_735_516_800; if (tokenId < 70) return 1_736_726_400; if (tokenId < 75) return 1_738_108_800; if (tokenId < 80) return 1_739_318_400; if (tokenId < 85) return 1_740_614_400; if (tokenId < 90) return 1_741_910_400; if (tokenId < 95) return 1_743_206_400; if (tokenId < 100) return 1_744_416_000; if (tokenId < 105) return 1_745_712_000; if (tokenId < 110) return 1_747_008_000; if (tokenId < 115) return 1_748_217_600; if (tokenId < 120) return 1_749_600_000; if (tokenId == 120 || tokenId == 121) return 1_736_726_400; if (tokenId == 125 || tokenId == 126) return 1_725_235_200; return 0; } // #endregion }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.25; import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import {ERC721Burnable} from "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol"; import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol"; abstract contract AsideBase is ERC721, ERC721Burnable, AccessControl { error TokenLocked(uint256 tokenId); error TokenAlreadyUnlocked(uint256 tokenId); error InvalidTokenId(uint256 tokenId); error InvalidUnlock(uint256 tokenId); error InvalidParametersMatch(); event Unlock(uint256 indexed tokenId); event EmergencyUnlock(); bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); uint256 public immutable NB_OF_TOKENS; address public immutable VERSE; uint256 public immutable TIMELOCK_DEADLINE; string public BASE_URI; // strings cannot be immutable bool private _eUnlocked = false; // emergency unlock mapping(uint256 => bool) private _unlocks; // tokenId => isUnlocked /** * @notice Creates a new AsideBase contract. * @param name_ The name of the token. * @param symbol_ The symbol of the token. * @param baseURI_ The base URI of the token. * @param nbOfTokens_ The number of tokens allowed to be minted. * @param admin_ The address to set as the DEFAULT_ADMIN of this contract. * @param minter_ The address to set as the MINTER of this contract. * @param verse_ The address of Verse's custodial wallet. * @param timelock_ The duration of the timelock upon which all tokens are automatically unlocked. */ constructor( string memory name_, string memory symbol_, string memory baseURI_, uint256 nbOfTokens_, address admin_, address minter_, address verse_, uint256 timelock_ ) ERC721(name_, symbol_) { _grantRole(DEFAULT_ADMIN_ROLE, admin_); _grantRole(MINTER_ROLE, minter_); BASE_URI = baseURI_; NB_OF_TOKENS = nbOfTokens_; VERSE = verse_; TIMELOCK_DEADLINE = block.timestamp + timelock_; } /** * @notice Mints `tokenId`, transfers it to `to` and checks for `to` acceptance. * @param to The address to receive the token to be minted. * @param tokenId The id of the token to be minted. */ function mint(address to, uint256 tokenId) external onlyRole(MINTER_ROLE) { _aMint(to, tokenId); } /** * @notice Mints `tokenIds`, transfers them to `to` and checks for `to` acceptance. * @param to The addresses to receive the tokens to be minted. * @param tokenIds The ids of the tokens to be minted. */ function mintBatch(address[] memory to, uint256[] memory tokenIds) external onlyRole(MINTER_ROLE) { uint256 length = to.length; if (length != tokenIds.length) revert InvalidParametersMatch(); for (uint256 i = 0; i < length; i++) { _aMint(to[i], tokenIds[i]); } } /** * @notice Unlocks tokens `tokenIds`. * @dev Each tokenId in `tokenIds` must exist. * @dev Each tokenId in `tokenIds` must be locked. * @param tokenIds The ids of the tokens to unlock. */ function unlock(uint256[] calldata tokenIds) external virtual { _beforeUnlock(tokenIds); uint256 length = tokenIds.length; for (uint256 i = 0; i < length; i++) { _unlock(tokenIds[i]); } } // #region admin-only functions /** * @notice Unlocks all the tokens at once. * @dev This function is only to be used in case of an emergency. */ function eUnlock() external onlyRole(DEFAULT_ADMIN_ROLE) { _eUnlocked = true; emit EmergencyUnlock(); } // #endregion // #region getter functions /** * @notice Checks whether all the tokens have been unlocked at once in an emergency or not. * @return A boolean indicating whether all the tokens have been unlocked at once in an emergency or * not. */ function isEUnlocked() public view returns (bool) { return _eUnlocked; } /** * @notice Checks whether all the tokens are unlocked, either because of an emergency unlock or * because the timelock deadline has been reached. * @return A boolean indicating whether all the tokens are unlocked or not. */ function areAllUnlocked() public view returns (bool) { return _areAllUnlocked(); } /** * @notice Checks whether token `tokenId` is unlocked or not. * @dev `tokenId` must exist. * @param tokenId The id of the token to check whether it is unlocked or not. * @return A boolean indicating whether token `tokenId` is unlocked or not. */ function isUnlocked(uint256 tokenId) public view returns (bool) { _requireOwned(tokenId); return _isUnlocked(tokenId); } // #endregion // #region internal functions function _baseURI() internal view override returns (string memory) { return BASE_URI; } function _areAllUnlocked() internal view returns (bool) { return block.timestamp >= TIMELOCK_DEADLINE || _eUnlocked; } function _isUnlocked(uint256 tokenId) internal view virtual returns (bool) { return _unlocks[tokenId] || _areAllUnlocked(); } function _requireLocked(uint256 tokenId) internal view { _requireOwned(tokenId); if (_isUnlocked(tokenId)) revert TokenAlreadyUnlocked(tokenId); } function _aMint(address to, uint256 tokenId) internal { _safeMint(to, tokenId); _afterMint(to, tokenId); } function _unlock(uint256 tokenId) internal { _unlocks[tokenId] = true; emit Unlock(tokenId); } // #endregion // #region internal hook functions function _update(address to, uint256 tokenId, address auth) internal override(ERC721) returns (address) { address owner = _ownerOf(tokenId); if (!_isUnlocked(tokenId) && owner != address(0) && owner != VERSE) revert TokenLocked(tokenId); if (to == address(0)) _unlocks[tokenId] = false; return super._update(to, tokenId, auth); } function _afterMint(address, uint256 tokenId) internal virtual { if (tokenId >= NB_OF_TOKENS) revert InvalidTokenId(tokenId); } function _beforeUnlock(uint256[] memory tokenIds) internal virtual { uint256 length = tokenIds.length; for (uint256 i = 0; i < length; i++) { _requireLocked(tokenIds[i]); } } // #endregion // #region required overrides function supportsInterface(bytes4 interfaceId) public view override(ERC721, AccessControl) returns (bool) { return super.supportsInterface(interfaceId); } // #endregion }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/ERC721.sol) pragma solidity ^0.8.20; import {IERC721} from "./IERC721.sol"; import {IERC721Receiver} from "./IERC721Receiver.sol"; import {IERC721Metadata} from "./extensions/IERC721Metadata.sol"; import {Context} from "../../utils/Context.sol"; import {Strings} from "../../utils/Strings.sol"; import {IERC165, ERC165} from "../../utils/introspection/ERC165.sol"; import {IERC721Errors} from "../../interfaces/draft-IERC6093.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC-721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ abstract contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Errors { using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; mapping(uint256 tokenId => address) private _owners; mapping(address owner => uint256) private _balances; mapping(uint256 tokenId => address) private _tokenApprovals; mapping(address owner => mapping(address operator => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual returns (uint256) { if (owner == address(0)) { revert ERC721InvalidOwner(address(0)); } return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual returns (address) { return _requireOwned(tokenId); } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual returns (string memory) { _requireOwned(tokenId); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string.concat(baseURI, tokenId.toString()) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual { _approve(to, tokenId, _msgSender()); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual returns (address) { _requireOwned(tokenId); return _getApproved(tokenId); } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom(address from, address to, uint256 tokenId) public virtual { if (to == address(0)) { revert ERC721InvalidReceiver(address(0)); } // Setting an "auth" arguments enables the `_isAuthorized` check which verifies that the token exists // (from != 0). Therefore, it is not needed to verify that the return value is not 0 here. address previousOwner = _update(to, tokenId, _msgSender()); if (previousOwner != from) { revert ERC721IncorrectOwner(from, tokenId, previousOwner); } } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom(address from, address to, uint256 tokenId) public { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public virtual { transferFrom(from, to, tokenId); _checkOnERC721Received(from, to, tokenId, data); } /** * @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist * * IMPORTANT: Any overrides to this function that add ownership of tokens not tracked by the * core ERC-721 logic MUST be matched with the use of {_increaseBalance} to keep balances * consistent with ownership. The invariant to preserve is that for any address `a` the value returned by * `balanceOf(a)` must be equal to the number of tokens such that `_ownerOf(tokenId)` is `a`. */ function _ownerOf(uint256 tokenId) internal view virtual returns (address) { return _owners[tokenId]; } /** * @dev Returns the approved address for `tokenId`. Returns 0 if `tokenId` is not minted. */ function _getApproved(uint256 tokenId) internal view virtual returns (address) { return _tokenApprovals[tokenId]; } /** * @dev Returns whether `spender` is allowed to manage `owner`'s tokens, or `tokenId` in * particular (ignoring whether it is owned by `owner`). * * WARNING: This function assumes that `owner` is the actual owner of `tokenId` and does not verify this * assumption. */ function _isAuthorized(address owner, address spender, uint256 tokenId) internal view virtual returns (bool) { return spender != address(0) && (owner == spender || isApprovedForAll(owner, spender) || _getApproved(tokenId) == spender); } /** * @dev Checks if `spender` can operate on `tokenId`, assuming the provided `owner` is the actual owner. * Reverts if `spender` does not have approval from the provided `owner` for the given token or for all its assets * the `spender` for the specific `tokenId`. * * WARNING: This function assumes that `owner` is the actual owner of `tokenId` and does not verify this * assumption. */ function _checkAuthorized(address owner, address spender, uint256 tokenId) internal view virtual { if (!_isAuthorized(owner, spender, tokenId)) { if (owner == address(0)) { revert ERC721NonexistentToken(tokenId); } else { revert ERC721InsufficientApproval(spender, tokenId); } } } /** * @dev Unsafe write access to the balances, used by extensions that "mint" tokens using an {ownerOf} override. * * NOTE: the value is limited to type(uint128).max. This protect against _balance overflow. It is unrealistic that * a uint256 would ever overflow from increments when these increments are bounded to uint128 values. * * WARNING: Increasing an account's balance using this function tends to be paired with an override of the * {_ownerOf} function to resolve the ownership of the corresponding tokens so that balances and ownership * remain consistent with one another. */ function _increaseBalance(address account, uint128 value) internal virtual { unchecked { _balances[account] += value; } } /** * @dev Transfers `tokenId` from its current owner to `to`, or alternatively mints (or burns) if the current owner * (or `to`) is the zero address. Returns the owner of the `tokenId` before the update. * * The `auth` argument is optional. If the value passed is non 0, then this function will check that * `auth` is either the owner of the token, or approved to operate on the token (by the owner). * * Emits a {Transfer} event. * * NOTE: If overriding this function in a way that tracks balances, see also {_increaseBalance}. */ function _update(address to, uint256 tokenId, address auth) internal virtual returns (address) { address from = _ownerOf(tokenId); // Perform (optional) operator check if (auth != address(0)) { _checkAuthorized(from, auth, tokenId); } // Execute the update if (from != address(0)) { // Clear approval. No need to re-authorize or emit the Approval event _approve(address(0), tokenId, address(0), false); unchecked { _balances[from] -= 1; } } if (to != address(0)) { unchecked { _balances[to] += 1; } } _owners[tokenId] = to; emit Transfer(from, to, tokenId); return from; } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal { if (to == address(0)) { revert ERC721InvalidReceiver(address(0)); } address previousOwner = _update(to, tokenId, address(0)); if (previousOwner != address(0)) { revert ERC721InvalidSender(address(0)); } } /** * @dev Mints `tokenId`, transfers it to `to` and checks for `to` acceptance. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint(address to, uint256 tokenId, bytes memory data) internal virtual { _mint(to, tokenId); _checkOnERC721Received(address(0), to, tokenId, data); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * This is an internal function that does not check if the sender is authorized to operate on the token. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal { address previousOwner = _update(address(0), tokenId, address(0)); if (previousOwner == address(0)) { revert ERC721NonexistentToken(tokenId); } } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer(address from, address to, uint256 tokenId) internal { if (to == address(0)) { revert ERC721InvalidReceiver(address(0)); } address previousOwner = _update(to, tokenId, address(0)); if (previousOwner == address(0)) { revert ERC721NonexistentToken(tokenId); } else if (previousOwner != from) { revert ERC721IncorrectOwner(from, tokenId, previousOwner); } } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking that contract recipients * are aware of the ERC-721 standard to prevent tokens from being forever locked. * * `data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is like {safeTransferFrom} in the sense that it invokes * {IERC721Receiver-onERC721Received} on the receiver, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `tokenId` token must exist and be owned by `from`. * - `to` cannot be the zero address. * - `from` cannot be the zero address. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer(address from, address to, uint256 tokenId) internal { _safeTransfer(from, to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeTransfer-address-address-uint256-}[`_safeTransfer`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeTransfer(address from, address to, uint256 tokenId, bytes memory data) internal virtual { _transfer(from, to, tokenId); _checkOnERC721Received(from, to, tokenId, data); } /** * @dev Approve `to` to operate on `tokenId` * * The `auth` argument is optional. If the value passed is non 0, then this function will check that `auth` is * either the owner of the token, or approved to operate on all tokens held by this owner. * * Emits an {Approval} event. * * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument. */ function _approve(address to, uint256 tokenId, address auth) internal { _approve(to, tokenId, auth, true); } /** * @dev Variant of `_approve` with an optional flag to enable or disable the {Approval} event. The event is not * emitted in the context of transfers. */ function _approve(address to, uint256 tokenId, address auth, bool emitEvent) internal virtual { // Avoid reading the owner unless necessary if (emitEvent || auth != address(0)) { address owner = _requireOwned(tokenId); // We do not use _isAuthorized because single-token approvals should not be able to call approve if (auth != address(0) && owner != auth && !isApprovedForAll(owner, auth)) { revert ERC721InvalidApprover(auth); } if (emitEvent) { emit Approval(owner, to, tokenId); } } _tokenApprovals[tokenId] = to; } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Requirements: * - operator can't be the address zero. * * Emits an {ApprovalForAll} event. */ function _setApprovalForAll(address owner, address operator, bool approved) internal virtual { if (operator == address(0)) { revert ERC721InvalidOperator(operator); } _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Reverts if the `tokenId` doesn't have a current owner (it hasn't been minted, or it has been burned). * Returns the owner. * * Overrides to ownership logic should be done to {_ownerOf}. */ function _requireOwned(uint256 tokenId) internal view returns (address) { address owner = _ownerOf(tokenId); if (owner == address(0)) { revert ERC721NonexistentToken(tokenId); } return owner; } /** * @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target address. This will revert if the * recipient doesn't accept the token transfer. The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param data bytes optional data to send along with the call */ function _checkOnERC721Received(address from, address to, uint256 tokenId, bytes memory data) private { if (to.code.length > 0) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) { if (retval != IERC721Receiver.onERC721Received.selector) { revert ERC721InvalidReceiver(to); } } catch (bytes memory reason) { if (reason.length == 0) { revert ERC721InvalidReceiver(to); } else { /// @solidity memory-safe-assembly assembly { revert(add(32, reason), mload(reason)) } } } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/extensions/ERC721Burnable.sol) pragma solidity ^0.8.20; import {ERC721} from "../ERC721.sol"; import {Context} from "../../../utils/Context.sol"; /** * @title ERC-721 Burnable Token * @dev ERC-721 Token that can be burned (destroyed). */ abstract contract ERC721Burnable is Context, ERC721 { /** * @dev Burns `tokenId`. See {ERC721-_burn}. * * Requirements: * * - The caller must own `tokenId` or be an approved operator. */ function burn(uint256 tokenId) public virtual { // Setting an "auth" arguments enables the `_isAuthorized` check which verifies that the token exists // (from != 0). Therefore, it is not needed to verify that the return value is not 0 here. _update(address(0), tokenId, _msgSender()); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/AccessControl.sol) pragma solidity ^0.8.20; import {IAccessControl} from "./IAccessControl.sol"; import {Context} from "../utils/Context.sol"; import {ERC165} from "../utils/introspection/ERC165.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ```solidity * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ```solidity * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules} * to enforce additional security measures for this role. */ abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address account => bool) hasRole; bytes32 adminRole; } mapping(bytes32 role => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with an {AccessControlUnauthorizedAccount} error including the required role. */ modifier onlyRole(bytes32 role) { _checkRole(role); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view virtual returns (bool) { return _roles[role].hasRole[account]; } /** * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `_msgSender()` * is missing `role`. Overriding this function changes the behavior of the {onlyRole} modifier. */ function _checkRole(bytes32 role) internal view virtual { _checkRole(role, _msgSender()); } /** * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `account` * is missing `role`. */ function _checkRole(bytes32 role, address account) internal view virtual { if (!hasRole(role, account)) { revert AccessControlUnauthorizedAccount(account, role); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view virtual returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleGranted} event. */ function grantRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleRevoked} event. */ function revokeRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `callerConfirmation`. * * May emit a {RoleRevoked} event. */ function renounceRole(bytes32 role, address callerConfirmation) public virtual { if (callerConfirmation != _msgSender()) { revert AccessControlBadConfirmation(); } _revokeRole(role, callerConfirmation); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Attempts to grant `role` to `account` and returns a boolean indicating if `role` was granted. * * Internal function without access restriction. * * May emit a {RoleGranted} event. */ function _grantRole(bytes32 role, address account) internal virtual returns (bool) { if (!hasRole(role, account)) { _roles[role].hasRole[account] = true; emit RoleGranted(role, account, _msgSender()); return true; } else { return false; } } /** * @dev Attempts to revoke `role` to `account` and returns a boolean indicating if `role` was revoked. * * Internal function without access restriction. * * May emit a {RoleRevoked} event. */ function _revokeRole(bytes32 role, address account) internal virtual returns (bool) { if (hasRole(role, account)) { _roles[role].hasRole[account] = false; emit RoleRevoked(role, account, _msgSender()); return true; } else { return false; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.20; import {IERC165} from "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC-721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon * a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC-721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or * {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon * a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC-721 * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must * understand this adds an external call which potentially creates a reentrancy vulnerability. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 tokenId) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the address zero. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.20; /** * @title ERC-721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC-721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be * reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.20; import {IERC721} from "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol) pragma solidity ^0.8.20; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol) pragma solidity ^0.8.20; import {Math} from "./math/Math.sol"; import {SignedMath} from "./math/SignedMath.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant HEX_DIGITS = "0123456789abcdef"; uint8 private constant ADDRESS_LENGTH = 20; /** * @dev The `value` string doesn't fit in the specified `length`. */ error StringsInsufficientHexLength(uint256 value, uint256 length); /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), HEX_DIGITS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `int256` to its ASCII `string` decimal representation. */ function toStringSigned(int256 value) internal pure returns (string memory) { return string.concat(value < 0 ? "-" : "", toString(SignedMath.abs(value))); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { uint256 localValue = value; bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = HEX_DIGITS[localValue & 0xf]; localValue >>= 4; } if (localValue != 0) { revert StringsInsufficientHexLength(value, length); } return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal * representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), ADDRESS_LENGTH); } /** * @dev Returns true if the two strings are equal. */ function equal(string memory a, string memory b) internal pure returns (bool) { return bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol) pragma solidity ^0.8.20; import {IERC165} from "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC-165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol) pragma solidity ^0.8.20; /** * @dev Standard ERC-20 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-20 tokens. */ interface IERC20Errors { /** * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. * @param balance Current balance for the interacting account. * @param needed Minimum amount required to perform a transfer. */ error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC20InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC20InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers. * @param spender Address that may be allowed to operate on tokens without being their owner. * @param allowance Amount of tokens a `spender` is allowed to operate with. * @param needed Minimum amount required to perform a transfer. */ error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC20InvalidApprover(address approver); /** * @dev Indicates a failure with the `spender` to be approved. Used in approvals. * @param spender Address that may be allowed to operate on tokens without being their owner. */ error ERC20InvalidSpender(address spender); } /** * @dev Standard ERC-721 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-721 tokens. */ interface IERC721Errors { /** * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in ERC-20. * Used in balance queries. * @param owner Address of the current owner of a token. */ error ERC721InvalidOwner(address owner); /** * @dev Indicates a `tokenId` whose `owner` is the zero address. * @param tokenId Identifier number of a token. */ error ERC721NonexistentToken(uint256 tokenId); /** * @dev Indicates an error related to the ownership over a particular token. Used in transfers. * @param sender Address whose tokens are being transferred. * @param tokenId Identifier number of a token. * @param owner Address of the current owner of a token. */ error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC721InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC721InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `operator`’s approval. Used in transfers. * @param operator Address that may be allowed to operate on tokens without being their owner. * @param tokenId Identifier number of a token. */ error ERC721InsufficientApproval(address operator, uint256 tokenId); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC721InvalidApprover(address approver); /** * @dev Indicates a failure with the `operator` to be approved. Used in approvals. * @param operator Address that may be allowed to operate on tokens without being their owner. */ error ERC721InvalidOperator(address operator); } /** * @dev Standard ERC-1155 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-1155 tokens. */ interface IERC1155Errors { /** * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. * @param balance Current balance for the interacting account. * @param needed Minimum amount required to perform a transfer. * @param tokenId Identifier number of a token. */ error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC1155InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC1155InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `operator`’s approval. Used in transfers. * @param operator Address that may be allowed to operate on tokens without being their owner. * @param owner Address of the current owner of a token. */ error ERC1155MissingApprovalForAll(address operator, address owner); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC1155InvalidApprover(address approver); /** * @dev Indicates a failure with the `operator` to be approved. Used in approvals. * @param operator Address that may be allowed to operate on tokens without being their owner. */ error ERC1155InvalidOperator(address operator); /** * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation. * Used in batch transfers. * @param idsLength Length of the array of token identifiers * @param valuesLength Length of the array of token amounts */ error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/IAccessControl.sol) pragma solidity ^0.8.20; /** * @dev External interface of AccessControl declared to support ERC-165 detection. */ interface IAccessControl { /** * @dev The `account` is missing a role. */ error AccessControlUnauthorizedAccount(address account, bytes32 neededRole); /** * @dev The caller of a function is not the expected one. * * NOTE: Don't confuse with {AccessControlUnauthorizedAccount}. */ error AccessControlBadConfirmation(); /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `callerConfirmation`. */ function renounceRole(bytes32 role, address callerConfirmation) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC-165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[ERC]. * * 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[ERC 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 // OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol) pragma solidity ^0.8.20; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { /** * @dev Muldiv operation overflow. */ error MathOverflowedMulDiv(); enum Rounding { Floor, // Toward negative infinity Ceil, // Toward positive infinity Trunc, // Toward zero Expand // Away from zero } /** * @dev Returns the addition of two unsigned integers, with an success flag (no overflow). */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the subtraction of two unsigned integers, with an success flag (no overflow). */ function trySub(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an success flag (no overflow). */ function tryMul(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a success flag (no division by zero). */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a success flag (no division by zero). */ function tryMod(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds towards infinity instead * of rounding towards zero. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { if (b == 0) { // Guarantee the same behavior as in a regular Solidity division. return a / b; } // The following calculation ensures accurate ceiling division without overflow. // Since a is non-zero, (a - 1) / b will not overflow. // The largest possible result occurs when (a - 1) / b is type(uint256).max, // but the largest value we can obtain is type(uint256).max - 1, which happens // when a = type(uint256).max and b = 1. unchecked { return a == 0 ? 0 : (a - 1) / b + 1; } } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or * denominator == 0. * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by * Uniswap Labs also under MIT license. */ function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0 = x * y; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { // Solidity will revert if denominator == 0, unlike the div opcode on its own. // The surrounding unchecked block does not change this fact. // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic. return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. if (denominator <= prod1) { revert MathOverflowedMulDiv(); } /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. // Always >= 1. See https://cs.stackexchange.com/q/138556/92363. uint256 twos = denominator & (0 - denominator); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also // works in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded * towards zero. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2 of a positive value rounded towards zero. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10 of a positive value rounded towards zero. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10 ** 64) { value /= 10 ** 64; result += 64; } if (value >= 10 ** 32) { value /= 10 ** 32; result += 32; } if (value >= 10 ** 16) { value /= 10 ** 16; result += 16; } if (value >= 10 ** 8) { value /= 10 ** 8; result += 8; } if (value >= 10 ** 4) { value /= 10 ** 4; result += 4; } if (value >= 10 ** 2) { value /= 10 ** 2; result += 2; } if (value >= 10 ** 1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0); } } /** * @dev Return the log in base 256 of a positive value rounded towards zero. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 256, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0); } } /** * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers. */ function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) { return uint8(rounding) % 2 == 1; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol) pragma solidity ^0.8.20; /** * @dev Standard signed math utilities missing in the Solidity language. */ library SignedMath { /** * @dev Returns the largest of two signed numbers. */ function max(int256 a, int256 b) internal pure returns (int256) { return a > b ? a : b; } /** * @dev Returns the smallest of two signed numbers. */ function min(int256 a, int256 b) internal pure returns (int256) { return a < b ? a : b; } /** * @dev Returns the average of two signed numbers without overflow. * The result is rounded towards zero. */ function average(int256 a, int256 b) internal pure returns (int256) { // Formula from the book "Hacker's Delight" int256 x = (a & b) + ((a ^ b) >> 1); return x + (int256(uint256(x) >> 255) & (a ^ b)); } /** * @dev Returns the absolute unsigned value of a signed value. */ function abs(int256 n) internal pure returns (uint256) { unchecked { // must be unchecked in order to support `n = type(int256).min` return uint256(n >= 0 ? n : -n); } } }
{ "remappings": [ "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/", "chainlink/=lib/chainlink/contracts/", "ds-test/=lib/forge-std/lib/ds-test/src/", "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/", "forge-std/=lib/forge-std/src/", "openzeppelin-contracts/=lib/openzeppelin-contracts/" ], "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs", "appendCBOR": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "paris", "viaIR": false, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"baseURI_","type":"string"},{"internalType":"address","name":"admin_","type":"address"},{"internalType":"address","name":"minter_","type":"address"},{"internalType":"address","name":"verse_","type":"address"},{"internalType":"uint256","name":"timelock_","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AccessControlBadConfirmation","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32","name":"neededRole","type":"bytes32"}],"name":"AccessControlUnauthorizedAccount","type":"error"},{"inputs":[],"name":"DisabledFunction","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"owner","type":"address"}],"name":"ERC721IncorrectOwner","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ERC721InsufficientApproval","type":"error"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"name":"ERC721InvalidApprover","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"ERC721InvalidOperator","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"ERC721InvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC721InvalidReceiver","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"ERC721InvalidSender","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ERC721NonexistentToken","type":"error"},{"inputs":[],"name":"InvalidParametersMatch","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"InvalidTokenId","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"InvalidUnlock","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"TokenAlreadyUnlocked","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"TokenLocked","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[],"name":"EmergencyUnlock","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Unlock","type":"event"},{"inputs":[],"name":"BASE_URI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINTER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"NB_OF_TOKENS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TIMELOCK_DEADLINE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"VERSE","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"areAllUnlocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"eUnlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isEUnlocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"isUnlocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"to","type":"address[]"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"mintBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"moonOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"callerConfirmation","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"name":"unlock","outputs":[],"stateMutability":"pure","type":"function"}]
Contract Creation Code
60e06040526008805460ff1916905534801561001a57600080fd5b50604051612afb380380612afb83398101604081905261003991610b7f565b604051806060016040528060218152602001612aba6021913960408051808201909152600481526326a7a7a760e11b602082015286608287878787878760006100828382610cf3565b50600161008f8282610cf3565b5061009f9150600090508561021f565b506100ca7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a68461021f565b5060076100d78782610cf3565b5060808590526001600160a01b03821660a0526100f48142610db2565b60c052506101229650734d3dfd28aa35869d52c5ce077aa36e3944b48d1c955060789450506102cf92505050565b610141734cd7d2004a323133330d5a62ad7c734fafd3523660796102cf565b61015a600080516020612adb833981519152607a6102cf565b610173600080516020612adb833981519152607b6102cf565b61018c600080516020612adb833981519152607c6102cf565b6101ab734d3dfd28aa35869d52c5ce077aa36e3944b48d1c607d6102cf565b6101ca734cd7d2004a323133330d5a62ad7c734fafd35236607e6102cf565b6101e3600080516020612adb833981519152607f6102cf565b6101fc600080516020612adb83398151915260806102cf565b610215600080516020612adb83398151915260816102cf565b5050505050610e58565b60008281526006602090815260408083206001600160a01b038516845290915281205460ff166102c55760008381526006602090815260408083206001600160a01b03861684529091529020805460ff1916600117905561027d3390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45060016102c9565b5060005b92915050565b6102d982826102e7565b6102e38282610307565b5050565b6102e382826040518060200160405280600081525061033160201b60201c565b60805181106102e35760405163ed15e6cf60e01b8152600481018290526024015b60405180910390fd5b61033b838361034d565b61034860008484846103b1565b505050565b6001600160a01b03821661037757604051633250574960e11b815260006004820152602401610328565b60006103848383836104db565b90506001600160a01b03811615610348576040516339e3563760e11b815260006004820152602401610328565b6001600160a01b0383163b156104d557604051630a85bd0160e11b81526001600160a01b0384169063150b7a02906103f3903390889087908790600401610dd3565b6020604051808303816000875af192505050801561042e575060408051601f3d908101601f1916820190925261042b91810190610e27565b60015b610497573d80801561045c576040519150601f19603f3d011682016040523d82523d6000602084013e610461565b606091505b50805160000361048f57604051633250574960e11b81526001600160a01b0385166004820152602401610328565b805181602001fd5b6001600160e01b03198116630a85bd0160e11b146104d357604051633250574960e11b81526001600160a01b0385166004820152602401610328565b505b50505050565b6000828152600260205260408120546001600160a01b03166104fc8461058b565b15801561051157506001600160a01b03811615155b8015610531575060a0516001600160a01b0316816001600160a01b031614155b1561055257604051634432ba5960e11b815260048101859052602401610328565b6001600160a01b038516610577576000848152600960205260409020805460ff191690555b6105828585856105a7565b95945050505050565b60006105968261069f565b421015806102c957506102c96108c7565b6000828152600260205260408120546001600160a01b03908116908316156105d4576105d48184866108e1565b6001600160a01b03811615610611576105f06000858180610945565b6001600160a01b038116600090815260036020526040902080546000190190555b6001600160a01b03851615610640576001600160a01b0385166000908152600360205260409020805460010190555b60008481526002602052604080822080546001600160a01b0319166001600160a01b0389811691821790925591518793918516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4949350505050565b600060058210156106b557506366873780919050565b600a8210156106c9575063669c4f80919050565b600f8210156106dd57506366aec480919050565b60148210156106f157506366c28b00919050565b601982101561070557506366d50000919050565b601e82101561071957506366e8c680919050565b602382101561072d57506366fc8d00919050565b602882101561074157506367105380919050565b602d82101561075557506367241a00919050565b603282101561076957506367368f00919050565b603782101561077d575063674a5580919050565b603c821015610791575063675e1c00919050565b60418210156107a55750636771e280919050565b60468210156107b957506367845780919050565b604b8210156107cd57506367996f80919050565b60508210156107e157506367abe480919050565b60558210156107f557506367bfab00919050565b605a82101561080957506367d37180919050565b605f82101561081d57506367e73800919050565b606482101561083157506367f9ad00919050565b6069821015610845575063680d7380919050565b606e82101561085957506368213a00919050565b607382101561086d5750636833af00919050565b60788210156108815750636848c700919050565b81607814806108905750816079145b156108a057506367845780919050565b81607d14806108af575081607e145b156108bf57506366d50000919050565b506000919050565b600060c051421015806108dc575060085460ff165b905090565b6108ec838383610a6a565b610348576001600160a01b03831661091a57604051637e27328960e01b815260048101829052602401610328565b60405163177e802f60e01b81526001600160a01b038316600482015260248101829052604401610328565b808061095957506001600160a01b03821615155b15610a3a57600061096984610af0565b90506001600160a01b038316158015906109955750826001600160a01b0316816001600160a01b031614155b80156109c757506001600160a01b0380821660009081526005602090815260408083209387168352929052205460ff16155b156109f05760405163a9fbf51f60e01b81526001600160a01b0384166004820152602401610328565b8115610a385783856001600160a01b0316826001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45b505b5050600090815260046020526040902080546001600160a01b0319166001600160a01b0392909216919091179055565b60006001600160a01b03831615801590610ae85750826001600160a01b0316846001600160a01b03161480610ac457506001600160a01b0380851660009081526005602090815260408083209387168352929052205460ff165b80610ae857506000828152600460205260409020546001600160a01b038481169116145b949350505050565b6000818152600260205260408120546001600160a01b0316806102c957604051637e27328960e01b815260048101849052602401610328565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610b5a578181015183820152602001610b42565b50506000910152565b80516001600160a01b0381168114610b7a57600080fd5b919050565b600080600080600060a08688031215610b9757600080fd5b85516001600160401b0380821115610bae57600080fd5b818801915088601f830112610bc257600080fd5b815181811115610bd457610bd4610b29565b604051601f8201601f19908116603f01168101908382118183101715610bfc57610bfc610b29565b816040528281528b6020848701011115610c1557600080fd5b610c26836020830160208801610b3f565b8099505050505050610c3a60208701610b63565b9350610c4860408701610b63565b9250610c5660608701610b63565b9150608086015190509295509295909350565b600181811c90821680610c7d57607f821691505b602082108103610c9d57634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115610348576000816000526020600020601f850160051c81016020861015610ccc5750805b601f850160051c820191505b81811015610ceb57828155600101610cd8565b505050505050565b81516001600160401b03811115610d0c57610d0c610b29565b610d2081610d1a8454610c69565b84610ca3565b602080601f831160018114610d555760008415610d3d5750858301515b600019600386901b1c1916600185901b178555610ceb565b600085815260208120601f198616915b82811015610d8457888601518255948401946001909101908401610d65565b5085821015610da25787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b808201808211156102c957634e487b7160e01b600052601160045260246000fd5b600060018060a01b038087168352808616602084015250836040830152608060608301528251806080840152610e108160a0850160208701610b3f565b601f01601f19169190910160a00195945050505050565b600060208284031215610e3957600080fd5b81516001600160e01b031981168114610e5157600080fd5b9392505050565b60805160a05160c051611c1e610e9c6000396000818161032d0152610a890152600081816103540152610b070152600081816103a101526114030152611c1e6000f3fe608060405234801561001057600080fd5b50600436106101fb5760003560e01c80636506466b1161011a578063a22cb465116100ad578063d547741f1161007c578063d547741f14610492578063dbddb26a146104a5578063e7dee418146104ad578063e985e9c5146104b5578063fb9b1836146104c857600080fd5b8063a22cb46514610432578063b88d4fde14610445578063c87b56dd14610458578063d53913931461046b57600080fd5b80637c88e3d9116100e95780637c88e3d9146103fc57806391d148541461040f57806395d89b4114610422578063a217fddf1461042a57600080fd5b80636506466b1461039c57806370a08231146103c357806372abc8b7146103d6578063759d147d146103e957600080fd5b806336568abe1161019257806344148a921161016157806344148a92146103285780634cf4b61f1461034f5780635d36598f146103765780636352211e1461038957600080fd5b806336568abe146102dc57806340c10f19146102ef57806342842e0e1461030257806342966c681461031557600080fd5b8063095ea7b3116101ce578063095ea7b31461027057806323b872dd14610285578063248a9ca3146102985780632f2ff15d146102c957600080fd5b806301ffc9a71461020057806306fdde0314610228578063081812fc1461023d5780630837d1cd14610268575b600080fd5b61021361020e366004611678565b6104d3565b60405190151581526020015b60405180910390f35b6102306104e4565b60405161021f91906116e5565b61025061024b3660046116f8565b610576565b6040516001600160a01b03909116815260200161021f565b61021361059f565b61028361027e36600461172d565b6105ae565b005b610283610293366004611757565b6105bd565b6102bb6102a63660046116f8565b60009081526006602052604090206001015490565b60405190815260200161021f565b6102836102d7366004611793565b61064d565b6102836102ea366004611793565b610672565b6102836102fd36600461172d565b6106aa565b610283610310366004611757565b6106de565b6102836103233660046116f8565b6106f9565b6102bb7f000000000000000000000000000000000000000000000000000000000000000081565b6102507f000000000000000000000000000000000000000000000000000000000000000081565b6102836103843660046117bf565b610705565b6102506103973660046116f8565b61071e565b6102bb7f000000000000000000000000000000000000000000000000000000000000000081565b6102bb6103d1366004611834565b610729565b6102136103e43660046116f8565b610771565b6102bb6103f73660046116f8565b610786565b61028361040a366004611929565b61079b565b61021361041d366004611793565b61083e565b610230610869565b6102bb600081565b6102836104403660046119e9565b610878565b610283610453366004611a25565b610883565b6102306104663660046116f8565b61089a565b6102bb7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b6102836104a0366004611793565b610902565b610230610927565b6102836109b5565b6102136104c3366004611ae5565b6109f9565b60085460ff16610213565b60006104de82610a27565b92915050565b6060600080546104f390611b0f565b80601f016020809104026020016040519081016040528092919081815260200182805461051f90611b0f565b801561056c5780601f106105415761010080835404028352916020019161056c565b820191906000526020600020905b81548152906001019060200180831161054f57829003601f168201915b5050505050905090565b600061058182610a4c565b506000828152600460205260409020546001600160a01b03166104de565b60006105a9610a85565b905090565b6105b9828233610abb565b5050565b6001600160a01b0382166105ec57604051633250574960e11b8152600060048201526024015b60405180910390fd5b60006105f9838333610ac8565b9050836001600160a01b0316816001600160a01b031614610647576040516364283d7b60e01b81526001600160a01b03808616600483015260248201849052821660448201526064016105e3565b50505050565b60008281526006602052604090206001015461066881610b96565b6106478383610ba3565b6001600160a01b038116331461069b5760405163334bd91960e11b815260040160405180910390fd5b6106a58282610c37565b505050565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a66106d481610b96565b6106a58383610ca4565b6106a583838360405180602001604052806000815250610883565b6105b960008233610ac8565b6040516315c8addd60e01b815260040160405180910390fd5b60006104de82610a4c565b60006001600160a01b038216610755576040516322718ad960e21b8152600060048201526024016105e3565b506001600160a01b031660009081526003602052604090205490565b600061077c82610a4c565b506104de82610cb8565b600061079182610a4c565b506104de82610cd4565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a66107c581610b96565b8251825181146107e857604051636b07401f60e01b815260040160405180910390fd5b60005b818110156108375761082f85828151811061080857610808611b49565b602002602001015185838151811061082257610822611b49565b6020026020010151610ca4565b6001016107eb565b5050505050565b60009182526006602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6060600180546104f390611b0f565b6105b9338383610efc565b61088e8484846105bd565b61064784848484610f9b565b60606108a582610a4c565b5060006108b06110bd565b905060008151116108d057604051806020016040528060008152506108fb565b806108da846110cc565b6040516020016108eb929190611b5f565b6040516020818303038152906040525b9392505050565b60008281526006602052604090206001015461091d81610b96565b6106478383610c37565b6007805461093490611b0f565b80601f016020809104026020016040519081016040528092919081815260200182805461096090611b0f565b80156109ad5780601f10610982576101008083540402835291602001916109ad565b820191906000526020600020905b81548152906001019060200180831161099057829003601f168201915b505050505081565b60006109c081610b96565b6008805460ff191660011790556040517fc530b67f06e79967fafaa0f1af1af798443e42526f8a0ff054bd2bd075198cf490600090a150565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b60006001600160e01b03198216637965db0b60e01b14806104de57506104de8261115f565b6000818152600260205260408120546001600160a01b0316806104de57604051637e27328960e01b8152600481018490526024016105e3565b60007f0000000000000000000000000000000000000000000000000000000000000000421015806105a957505060085460ff1690565b6106a583838360016111af565b6000828152600260205260408120546001600160a01b0316610ae984610cb8565b158015610afe57506001600160a01b03811615155b8015610b3c57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316816001600160a01b031614155b15610b5d57604051634432ba5960e11b8152600481018590526024016105e3565b6001600160a01b038516610b82576000848152600960205260409020805460ff191690555b610b8d8585856112b5565b95945050505050565b610ba081336113ae565b50565b6000610baf838361083e565b610c2f5760008381526006602090815260408083206001600160a01b03861684529091529020805460ff19166001179055610be73390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45060016104de565b5060006104de565b6000610c43838361083e565b15610c2f5760008381526006602090815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45060016104de565b610cae82826113e7565b6105b98282611401565b6000610cc382610cd4565b421015806104de57506104de610a85565b60006005821015610cea57506366873780919050565b600a821015610cfe575063669c4f80919050565b600f821015610d1257506366aec480919050565b6014821015610d2657506366c28b00919050565b6019821015610d3a57506366d50000919050565b601e821015610d4e57506366e8c680919050565b6023821015610d6257506366fc8d00919050565b6028821015610d7657506367105380919050565b602d821015610d8a57506367241a00919050565b6032821015610d9e57506367368f00919050565b6037821015610db2575063674a5580919050565b603c821015610dc6575063675e1c00919050565b6041821015610dda5750636771e280919050565b6046821015610dee57506367845780919050565b604b821015610e0257506367996f80919050565b6050821015610e1657506367abe480919050565b6055821015610e2a57506367bfab00919050565b605a821015610e3e57506367d37180919050565b605f821015610e5257506367e73800919050565b6064821015610e6657506367f9ad00919050565b6069821015610e7a575063680d7380919050565b606e821015610e8e57506368213a00919050565b6073821015610ea25750636833af00919050565b6078821015610eb65750636848c700919050565b8160781480610ec55750816079145b15610ed557506367845780919050565b81607d1480610ee4575081607e145b15610ef457506366d50000919050565b506000919050565b6001600160a01b038216610f2e57604051630b61174360e31b81526001600160a01b03831660048201526024016105e3565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b0383163b1561064757604051630a85bd0160e11b81526001600160a01b0384169063150b7a0290610fdd903390889087908790600401611b8e565b6020604051808303816000875af1925050508015611018575060408051601f3d908101601f1916820190925261101591810190611bcb565b60015b611081573d808015611046576040519150601f19603f3d011682016040523d82523d6000602084013e61104b565b606091505b50805160000361107957604051633250574960e11b81526001600160a01b03851660048201526024016105e3565b805181602001fd5b6001600160e01b03198116630a85bd0160e11b1461083757604051633250574960e11b81526001600160a01b03851660048201526024016105e3565b6060600780546104f390611b0f565b606060006110d983611444565b600101905060008167ffffffffffffffff8111156110f9576110f961184f565b6040519080825280601f01601f191660200182016040528015611123576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508461112d57509392505050565b60006001600160e01b031982166380ac58cd60e01b148061119057506001600160e01b03198216635b5e139f60e01b145b806104de57506301ffc9a760e01b6001600160e01b03198316146104de565b80806111c357506001600160a01b03821615155b156112855760006111d384610a4c565b90506001600160a01b038316158015906111ff5750826001600160a01b0316816001600160a01b031614155b8015611212575061121081846109f9565b155b1561123b5760405163a9fbf51f60e01b81526001600160a01b03841660048201526024016105e3565b81156112835783856001600160a01b0316826001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45b505b5050600090815260046020526040902080546001600160a01b0319166001600160a01b0392909216919091179055565b6000828152600260205260408120546001600160a01b03908116908316156112e2576112e281848661151c565b6001600160a01b03811615611320576112ff6000856000806111af565b6001600160a01b038116600090815260036020526040902080546000190190555b6001600160a01b0385161561134f576001600160a01b0385166000908152600360205260409020805460010190555b60008481526002602052604080822080546001600160a01b0319166001600160a01b0389811691821790925591518793918516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4949350505050565b6113b8828261083e565b6105b95760405163e2517d3f60e01b81526001600160a01b0382166004820152602481018390526044016105e3565b6105b9828260405180602001604052806000815250611580565b7f000000000000000000000000000000000000000000000000000000000000000081106105b95760405163ed15e6cf60e01b8152600481018290526024016105e3565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b83106114835772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef810000000083106114af576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106114cd57662386f26fc10000830492506010015b6305f5e10083106114e5576305f5e100830492506008015b61271083106114f957612710830492506004015b6064831061150b576064830492506002015b600a83106104de5760010192915050565b611527838383611597565b6106a5576001600160a01b03831661155557604051637e27328960e01b8152600481018290526024016105e3565b60405163177e802f60e01b81526001600160a01b0383166004820152602481018290526044016105e3565b61158a83836115fd565b6106a56000848484610f9b565b60006001600160a01b038316158015906115f55750826001600160a01b0316846001600160a01b031614806115d157506115d184846109f9565b806115f557506000828152600460205260409020546001600160a01b038481169116145b949350505050565b6001600160a01b03821661162757604051633250574960e11b8152600060048201526024016105e3565b600061163583836000610ac8565b90506001600160a01b038116156106a5576040516339e3563760e11b8152600060048201526024016105e3565b6001600160e01b031981168114610ba057600080fd5b60006020828403121561168a57600080fd5b81356108fb81611662565b60005b838110156116b0578181015183820152602001611698565b50506000910152565b600081518084526116d1816020860160208601611695565b601f01601f19169290920160200192915050565b6020815260006108fb60208301846116b9565b60006020828403121561170a57600080fd5b5035919050565b80356001600160a01b038116811461172857600080fd5b919050565b6000806040838503121561174057600080fd5b61174983611711565b946020939093013593505050565b60008060006060848603121561176c57600080fd5b61177584611711565b925061178360208501611711565b9150604084013590509250925092565b600080604083850312156117a657600080fd5b823591506117b660208401611711565b90509250929050565b600080602083850312156117d257600080fd5b823567ffffffffffffffff808211156117ea57600080fd5b818501915085601f8301126117fe57600080fd5b81358181111561180d57600080fd5b8660208260051b850101111561182257600080fd5b60209290920196919550909350505050565b60006020828403121561184657600080fd5b6108fb82611711565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561188e5761188e61184f565b604052919050565b600067ffffffffffffffff8211156118b0576118b061184f565b5060051b60200190565b600082601f8301126118cb57600080fd5b813560206118e06118db83611896565b611865565b8083825260208201915060208460051b87010193508684111561190257600080fd5b602086015b8481101561191e5780358352918301918301611907565b509695505050505050565b6000806040838503121561193c57600080fd5b823567ffffffffffffffff8082111561195457600080fd5b818501915085601f83011261196857600080fd5b813560206119786118db83611896565b82815260059290921b8401810191818101908984111561199757600080fd5b948201945b838610156119bc576119ad86611711565b8252948201949082019061199c565b965050860135925050808211156119d257600080fd5b506119df858286016118ba565b9150509250929050565b600080604083850312156119fc57600080fd5b611a0583611711565b915060208301358015158114611a1a57600080fd5b809150509250929050565b60008060008060808587031215611a3b57600080fd5b611a4485611711565b93506020611a53818701611711565b935060408601359250606086013567ffffffffffffffff80821115611a7757600080fd5b818801915088601f830112611a8b57600080fd5b813581811115611a9d57611a9d61184f565b611aaf601f8201601f19168501611865565b91508082528984828501011115611ac557600080fd5b808484018584013760008482840101525080935050505092959194509250565b60008060408385031215611af857600080fd5b611b0183611711565b91506117b660208401611711565b600181811c90821680611b2357607f821691505b602082108103611b4357634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b60008351611b71818460208801611695565b835190830190611b85818360208801611695565b01949350505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090611bc1908301846116b9565b9695505050505050565b600060208284031215611bdd57600080fd5b81516108fb8161166256fea2646970667358221220b095aa81002369f664586e0f60b7a99c03c10bdc5044d7cc1e721ac1df93dfc864736f6c63430008190033526179204d61726368696e6720746865204d6f6f6e3a2046756c6c2026204e65770000000000000000000000003c7e48216c74d7818ab1fd226e56c60c4d659ba600000000000000000000000000000000000000000000000000000000000000a00000000000000000000000003c7e48216c74d7818ab1fd226e56c60c4d659ba6000000000000000000000000e445fb0297f7d1f507df708185946210eb6a9de6000000000000000000000000b4b57125af2acf9bf605a9d9c3d256537876f65a00000000000000000000000000000000000000000000000000000000058fd4000000000000000000000000000000000000000000000000000000000000000036697066733a2f2f516d5079687262504b5547775357756465487464373332787263386f317971555a3968726d4e795767617558436d2f00000000000000000000
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101fb5760003560e01c80636506466b1161011a578063a22cb465116100ad578063d547741f1161007c578063d547741f14610492578063dbddb26a146104a5578063e7dee418146104ad578063e985e9c5146104b5578063fb9b1836146104c857600080fd5b8063a22cb46514610432578063b88d4fde14610445578063c87b56dd14610458578063d53913931461046b57600080fd5b80637c88e3d9116100e95780637c88e3d9146103fc57806391d148541461040f57806395d89b4114610422578063a217fddf1461042a57600080fd5b80636506466b1461039c57806370a08231146103c357806372abc8b7146103d6578063759d147d146103e957600080fd5b806336568abe1161019257806344148a921161016157806344148a92146103285780634cf4b61f1461034f5780635d36598f146103765780636352211e1461038957600080fd5b806336568abe146102dc57806340c10f19146102ef57806342842e0e1461030257806342966c681461031557600080fd5b8063095ea7b3116101ce578063095ea7b31461027057806323b872dd14610285578063248a9ca3146102985780632f2ff15d146102c957600080fd5b806301ffc9a71461020057806306fdde0314610228578063081812fc1461023d5780630837d1cd14610268575b600080fd5b61021361020e366004611678565b6104d3565b60405190151581526020015b60405180910390f35b6102306104e4565b60405161021f91906116e5565b61025061024b3660046116f8565b610576565b6040516001600160a01b03909116815260200161021f565b61021361059f565b61028361027e36600461172d565b6105ae565b005b610283610293366004611757565b6105bd565b6102bb6102a63660046116f8565b60009081526006602052604090206001015490565b60405190815260200161021f565b6102836102d7366004611793565b61064d565b6102836102ea366004611793565b610672565b6102836102fd36600461172d565b6106aa565b610283610310366004611757565b6106de565b6102836103233660046116f8565b6106f9565b6102bb7f000000000000000000000000000000000000000000000000000000006c0ce96381565b6102507f000000000000000000000000b4b57125af2acf9bf605a9d9c3d256537876f65a81565b6102836103843660046117bf565b610705565b6102506103973660046116f8565b61071e565b6102bb7f000000000000000000000000000000000000000000000000000000000000008281565b6102bb6103d1366004611834565b610729565b6102136103e43660046116f8565b610771565b6102bb6103f73660046116f8565b610786565b61028361040a366004611929565b61079b565b61021361041d366004611793565b61083e565b610230610869565b6102bb600081565b6102836104403660046119e9565b610878565b610283610453366004611a25565b610883565b6102306104663660046116f8565b61089a565b6102bb7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b6102836104a0366004611793565b610902565b610230610927565b6102836109b5565b6102136104c3366004611ae5565b6109f9565b60085460ff16610213565b60006104de82610a27565b92915050565b6060600080546104f390611b0f565b80601f016020809104026020016040519081016040528092919081815260200182805461051f90611b0f565b801561056c5780601f106105415761010080835404028352916020019161056c565b820191906000526020600020905b81548152906001019060200180831161054f57829003601f168201915b5050505050905090565b600061058182610a4c565b506000828152600460205260409020546001600160a01b03166104de565b60006105a9610a85565b905090565b6105b9828233610abb565b5050565b6001600160a01b0382166105ec57604051633250574960e11b8152600060048201526024015b60405180910390fd5b60006105f9838333610ac8565b9050836001600160a01b0316816001600160a01b031614610647576040516364283d7b60e01b81526001600160a01b03808616600483015260248201849052821660448201526064016105e3565b50505050565b60008281526006602052604090206001015461066881610b96565b6106478383610ba3565b6001600160a01b038116331461069b5760405163334bd91960e11b815260040160405180910390fd5b6106a58282610c37565b505050565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a66106d481610b96565b6106a58383610ca4565b6106a583838360405180602001604052806000815250610883565b6105b960008233610ac8565b6040516315c8addd60e01b815260040160405180910390fd5b60006104de82610a4c565b60006001600160a01b038216610755576040516322718ad960e21b8152600060048201526024016105e3565b506001600160a01b031660009081526003602052604090205490565b600061077c82610a4c565b506104de82610cb8565b600061079182610a4c565b506104de82610cd4565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a66107c581610b96565b8251825181146107e857604051636b07401f60e01b815260040160405180910390fd5b60005b818110156108375761082f85828151811061080857610808611b49565b602002602001015185838151811061082257610822611b49565b6020026020010151610ca4565b6001016107eb565b5050505050565b60009182526006602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6060600180546104f390611b0f565b6105b9338383610efc565b61088e8484846105bd565b61064784848484610f9b565b60606108a582610a4c565b5060006108b06110bd565b905060008151116108d057604051806020016040528060008152506108fb565b806108da846110cc565b6040516020016108eb929190611b5f565b6040516020818303038152906040525b9392505050565b60008281526006602052604090206001015461091d81610b96565b6106478383610c37565b6007805461093490611b0f565b80601f016020809104026020016040519081016040528092919081815260200182805461096090611b0f565b80156109ad5780601f10610982576101008083540402835291602001916109ad565b820191906000526020600020905b81548152906001019060200180831161099057829003601f168201915b505050505081565b60006109c081610b96565b6008805460ff191660011790556040517fc530b67f06e79967fafaa0f1af1af798443e42526f8a0ff054bd2bd075198cf490600090a150565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b60006001600160e01b03198216637965db0b60e01b14806104de57506104de8261115f565b6000818152600260205260408120546001600160a01b0316806104de57604051637e27328960e01b8152600481018490526024016105e3565b60007f000000000000000000000000000000000000000000000000000000006c0ce963421015806105a957505060085460ff1690565b6106a583838360016111af565b6000828152600260205260408120546001600160a01b0316610ae984610cb8565b158015610afe57506001600160a01b03811615155b8015610b3c57507f000000000000000000000000b4b57125af2acf9bf605a9d9c3d256537876f65a6001600160a01b0316816001600160a01b031614155b15610b5d57604051634432ba5960e11b8152600481018590526024016105e3565b6001600160a01b038516610b82576000848152600960205260409020805460ff191690555b610b8d8585856112b5565b95945050505050565b610ba081336113ae565b50565b6000610baf838361083e565b610c2f5760008381526006602090815260408083206001600160a01b03861684529091529020805460ff19166001179055610be73390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45060016104de565b5060006104de565b6000610c43838361083e565b15610c2f5760008381526006602090815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45060016104de565b610cae82826113e7565b6105b98282611401565b6000610cc382610cd4565b421015806104de57506104de610a85565b60006005821015610cea57506366873780919050565b600a821015610cfe575063669c4f80919050565b600f821015610d1257506366aec480919050565b6014821015610d2657506366c28b00919050565b6019821015610d3a57506366d50000919050565b601e821015610d4e57506366e8c680919050565b6023821015610d6257506366fc8d00919050565b6028821015610d7657506367105380919050565b602d821015610d8a57506367241a00919050565b6032821015610d9e57506367368f00919050565b6037821015610db2575063674a5580919050565b603c821015610dc6575063675e1c00919050565b6041821015610dda5750636771e280919050565b6046821015610dee57506367845780919050565b604b821015610e0257506367996f80919050565b6050821015610e1657506367abe480919050565b6055821015610e2a57506367bfab00919050565b605a821015610e3e57506367d37180919050565b605f821015610e5257506367e73800919050565b6064821015610e6657506367f9ad00919050565b6069821015610e7a575063680d7380919050565b606e821015610e8e57506368213a00919050565b6073821015610ea25750636833af00919050565b6078821015610eb65750636848c700919050565b8160781480610ec55750816079145b15610ed557506367845780919050565b81607d1480610ee4575081607e145b15610ef457506366d50000919050565b506000919050565b6001600160a01b038216610f2e57604051630b61174360e31b81526001600160a01b03831660048201526024016105e3565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b0383163b1561064757604051630a85bd0160e11b81526001600160a01b0384169063150b7a0290610fdd903390889087908790600401611b8e565b6020604051808303816000875af1925050508015611018575060408051601f3d908101601f1916820190925261101591810190611bcb565b60015b611081573d808015611046576040519150601f19603f3d011682016040523d82523d6000602084013e61104b565b606091505b50805160000361107957604051633250574960e11b81526001600160a01b03851660048201526024016105e3565b805181602001fd5b6001600160e01b03198116630a85bd0160e11b1461083757604051633250574960e11b81526001600160a01b03851660048201526024016105e3565b6060600780546104f390611b0f565b606060006110d983611444565b600101905060008167ffffffffffffffff8111156110f9576110f961184f565b6040519080825280601f01601f191660200182016040528015611123576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508461112d57509392505050565b60006001600160e01b031982166380ac58cd60e01b148061119057506001600160e01b03198216635b5e139f60e01b145b806104de57506301ffc9a760e01b6001600160e01b03198316146104de565b80806111c357506001600160a01b03821615155b156112855760006111d384610a4c565b90506001600160a01b038316158015906111ff5750826001600160a01b0316816001600160a01b031614155b8015611212575061121081846109f9565b155b1561123b5760405163a9fbf51f60e01b81526001600160a01b03841660048201526024016105e3565b81156112835783856001600160a01b0316826001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45b505b5050600090815260046020526040902080546001600160a01b0319166001600160a01b0392909216919091179055565b6000828152600260205260408120546001600160a01b03908116908316156112e2576112e281848661151c565b6001600160a01b03811615611320576112ff6000856000806111af565b6001600160a01b038116600090815260036020526040902080546000190190555b6001600160a01b0385161561134f576001600160a01b0385166000908152600360205260409020805460010190555b60008481526002602052604080822080546001600160a01b0319166001600160a01b0389811691821790925591518793918516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4949350505050565b6113b8828261083e565b6105b95760405163e2517d3f60e01b81526001600160a01b0382166004820152602481018390526044016105e3565b6105b9828260405180602001604052806000815250611580565b7f000000000000000000000000000000000000000000000000000000000000008281106105b95760405163ed15e6cf60e01b8152600481018290526024016105e3565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b83106114835772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef810000000083106114af576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106114cd57662386f26fc10000830492506010015b6305f5e10083106114e5576305f5e100830492506008015b61271083106114f957612710830492506004015b6064831061150b576064830492506002015b600a83106104de5760010192915050565b611527838383611597565b6106a5576001600160a01b03831661155557604051637e27328960e01b8152600481018290526024016105e3565b60405163177e802f60e01b81526001600160a01b0383166004820152602481018290526044016105e3565b61158a83836115fd565b6106a56000848484610f9b565b60006001600160a01b038316158015906115f55750826001600160a01b0316846001600160a01b031614806115d157506115d184846109f9565b806115f557506000828152600460205260409020546001600160a01b038481169116145b949350505050565b6001600160a01b03821661162757604051633250574960e11b8152600060048201526024016105e3565b600061163583836000610ac8565b90506001600160a01b038116156106a5576040516339e3563760e11b8152600060048201526024016105e3565b6001600160e01b031981168114610ba057600080fd5b60006020828403121561168a57600080fd5b81356108fb81611662565b60005b838110156116b0578181015183820152602001611698565b50506000910152565b600081518084526116d1816020860160208601611695565b601f01601f19169290920160200192915050565b6020815260006108fb60208301846116b9565b60006020828403121561170a57600080fd5b5035919050565b80356001600160a01b038116811461172857600080fd5b919050565b6000806040838503121561174057600080fd5b61174983611711565b946020939093013593505050565b60008060006060848603121561176c57600080fd5b61177584611711565b925061178360208501611711565b9150604084013590509250925092565b600080604083850312156117a657600080fd5b823591506117b660208401611711565b90509250929050565b600080602083850312156117d257600080fd5b823567ffffffffffffffff808211156117ea57600080fd5b818501915085601f8301126117fe57600080fd5b81358181111561180d57600080fd5b8660208260051b850101111561182257600080fd5b60209290920196919550909350505050565b60006020828403121561184657600080fd5b6108fb82611711565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561188e5761188e61184f565b604052919050565b600067ffffffffffffffff8211156118b0576118b061184f565b5060051b60200190565b600082601f8301126118cb57600080fd5b813560206118e06118db83611896565b611865565b8083825260208201915060208460051b87010193508684111561190257600080fd5b602086015b8481101561191e5780358352918301918301611907565b509695505050505050565b6000806040838503121561193c57600080fd5b823567ffffffffffffffff8082111561195457600080fd5b818501915085601f83011261196857600080fd5b813560206119786118db83611896565b82815260059290921b8401810191818101908984111561199757600080fd5b948201945b838610156119bc576119ad86611711565b8252948201949082019061199c565b965050860135925050808211156119d257600080fd5b506119df858286016118ba565b9150509250929050565b600080604083850312156119fc57600080fd5b611a0583611711565b915060208301358015158114611a1a57600080fd5b809150509250929050565b60008060008060808587031215611a3b57600080fd5b611a4485611711565b93506020611a53818701611711565b935060408601359250606086013567ffffffffffffffff80821115611a7757600080fd5b818801915088601f830112611a8b57600080fd5b813581811115611a9d57611a9d61184f565b611aaf601f8201601f19168501611865565b91508082528984828501011115611ac557600080fd5b808484018584013760008482840101525080935050505092959194509250565b60008060408385031215611af857600080fd5b611b0183611711565b91506117b660208401611711565b600181811c90821680611b2357607f821691505b602082108103611b4357634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b60008351611b71818460208801611695565b835190830190611b85818360208801611695565b01949350505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090611bc1908301846116b9565b9695505050505050565b600060208284031215611bdd57600080fd5b81516108fb8161166256fea2646970667358221220b095aa81002369f664586e0f60b7a99c03c10bdc5044d7cc1e721ac1df93dfc864736f6c63430008190033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000000a00000000000000000000000003c7e48216c74d7818ab1fd226e56c60c4d659ba6000000000000000000000000e445fb0297f7d1f507df708185946210eb6a9de6000000000000000000000000b4b57125af2acf9bf605a9d9c3d256537876f65a00000000000000000000000000000000000000000000000000000000058fd4000000000000000000000000000000000000000000000000000000000000000036697066733a2f2f516d5079687262504b5547775357756465487464373332787263386f317971555a3968726d4e795767617558436d2f00000000000000000000
-----Decoded View---------------
Arg [0] : baseURI_ (string): ipfs://QmPyhrbPKUGwSWudeHtd732xrc8o1yqUZ9hrmNyWgauXCm/
Arg [1] : admin_ (address): 0x3c7e48216C74D7818aB1Fd226e56C60C4D659bA6
Arg [2] : minter_ (address): 0xe445Fb0297F7D1f507dF708185946210eB6a9DE6
Arg [3] : verse_ (address): 0xB4B57125AF2aCf9Bf605A9D9C3D256537876f65A
Arg [4] : timelock_ (uint256): 93312000
-----Encoded View---------------
8 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [1] : 0000000000000000000000003c7e48216c74d7818ab1fd226e56c60c4d659ba6
Arg [2] : 000000000000000000000000e445fb0297f7d1f507df708185946210eb6a9de6
Arg [3] : 000000000000000000000000b4b57125af2acf9bf605a9d9c3d256537876f65a
Arg [4] : 00000000000000000000000000000000000000000000000000000000058fd400
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000036
Arg [6] : 697066733a2f2f516d5079687262504b55477753577564654874643733327872
Arg [7] : 63386f317971555a3968726d4e795767617558436d2f00000000000000000000
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.