Feature Tip: Add private address tag to any address under My Name Tag !
ERC-721
Overview
Max Total Supply
65 MML
Holders
53
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
1 MMLLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
MinimenClubLegendary
Compiler Version
v0.8.9+commit.e5eed63a
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; ////////////////////////////////////////////////////////////////////////////////////////////////////// // // // // // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ // // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ // // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ // // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ // // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@ // // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@ // // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@ // // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@ // // @@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ // // @@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ // // @@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ // // @@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ // // // // // ////////////////////////////////////////////////////////////////////////////////////////////////////// import "../token/ERC721/extensions/ERC721OwnerEnumerable.sol"; import "../utils/Ownable.sol"; import "../utils/ECDSA.sol"; error InvalidMintCaller(); error OverTokenLimit(); error TokenAlreadyClaimed(); error TokenHasNoClaim(); interface IMintable { function mint(address claimer) external; } /** * MinimenClubLegendary is the second contract in a pair of contracts that allow for a legendary claimable mint. * This contract only has a few tokens excusively minted, with onchain-randomness, by the original MinimenClub contract. * * Mints occur by calling the {claim} method in the original contract on a rare tokenId that has not been claimed yet. * The determination of which tokens are rare and how claims are limited are all determined by the original contract. */ contract MinimenClubLegendary is ERC721OwnerEnumerable, IMintable { using Strings for uint256; uint256 public constant MAX_TOKENS = 69; // Only Address that can mint tokens from this contract address public mintSourceAddress; // Used to maintain constant time on-chain random ID generation uint256[MAX_TOKENS] private indices; // Token metadata for all tokens string public tokenDirectory; constructor( string memory name, string memory symbol, string memory _tokenDirectory, address _sourceAddress, uint256 royalty, address royaltyWallet ) ERC721(name, symbol) { tokenDirectory = _tokenDirectory; mintSourceAddress = _sourceAddress; _setRoyaltyBPS(royalty); _setRoyaltyWallet(royaltyWallet); _setTokenRange(1, MAX_TOKENS); } /** * @dev allows owner to update royalties following EIP-2981 at anytime */ function updateRoyalty(uint256 royaltyBPS, address royaltyWallet) external onlyOwner { _setRoyaltyBPS(royaltyBPS); _setRoyaltyWallet(royaltyWallet); } /** * @dev Display the metadata for a tokenId. */ function tokenURI(uint256 tokenId) public view override returns (string memory) { if (!_exists(tokenId)) revert QueryForNonexistentToken(); return string(abi.encodePacked(tokenDirectory, "/", tokenId.toString())); } /** * @dev Updates the token metadata of the collection. */ function setTokenDirectory(string memory _tokenDirectory) external onlyOwner { tokenDirectory = _tokenDirectory; } /** * @dev Allows ONLY mintSourceAddress to mint a random token to the given address. */ function mint(address claimer) external { if (_msgSender() != mintSourceAddress) revert InvalidMintCaller(); if (totalSupply() >= _tokenLimit()) revert OverTokenLimit(); _mintRandomIndex(claimer); } /// @notice Generates a pseudo random index of our tokens that has not been used so far function _mintRandomIndex(address receiver) internal { uint256 supplyLeft = _tokenLimit() - totalSupply(); // generate a random index uint256 index = _random(supplyLeft); uint256 tokenAtPlace = indices[index]; uint256 tokenId; // if we havent stored a replacement token... if (tokenAtPlace == 0) { //... we just return the current index tokenId = index; } else { // else we take the replace we stored with logic below tokenId = tokenAtPlace; } // get the highest token id we havent handed out uint256 lastTokenAvailable = indices[supplyLeft - 1]; // we need to store a replacement token for the next time we roll the same index // if the last token is still unused... if (lastTokenAvailable == 0) { // ... we store the last token as index indices[index] = supplyLeft - 1; } else { // ... we store the token that was stored for the last token indices[index] = lastTokenAvailable; } _mint(receiver, tokenId + _minTokenId); } /// @notice Generates a pseudo random number based on arguments with decent entropy /// @param max The maximum value we want to receive /// @return A random number less than the max function _random(uint256 max) internal view returns (uint256) { uint256 rand = uint256( keccak256( abi.encode( _msgSender(), block.difficulty, block.timestamp, blockhash(block.number - 1) ) ) ); return rand % max; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol) pragma solidity ^0.8.0; import "../ERC721.sol"; import "./IERC721Enumerable.sol"; error IndexOverOwnerBalance(); error IndexOverTokenCount(); error InvalidRange(); error MethodDisabled(); error QueryForZeroAddress(); /** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. * * To save gas {tokenByIndex} is disabled because it increases mint cost by ~40%. */ abstract contract ERC721OwnerEnumerable is ERC721, IERC721Enumerable { // Must be populated for {tokenOfOwnerByIndex} to work. uint128 internal _minTokenId; uint128 internal _maxTokenId; // Tracks the total supply. uint256 internal _totalSupply; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev To save gas, this is not explicity checked when minting a tokenId, * It is the responsibility of the extending contracts to make sure this is not exceeded * If they want Enumerable to work properly. * * The range includes the minId but excludes the maxId. */ function _setTokenRange(uint256 minId, uint256 maxId) internal { if (_minTokenId > _maxTokenId) revert InvalidRange(); _minTokenId = uint128(minId); _maxTokenId = uint128(maxId); } /** * @dev helpler function for valid mintIds */ function _tokenIdInRange(uint256 tokenId) internal view returns (bool) { return uint128(tokenId) >= _minTokenId && uint128(tokenId) <= _maxTokenId; } /** * @dev helpler function for total tokens within the range */ function _tokenLimit() internal view returns (uint256) { return _maxTokenId - _minTokenId + 1; } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { if (index >= balanceOf(owner)) revert IndexOverOwnerBalance(); if (owner == address(0)) revert QueryForZeroAddress(); if (_maxTokenId == 0) revert MethodDisabled(); uint256 tokenIdsIdx = 0; for (uint256 i = _minTokenId; i <= _maxTokenId; i++) { address tokenOwner = _owners[i]; if (tokenOwner == owner) { if (tokenIdsIdx == index) { return i; } tokenIdsIdx++; } } revert IndexOverOwnerBalance(); } /** * @dev Since {tokenOfOwnerByIndex} would repeat work to get all tokenIds of an address, this method * is included to speed it to an O(n) instead of a O(n ** 2) operation. */ function tokensOfOwner(address owner) public view virtual returns (uint256[] memory) { if (owner == address(0)) revert QueryForZeroAddress(); if (_maxTokenId == 0) revert MethodDisabled(); uint256[] memory tokenIds = new uint256[](balanceOf(owner)); uint256 index = 0; for (uint256 i = _minTokenId; i <= _maxTokenId; i++) { address tokenOwner = _owners[i]; if (tokenOwner == owner) { tokenIds[index] = i; index++; } } return tokenIds; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256) public view virtual override returns (uint256) { revert MethodDisabled(); } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` cannot be the zero address. * - `to` cannot be the zero address. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { super._beforeTokenTransfer(from, to, tokenId); if (from == address(0)) { _totalSupply += 1; } if (to == address(0)) { _totalSupply -= 1; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "./Context.sol"; error CallerNotOwner(); error OwnerNotZero(); /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { if (owner() != _msgSender()) revert CallerNotOwner(); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { if (newOwner == address(0)) revert OwnerNotZero(); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } else if (error == RecoverError.InvalidSignatureV) { revert("ECDSA: invalid signature 'v' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { // Check the signature length // - case 65: r,s,v signature (standard) // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._ if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else if (signature.length == 64) { bytes32 r; bytes32 vs; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) vs := mload(add(signature, 0x40)) } return tryRecover(hash, r, vs); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s; uint8 v; assembly { s := and( vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff ) v := add(shr(255, vs), 27) } return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if ( uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0 ) { return (address(0), RecoverError.InvalidSignatureS); } if (v != 27 && v != 28) { return (address(0), RecoverError.InvalidSignatureV); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256( abi.encodePacked("\x19Ethereum Signed Message:\n32", hash) ); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256( abi.encodePacked("\x19\x01", domainSeparator, structHash) ); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Ownable.sol"; import "../../utils/Strings.sol"; import "../../utils/ERC165.sol"; import "../../utils/IERC2981.sol"; error ApprovalCallerNotOwnerNorApproved(); error ApproveToCaller(); error ApprovalToCurrentOwner(); error BalanceQueryForZeroAddress(); error InvalidBatchAmount(); error MintToZeroAddress(); error MintExistingToken(); error TransferCallerNotOwnerNorApproved(); error TransferFromIncorrectOwner(); error TransferToNonERC721ReceiverImplementer(); error TransferToZeroAddress(); error QueryForNonexistentToken(); /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. * * This implementation also follows the EIP-2981 royalty standard and the Ownable standard. */ contract ERC721 is Ownable, ERC165, IERC721, IERC721Metadata, IERC2981 { using Address for address; using Strings for uint256; // Compiler will pack this into a single 256bit word. struct AddressData { // Realistically, 2**64-1 is more than enough. uint64 balance; // Keeps track of mint count with minimal overhead for tokenomics. uint64 numberMinted; // Keeps track of burn count with minimal overhead for tokenomics. uint64 numberBurned; // For miscellaneous variable(s) pertaining to the address // (e.g. number of whitelist mint slots used). // If there are multiple variables, please pack them into a uint64. uint64 aux; } // Constant used to help calculate royalties uint256 private constant MAX_BPS = 10000; // Percent of sale in basis points set for royalties uint256 private royaltyBPS; // Address royalties get sent to address private royaltyWallet; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) internal _owners; // Mapping owner address to token count mapping(address => AddressData) internal _addressData; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => 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 || interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId); } /** * @dev see {IERC2981-supportsInterface} */ function royaltyInfo(uint256, uint256 _salePrice) external view returns (address receiver, uint256 royaltyAmount) { uint256 royalty = (_salePrice * royaltyBPS) / MAX_BPS; return (royaltyWallet, royalty); } function _setRoyaltyWallet(address wallet) internal { royaltyWallet = wallet; } /** * @dev Royalty is in Basis Points, and any number higher than the max gets defaulted * to the max. */ function _setRoyaltyBPS(uint256 newRoyalty) internal { if (newRoyalty > MAX_BPS) { royaltyBPS = MAX_BPS; } else { royaltyBPS = newRoyalty; } } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { if (owner == address(0)) revert BalanceQueryForZeroAddress(); return _addressData[owner].balance; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; if (!_exists(tokenId)) revert QueryForNonexistentToken(); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { _requireMinted(tokenId); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(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 override { address owner = ERC721.ownerOf(tokenId); if (to == owner) revert ApprovalToCurrentOwner(); if (_msgSender() != owner && !isApprovedForAll(owner, _msgSender())) { revert ApprovalCallerNotOwnerNorApproved(); } _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { _requireMinted(tokenId); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { if (!_isApprovedOrOwner(_msgSender(), tokenId)) { revert TransferCallerNotOwnerNorApproved(); } _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory data ) public virtual override { if (!_isApprovedOrOwner(_msgSender(), tokenId)) { revert TransferCallerNotOwnerNorApproved(); } _safeTransfer(from, to, tokenId, data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol 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 equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - 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, bytes memory data ) internal virtual { _transfer(from, to, tokenId); _checkOnERC721Received(from, to, tokenId, data); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { address owner = ERC721.ownerOf(tokenId); return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * 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 virtual { _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 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 virtual { if (to == address(0)) revert MintToZeroAddress(); if (_exists(tokenId)) revert MintExistingToken(); _beforeTokenTransfer(address(0), to, tokenId); _addressData[to].balance += 1; _addressData[to].numberMinted += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _addressData[owner].balance -= 1; _addressData[owner].numberBurned += 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); _afterTokenTransfer(owner, address(0), 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 virtual { if (ERC721.ownerOf(tokenId) != from) { revert TransferFromIncorrectOwner(); } if (to == address(0)) revert TransferToZeroAddress(); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner delete _tokenApprovals[tokenId]; _addressData[from].balance -= 1; _addressData[to].balance += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits an {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits an {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { if (owner == operator) revert ApproveToCaller(); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Reverts if the `tokenId` has not been minted yet. */ function _requireMinted(uint256 tokenId) internal view virtual { if (!_exists(tokenId)) revert QueryForNonexistentToken(); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * 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.isContract()) { return; } try IERC721Receiver(to).onERC721Received( _msgSender(), from, tokenId, data ) returns (bytes4 retval) { if (retval != IERC721Receiver.onERC721Received.selector) { revert TransferToNonERC721ReceiverImplementer(); } } catch (bytes memory reason) { if (reason.length == 0) { revert TransferToNonERC721ReceiverImplementer(); } else { /// @solidity memory-safe-assembly assembly { revert(add(32, reason), mload(reason)) } } } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/IERC165.sol"; /** * @dev Required interface of an ERC721 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 ERC721 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: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * 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 caller. * * 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 v4.6.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 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 v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../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 v4.7.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { 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_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); 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); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 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); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "./IERC165.sol"; /** * @dev Interface for the NFT Royalty Standard */ interface IERC2981 is IERC165 { /** * ERC165 bytes to add to interface array - set in parent contract * implementing this standard * * bytes4(keccak256("royaltyInfo(uint256,uint256)")) == 0x2a55205a * bytes4 private constant _INTERFACE_ID_ERC2981 = 0x2a55205a; * _registerInterface(_INTERFACE_ID_ERC2981); */ /** * @notice Called with the sale price to determine how much royalty * is owed and to whom. * @param _tokenId - the NFT asset queried for royalty information * @param _salePrice - the sale price of the NFT asset specified by _tokenId * @return receiver - address of who should be sent the royalty payment * @return royaltyAmount - the royalty payment amount for _salePrice */ function royaltyInfo(uint256 _tokenId, uint256 _salePrice) external view returns (address receiver, uint256 royaltyAmount); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @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; } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"string","name":"_tokenDirectory","type":"string"},{"internalType":"address","name":"_sourceAddress","type":"address"},{"internalType":"uint256","name":"royalty","type":"uint256"},{"internalType":"address","name":"royaltyWallet","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalToCurrentOwner","type":"error"},{"inputs":[],"name":"ApproveToCaller","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"CallerNotOwner","type":"error"},{"inputs":[],"name":"IndexOverOwnerBalance","type":"error"},{"inputs":[],"name":"InvalidMintCaller","type":"error"},{"inputs":[],"name":"InvalidRange","type":"error"},{"inputs":[],"name":"MethodDisabled","type":"error"},{"inputs":[],"name":"MintExistingToken","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"OverTokenLimit","type":"error"},{"inputs":[],"name":"OwnerNotZero","type":"error"},{"inputs":[],"name":"QueryForNonexistentToken","type":"error"},{"inputs":[],"name":"QueryForZeroAddress","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","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":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","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"},{"inputs":[],"name":"MAX_TOKENS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":[{"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":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"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":[{"internalType":"address","name":"claimer","type":"address"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mintSourceAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","type":"uint256"}],"stateMutability":"view","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":"string","name":"_tokenDirectory","type":"string"}],"name":"setTokenDirectory","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":"","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenDirectory","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"owner","type":"address"}],"name":"tokensOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"royaltyBPS","type":"uint256"},{"internalType":"address","name":"royaltyWallet","type":"address"}],"name":"updateRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b506040516200206f3803806200206f833981016040819052620000349162000328565b85856200004133620000e0565b81516200005690600390602085019062000198565b5080516200006c90600490602084019062000198565b50508451620000849150605190602087019062000198565b50600b80546001600160a01b0319166001600160a01b038516179055620000ab8262000130565b600280546001600160a01b0319166001600160a01b038316179055620000d46001604562000149565b50505050505062000424565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b612710811115620001445761271060015550565b600155565b6009546001600160801b03600160801b82048116911611156200017f5760405163561ce9bb60e01b815260040160405180910390fd5b6001600160801b03908116600160801b02911617600955565b828054620001a690620003e7565b90600052602060002090601f016020900481019282620001ca576000855562000215565b82601f10620001e557805160ff191683800117855562000215565b8280016001018555821562000215579182015b8281111562000215578251825591602001919060010190620001f8565b506200022392915062000227565b5090565b5b8082111562000223576000815560010162000228565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200026657600080fd5b81516001600160401b03808211156200028357620002836200023e565b604051601f8301601f19908116603f01168101908282118183101715620002ae57620002ae6200023e565b81604052838152602092508683858801011115620002cb57600080fd5b600091505b83821015620002ef5785820183015181830184015290820190620002d0565b83821115620003015760008385830101525b9695505050505050565b80516001600160a01b03811681146200032357600080fd5b919050565b60008060008060008060c087890312156200034257600080fd5b86516001600160401b03808211156200035a57600080fd5b620003688a838b0162000254565b975060208901519150808211156200037f57600080fd5b6200038d8a838b0162000254565b96506040890151915080821115620003a457600080fd5b50620003b389828a0162000254565b945050620003c4606088016200030b565b925060808701519150620003db60a088016200030b565b90509295509295509295565b600181811c90821680620003fc57607f821691505b602082108114156200041e57634e487b7160e01b600052602260045260246000fd5b50919050565b611c3b80620004346000396000f3fe608060405234801561001057600080fd5b50600436106101a95760003560e01c80636a627842116100f95780639d6335d711610097578063c87b56dd11610071578063c87b56dd1461039c578063e985e9c5146103af578063f2fde38b146103eb578063f47c84c5146103fe57600080fd5b80639d6335d714610363578063a22cb46514610376578063b88d4fde1461038957600080fd5b8063835b9453116100d3578063835b9453146103175780638462151c1461032a5780638da5cb5b1461034a57806395d89b411461035b57600080fd5b80636a627842146102e957806370a08231146102fc578063715018a61461030f57600080fd5b80632a55205a1161016657806342842e0e1161014057806342842e0e146102a85780634f6ccce7146102bb5780636352211e146102ce57806364143b08146102e157600080fd5b80632a55205a146102505780632efb190f146102825780632f745c591461029557600080fd5b806301ffc9a7146101ae57806306fdde03146101d6578063081812fc146101eb578063095ea7b31461021657806318160ddd1461022b57806323b872dd1461023d575b600080fd5b6101c16101bc3660046115b1565b610406565b60405190151581526020015b60405180910390f35b6101de610431565b6040516101cd9190611626565b6101fe6101f9366004611639565b6104c3565b6040516001600160a01b0390911681526020016101cd565b61022961022436600461166e565b6104ea565b005b600a545b6040519081526020016101cd565b61022961024b366004611698565b610577565b61026361025e3660046116d4565b6105a9565b604080516001600160a01b0390931683526020830191909152016101cd565b600b546101fe906001600160a01b031681565b61022f6102a336600461166e565b6105e0565b6102296102b6366004611698565b6106fb565b61022f6102c9366004611639565b610716565b6101fe6102dc366004611639565b610731565b6101de610767565b6102296102f73660046116f6565b6107f5565b61022f61030a3660046116f6565b61085e565b6102296108ac565b61022961032536600461179c565b6108c0565b61033d6103383660046116f6565b6108df565b6040516101cd91906117e4565b6000546001600160a01b03166101fe565b6101de610a1c565b610229610371366004611828565b610a2b565b610229610384366004611854565b610a5b565b610229610397366004611890565b610a66565b6101de6103aa366004611639565b610a9f565b6101c16103bd36600461190b565b6001600160a01b03918216600090815260086020908152604080832093909416825291909152205460ff1690565b6102296103f93660046116f6565b610b09565b61022f604581565b60006001600160e01b0319821663780e9d6360e01b148061042b575061042b82610b41565b92915050565b60606003805461044090611935565b80601f016020809104026020016040519081016040528092919081815260200182805461046c90611935565b80156104b95780601f1061048e576101008083540402835291602001916104b9565b820191906000526020600020905b81548152906001019060200180831161049c57829003601f168201915b5050505050905090565b60006104ce82610bac565b506000908152600760205260409020546001600160a01b031690565b60006104f582610731565b9050806001600160a01b0316836001600160a01b0316141561052a5760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b0382161480159061054a575061054881336103bd565b155b15610568576040516367d9dca160e11b815260040160405180910390fd5b6105728383610be1565b505050565b6105813382610c4f565b61059e57604051632ce44b5f60e11b815260040160405180910390fd5b610572838383610cce565b6000806000612710600154856105bf9190611986565b6105c991906119bb565b6002546001600160a01b0316969095509350505050565b60006105eb8361085e565b821061060a576040516355c65cdf60e01b815260040160405180910390fd5b6001600160a01b0383166106315760405163197ce4cd60e31b815260040160405180910390fd5b600954600160801b90046001600160801b03166106615760405163989aff9960e01b815260040160405180910390fd5b6009546000906001600160801b03165b600954600160801b90046001600160801b031681116106e1576000818152600560205260409020546001600160a01b039081169086168114156106ce57848314156106c05750915061042b9050565b826106ca816119cf565b9350505b50806106d9816119cf565b915050610671565b506040516355c65cdf60e01b815260040160405180910390fd5b61057283838360405180602001604052806000815250610a66565b600060405163989aff9960e01b815260040160405180910390fd5b6000818152600560205260408120546001600160a01b03168061042b57604051636c01c8cf60e11b815260040160405180910390fd5b6051805461077490611935565b80601f01602080910402602001604051908101604052809291908181526020018280546107a090611935565b80156107ed5780601f106107c2576101008083540402835291602001916107ed565b820191906000526020600020905b8154815290600101906020018083116107d057829003601f168201915b505050505081565b600b546001600160a01b0316336001600160a01b03161461082957604051635f31c44960e01b815260040160405180910390fd5b610831610e51565b600a5410610852576040516305aab8d960e41b815260040160405180910390fd5b61085b81610e8d565b50565b60006001600160a01b038216610887576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600660205260409020546001600160401b031690565b6108b4610f70565b6108be6000610f9b565b565b6108c8610f70565b80516108db906051906020840190611502565b5050565b60606001600160a01b0382166109085760405163197ce4cd60e31b815260040160405180910390fd5b600954600160801b90046001600160801b03166109385760405163989aff9960e01b815260040160405180910390fd5b60006109438361085e565b6001600160401b0381111561095a5761095a611711565b604051908082528060200260200182016040528015610983578160200160208202803683370190505b506009549091506000906001600160801b03165b600954600160801b90046001600160801b03168111610a13576000818152600560205260409020546001600160a01b03908116908616811415610a0057818484815181106109e7576109e76119ea565b6020908102919091010152826109fc816119cf565b9350505b5080610a0b816119cf565b915050610997565b50909392505050565b60606004805461044090611935565b610a33610f70565b610a3c82610feb565b600280546001600160a01b0319166001600160a01b0383161790555050565b6108db338383611003565b610a703383610c4f565b610a8d57604051632ce44b5f60e11b815260040160405180910390fd5b610a99848484846110a3565b50505050565b6000818152600560205260409020546060906001600160a01b0316610ad757604051636c01c8cf60e11b815260040160405180910390fd5b6051610ae2836110ba565b604051602001610af3929190611a1c565b6040516020818303038152906040529050919050565b610b11610f70565b6001600160a01b038116610b385760405163513027b560e11b815260040160405180910390fd5b61085b81610f9b565b60006001600160e01b031982166380ac58cd60e01b1480610b7257506001600160e01b03198216635b5e139f60e01b145b80610b8d57506001600160e01b0319821663152a902d60e11b145b8061042b57506301ffc9a760e01b6001600160e01b031983161461042b565b6000818152600560205260409020546001600160a01b031661085b57604051636c01c8cf60e11b815260040160405180910390fd5b600081815260076020526040902080546001600160a01b0319166001600160a01b0384169081179091558190610c1682610731565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600080610c5b83610731565b9050806001600160a01b0316846001600160a01b03161480610ca257506001600160a01b0380821660009081526008602090815260408083209388168352929052205460ff165b80610cc65750836001600160a01b0316610cbb846104c3565b6001600160a01b0316145b949350505050565b826001600160a01b0316610ce182610731565b6001600160a01b031614610d075760405162a1148160e81b815260040160405180910390fd5b6001600160a01b038216610d2e57604051633a954ecd60e21b815260040160405180910390fd5b610d398383836111b7565b600081815260076020908152604080832080546001600160a01b03191690556001600160a01b038616835260069091528120805460019290610d859084906001600160401b0316611ad3565b82546101009290920a6001600160401b038181021990931691831602179091556001600160a01b03841660009081526006602052604081208054600194509092610dd191859116611afb565b82546001600160401b039182166101009390930a92830291909202199091161790555060008181526005602052604080822080546001600160a01b038087166001600160a01b0319909216821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600954600090610e74906001600160801b0380821691600160801b900416611b26565b610e7f906001611b46565b6001600160801b0316905090565b6000610e98600a5490565b610ea0610e51565b610eaa9190611b68565b90506000610eb782611209565b90506000600c8260458110610ece57610ece6119ea565b01549050600081610ee0575081610ee3565b50805b6000600c610ef2600187611b68565b60458110610f0257610f026119ea565b0154905080610f3057610f16600186611b68565b600c8560458110610f2957610f296119ea565b0155610f47565b80600c8560458110610f4457610f446119ea565b01555b600954610f68908790610f63906001600160801b031685611b7f565b61126d565b505050505050565b6000546001600160a01b031633146108be57604051632e6c18c960e11b815260040160405180910390fd5b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b612710811115610ffe5761271060015550565b600155565b816001600160a01b0316836001600160a01b031614156110365760405163b06307db60e01b815260040160405180910390fd5b6001600160a01b03838116600081815260086020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6110ae848484610cce565b610a99848484846113df565b6060816110de5750506040805180820190915260018152600360fc1b602082015290565b8160005b811561110857806110f2816119cf565b91506111019050600a836119bb565b91506110e2565b6000816001600160401b0381111561112257611122611711565b6040519080825280601f01601f19166020018201604052801561114c576020820181803683370190505b5090505b8415610cc657611161600183611b68565b915061116e600a86611b97565b611179906030611b7f565b60f81b81838151811061118e5761118e6119ea565b60200101906001600160f81b031916908160001a9053506111b0600a866119bb565b9450611150565b6001600160a01b0383166111de576001600a60008282546111d89190611b7f565b90915550505b6001600160a01b038216610572576001600a60008282546111ff9190611b68565b9091555050505050565b60008033444261121a600143611b68565b604080516001600160a01b039095166020860152840192909252606083015240608082015260a00160408051601f19818403018152919052805160209091012090506112668382611b97565b9392505050565b6001600160a01b03821661129357604051622e076360e81b815260040160405180910390fd5b6000818152600560205260409020546001600160a01b0316156112c95760405163186a1c7360e11b815260040160405180910390fd5b6112d5600083836111b7565b6001600160a01b03821660009081526006602052604081208054600192906113079084906001600160401b0316611afb565b82546101009290920a6001600160401b038181021990931691831602179091556001600160a01b0384166000908152600660205260409020805460019350909160089161136291859168010000000000000000900416611afb565b82546001600160401b039182166101009390930a92830291909202199091161790555060008181526005602052604080822080546001600160a01b0386166001600160a01b0319909116811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6001600160a01b0383163b6113f357610a99565b604051630a85bd0160e11b81526001600160a01b0384169063150b7a0290611425903390889087908790600401611bab565b602060405180830381600087803b15801561143f57600080fd5b505af192505050801561146f575060408051601f3d908101601f1916820190925261146c91810190611be8565b60015b6114ca573d80801561149d576040519150601f19603f3d011682016040523d82523d6000602084013e6114a2565b606091505b5080516114c2576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b03198116630a85bd0160e11b146114fb576040516368d2bf6b60e11b815260040160405180910390fd5b5050505050565b82805461150e90611935565b90600052602060002090601f0160209004810192826115305760008555611576565b82601f1061154957805160ff1916838001178555611576565b82800160010185558215611576579182015b8281111561157657825182559160200191906001019061155b565b50611582929150611586565b5090565b5b808211156115825760008155600101611587565b6001600160e01b03198116811461085b57600080fd5b6000602082840312156115c357600080fd5b81356112668161159b565b60005b838110156115e95781810151838201526020016115d1565b83811115610a995750506000910152565b600081518084526116128160208601602086016115ce565b601f01601f19169290920160200192915050565b60208152600061126660208301846115fa565b60006020828403121561164b57600080fd5b5035919050565b80356001600160a01b038116811461166957600080fd5b919050565b6000806040838503121561168157600080fd5b61168a83611652565b946020939093013593505050565b6000806000606084860312156116ad57600080fd5b6116b684611652565b92506116c460208501611652565b9150604084013590509250925092565b600080604083850312156116e757600080fd5b50508035926020909101359150565b60006020828403121561170857600080fd5b61126682611652565b634e487b7160e01b600052604160045260246000fd5b60006001600160401b038084111561174157611741611711565b604051601f8501601f19908116603f0116810190828211818310171561176957611769611711565b8160405280935085815286868601111561178257600080fd5b858560208301376000602087830101525050509392505050565b6000602082840312156117ae57600080fd5b81356001600160401b038111156117c457600080fd5b8201601f810184136117d557600080fd5b610cc684823560208401611727565b6020808252825182820181905260009190848201906040850190845b8181101561181c57835183529284019291840191600101611800565b50909695505050505050565b6000806040838503121561183b57600080fd5b8235915061184b60208401611652565b90509250929050565b6000806040838503121561186757600080fd5b61187083611652565b91506020830135801515811461188557600080fd5b809150509250929050565b600080600080608085870312156118a657600080fd5b6118af85611652565b93506118bd60208601611652565b92506040850135915060608501356001600160401b038111156118df57600080fd5b8501601f810187136118f057600080fd5b6118ff87823560208401611727565b91505092959194509250565b6000806040838503121561191e57600080fd5b61192783611652565b915061184b60208401611652565b600181811c9082168061194957607f821691505b6020821081141561196a57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156119a0576119a0611970565b500290565b634e487b7160e01b600052601260045260246000fd5b6000826119ca576119ca6119a5565b500490565b60006000198214156119e3576119e3611970565b5060010190565b634e487b7160e01b600052603260045260246000fd5b60008151611a128185602086016115ce565b9290920192915050565b600080845481600182811c915080831680611a3857607f831692505b6020808410821415611a5857634e487b7160e01b86526022600452602486fd5b818015611a6c5760018114611a7d57611aaa565b60ff19861689528489019650611aaa565b60008b81526020902060005b86811015611aa25781548b820152908501908301611a89565b505084890196505b505050505050611aca611ac482602f60f81b815260010190565b85611a00565b95945050505050565b60006001600160401b0383811690831681811015611af357611af3611970565b039392505050565b60006001600160401b03808316818516808303821115611b1d57611b1d611970565b01949350505050565b60006001600160801b0383811690831681811015611af357611af3611970565b60006001600160801b03808316818516808303821115611b1d57611b1d611970565b600082821015611b7a57611b7a611970565b500390565b60008219821115611b9257611b92611970565b500190565b600082611ba657611ba66119a5565b500690565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090611bde908301846115fa565b9695505050505050565b600060208284031215611bfa57600080fd5b81516112668161159b56fea264697066735822122032c7fac57af7000fe48fba6546566016d8231d665329af2e5c74f0243293ffe964736f6c6343000809003300000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000a55d6016065fd576e64f3081cd64e1dd3a0488da00000000000000000000000000000000000000000000000000000000000002b2000000000000000000000000118b9935cac62f0ddeb8f532afecc262fe7b7b6100000000000000000000000000000000000000000000000000000000000000174d696e696d656e436c7562202d204c6567656e6461727900000000000000000000000000000000000000000000000000000000000000000000000000000000034d4d4c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002e516d5a446a6750536632566f4c317544754137504533344d53434b79384c7036344568796d6b4c786f72674b6139000000000000000000000000000000000000
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101a95760003560e01c80636a627842116100f95780639d6335d711610097578063c87b56dd11610071578063c87b56dd1461039c578063e985e9c5146103af578063f2fde38b146103eb578063f47c84c5146103fe57600080fd5b80639d6335d714610363578063a22cb46514610376578063b88d4fde1461038957600080fd5b8063835b9453116100d3578063835b9453146103175780638462151c1461032a5780638da5cb5b1461034a57806395d89b411461035b57600080fd5b80636a627842146102e957806370a08231146102fc578063715018a61461030f57600080fd5b80632a55205a1161016657806342842e0e1161014057806342842e0e146102a85780634f6ccce7146102bb5780636352211e146102ce57806364143b08146102e157600080fd5b80632a55205a146102505780632efb190f146102825780632f745c591461029557600080fd5b806301ffc9a7146101ae57806306fdde03146101d6578063081812fc146101eb578063095ea7b31461021657806318160ddd1461022b57806323b872dd1461023d575b600080fd5b6101c16101bc3660046115b1565b610406565b60405190151581526020015b60405180910390f35b6101de610431565b6040516101cd9190611626565b6101fe6101f9366004611639565b6104c3565b6040516001600160a01b0390911681526020016101cd565b61022961022436600461166e565b6104ea565b005b600a545b6040519081526020016101cd565b61022961024b366004611698565b610577565b61026361025e3660046116d4565b6105a9565b604080516001600160a01b0390931683526020830191909152016101cd565b600b546101fe906001600160a01b031681565b61022f6102a336600461166e565b6105e0565b6102296102b6366004611698565b6106fb565b61022f6102c9366004611639565b610716565b6101fe6102dc366004611639565b610731565b6101de610767565b6102296102f73660046116f6565b6107f5565b61022f61030a3660046116f6565b61085e565b6102296108ac565b61022961032536600461179c565b6108c0565b61033d6103383660046116f6565b6108df565b6040516101cd91906117e4565b6000546001600160a01b03166101fe565b6101de610a1c565b610229610371366004611828565b610a2b565b610229610384366004611854565b610a5b565b610229610397366004611890565b610a66565b6101de6103aa366004611639565b610a9f565b6101c16103bd36600461190b565b6001600160a01b03918216600090815260086020908152604080832093909416825291909152205460ff1690565b6102296103f93660046116f6565b610b09565b61022f604581565b60006001600160e01b0319821663780e9d6360e01b148061042b575061042b82610b41565b92915050565b60606003805461044090611935565b80601f016020809104026020016040519081016040528092919081815260200182805461046c90611935565b80156104b95780601f1061048e576101008083540402835291602001916104b9565b820191906000526020600020905b81548152906001019060200180831161049c57829003601f168201915b5050505050905090565b60006104ce82610bac565b506000908152600760205260409020546001600160a01b031690565b60006104f582610731565b9050806001600160a01b0316836001600160a01b0316141561052a5760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b0382161480159061054a575061054881336103bd565b155b15610568576040516367d9dca160e11b815260040160405180910390fd5b6105728383610be1565b505050565b6105813382610c4f565b61059e57604051632ce44b5f60e11b815260040160405180910390fd5b610572838383610cce565b6000806000612710600154856105bf9190611986565b6105c991906119bb565b6002546001600160a01b0316969095509350505050565b60006105eb8361085e565b821061060a576040516355c65cdf60e01b815260040160405180910390fd5b6001600160a01b0383166106315760405163197ce4cd60e31b815260040160405180910390fd5b600954600160801b90046001600160801b03166106615760405163989aff9960e01b815260040160405180910390fd5b6009546000906001600160801b03165b600954600160801b90046001600160801b031681116106e1576000818152600560205260409020546001600160a01b039081169086168114156106ce57848314156106c05750915061042b9050565b826106ca816119cf565b9350505b50806106d9816119cf565b915050610671565b506040516355c65cdf60e01b815260040160405180910390fd5b61057283838360405180602001604052806000815250610a66565b600060405163989aff9960e01b815260040160405180910390fd5b6000818152600560205260408120546001600160a01b03168061042b57604051636c01c8cf60e11b815260040160405180910390fd5b6051805461077490611935565b80601f01602080910402602001604051908101604052809291908181526020018280546107a090611935565b80156107ed5780601f106107c2576101008083540402835291602001916107ed565b820191906000526020600020905b8154815290600101906020018083116107d057829003601f168201915b505050505081565b600b546001600160a01b0316336001600160a01b03161461082957604051635f31c44960e01b815260040160405180910390fd5b610831610e51565b600a5410610852576040516305aab8d960e41b815260040160405180910390fd5b61085b81610e8d565b50565b60006001600160a01b038216610887576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600660205260409020546001600160401b031690565b6108b4610f70565b6108be6000610f9b565b565b6108c8610f70565b80516108db906051906020840190611502565b5050565b60606001600160a01b0382166109085760405163197ce4cd60e31b815260040160405180910390fd5b600954600160801b90046001600160801b03166109385760405163989aff9960e01b815260040160405180910390fd5b60006109438361085e565b6001600160401b0381111561095a5761095a611711565b604051908082528060200260200182016040528015610983578160200160208202803683370190505b506009549091506000906001600160801b03165b600954600160801b90046001600160801b03168111610a13576000818152600560205260409020546001600160a01b03908116908616811415610a0057818484815181106109e7576109e76119ea565b6020908102919091010152826109fc816119cf565b9350505b5080610a0b816119cf565b915050610997565b50909392505050565b60606004805461044090611935565b610a33610f70565b610a3c82610feb565b600280546001600160a01b0319166001600160a01b0383161790555050565b6108db338383611003565b610a703383610c4f565b610a8d57604051632ce44b5f60e11b815260040160405180910390fd5b610a99848484846110a3565b50505050565b6000818152600560205260409020546060906001600160a01b0316610ad757604051636c01c8cf60e11b815260040160405180910390fd5b6051610ae2836110ba565b604051602001610af3929190611a1c565b6040516020818303038152906040529050919050565b610b11610f70565b6001600160a01b038116610b385760405163513027b560e11b815260040160405180910390fd5b61085b81610f9b565b60006001600160e01b031982166380ac58cd60e01b1480610b7257506001600160e01b03198216635b5e139f60e01b145b80610b8d57506001600160e01b0319821663152a902d60e11b145b8061042b57506301ffc9a760e01b6001600160e01b031983161461042b565b6000818152600560205260409020546001600160a01b031661085b57604051636c01c8cf60e11b815260040160405180910390fd5b600081815260076020526040902080546001600160a01b0319166001600160a01b0384169081179091558190610c1682610731565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600080610c5b83610731565b9050806001600160a01b0316846001600160a01b03161480610ca257506001600160a01b0380821660009081526008602090815260408083209388168352929052205460ff165b80610cc65750836001600160a01b0316610cbb846104c3565b6001600160a01b0316145b949350505050565b826001600160a01b0316610ce182610731565b6001600160a01b031614610d075760405162a1148160e81b815260040160405180910390fd5b6001600160a01b038216610d2e57604051633a954ecd60e21b815260040160405180910390fd5b610d398383836111b7565b600081815260076020908152604080832080546001600160a01b03191690556001600160a01b038616835260069091528120805460019290610d859084906001600160401b0316611ad3565b82546101009290920a6001600160401b038181021990931691831602179091556001600160a01b03841660009081526006602052604081208054600194509092610dd191859116611afb565b82546001600160401b039182166101009390930a92830291909202199091161790555060008181526005602052604080822080546001600160a01b038087166001600160a01b0319909216821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600954600090610e74906001600160801b0380821691600160801b900416611b26565b610e7f906001611b46565b6001600160801b0316905090565b6000610e98600a5490565b610ea0610e51565b610eaa9190611b68565b90506000610eb782611209565b90506000600c8260458110610ece57610ece6119ea565b01549050600081610ee0575081610ee3565b50805b6000600c610ef2600187611b68565b60458110610f0257610f026119ea565b0154905080610f3057610f16600186611b68565b600c8560458110610f2957610f296119ea565b0155610f47565b80600c8560458110610f4457610f446119ea565b01555b600954610f68908790610f63906001600160801b031685611b7f565b61126d565b505050505050565b6000546001600160a01b031633146108be57604051632e6c18c960e11b815260040160405180910390fd5b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b612710811115610ffe5761271060015550565b600155565b816001600160a01b0316836001600160a01b031614156110365760405163b06307db60e01b815260040160405180910390fd5b6001600160a01b03838116600081815260086020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6110ae848484610cce565b610a99848484846113df565b6060816110de5750506040805180820190915260018152600360fc1b602082015290565b8160005b811561110857806110f2816119cf565b91506111019050600a836119bb565b91506110e2565b6000816001600160401b0381111561112257611122611711565b6040519080825280601f01601f19166020018201604052801561114c576020820181803683370190505b5090505b8415610cc657611161600183611b68565b915061116e600a86611b97565b611179906030611b7f565b60f81b81838151811061118e5761118e6119ea565b60200101906001600160f81b031916908160001a9053506111b0600a866119bb565b9450611150565b6001600160a01b0383166111de576001600a60008282546111d89190611b7f565b90915550505b6001600160a01b038216610572576001600a60008282546111ff9190611b68565b9091555050505050565b60008033444261121a600143611b68565b604080516001600160a01b039095166020860152840192909252606083015240608082015260a00160408051601f19818403018152919052805160209091012090506112668382611b97565b9392505050565b6001600160a01b03821661129357604051622e076360e81b815260040160405180910390fd5b6000818152600560205260409020546001600160a01b0316156112c95760405163186a1c7360e11b815260040160405180910390fd5b6112d5600083836111b7565b6001600160a01b03821660009081526006602052604081208054600192906113079084906001600160401b0316611afb565b82546101009290920a6001600160401b038181021990931691831602179091556001600160a01b0384166000908152600660205260409020805460019350909160089161136291859168010000000000000000900416611afb565b82546001600160401b039182166101009390930a92830291909202199091161790555060008181526005602052604080822080546001600160a01b0386166001600160a01b0319909116811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6001600160a01b0383163b6113f357610a99565b604051630a85bd0160e11b81526001600160a01b0384169063150b7a0290611425903390889087908790600401611bab565b602060405180830381600087803b15801561143f57600080fd5b505af192505050801561146f575060408051601f3d908101601f1916820190925261146c91810190611be8565b60015b6114ca573d80801561149d576040519150601f19603f3d011682016040523d82523d6000602084013e6114a2565b606091505b5080516114c2576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b03198116630a85bd0160e11b146114fb576040516368d2bf6b60e11b815260040160405180910390fd5b5050505050565b82805461150e90611935565b90600052602060002090601f0160209004810192826115305760008555611576565b82601f1061154957805160ff1916838001178555611576565b82800160010185558215611576579182015b8281111561157657825182559160200191906001019061155b565b50611582929150611586565b5090565b5b808211156115825760008155600101611587565b6001600160e01b03198116811461085b57600080fd5b6000602082840312156115c357600080fd5b81356112668161159b565b60005b838110156115e95781810151838201526020016115d1565b83811115610a995750506000910152565b600081518084526116128160208601602086016115ce565b601f01601f19169290920160200192915050565b60208152600061126660208301846115fa565b60006020828403121561164b57600080fd5b5035919050565b80356001600160a01b038116811461166957600080fd5b919050565b6000806040838503121561168157600080fd5b61168a83611652565b946020939093013593505050565b6000806000606084860312156116ad57600080fd5b6116b684611652565b92506116c460208501611652565b9150604084013590509250925092565b600080604083850312156116e757600080fd5b50508035926020909101359150565b60006020828403121561170857600080fd5b61126682611652565b634e487b7160e01b600052604160045260246000fd5b60006001600160401b038084111561174157611741611711565b604051601f8501601f19908116603f0116810190828211818310171561176957611769611711565b8160405280935085815286868601111561178257600080fd5b858560208301376000602087830101525050509392505050565b6000602082840312156117ae57600080fd5b81356001600160401b038111156117c457600080fd5b8201601f810184136117d557600080fd5b610cc684823560208401611727565b6020808252825182820181905260009190848201906040850190845b8181101561181c57835183529284019291840191600101611800565b50909695505050505050565b6000806040838503121561183b57600080fd5b8235915061184b60208401611652565b90509250929050565b6000806040838503121561186757600080fd5b61187083611652565b91506020830135801515811461188557600080fd5b809150509250929050565b600080600080608085870312156118a657600080fd5b6118af85611652565b93506118bd60208601611652565b92506040850135915060608501356001600160401b038111156118df57600080fd5b8501601f810187136118f057600080fd5b6118ff87823560208401611727565b91505092959194509250565b6000806040838503121561191e57600080fd5b61192783611652565b915061184b60208401611652565b600181811c9082168061194957607f821691505b6020821081141561196a57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156119a0576119a0611970565b500290565b634e487b7160e01b600052601260045260246000fd5b6000826119ca576119ca6119a5565b500490565b60006000198214156119e3576119e3611970565b5060010190565b634e487b7160e01b600052603260045260246000fd5b60008151611a128185602086016115ce565b9290920192915050565b600080845481600182811c915080831680611a3857607f831692505b6020808410821415611a5857634e487b7160e01b86526022600452602486fd5b818015611a6c5760018114611a7d57611aaa565b60ff19861689528489019650611aaa565b60008b81526020902060005b86811015611aa25781548b820152908501908301611a89565b505084890196505b505050505050611aca611ac482602f60f81b815260010190565b85611a00565b95945050505050565b60006001600160401b0383811690831681811015611af357611af3611970565b039392505050565b60006001600160401b03808316818516808303821115611b1d57611b1d611970565b01949350505050565b60006001600160801b0383811690831681811015611af357611af3611970565b60006001600160801b03808316818516808303821115611b1d57611b1d611970565b600082821015611b7a57611b7a611970565b500390565b60008219821115611b9257611b92611970565b500190565b600082611ba657611ba66119a5565b500690565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090611bde908301846115fa565b9695505050505050565b600060208284031215611bfa57600080fd5b81516112668161159b56fea264697066735822122032c7fac57af7000fe48fba6546566016d8231d665329af2e5c74f0243293ffe964736f6c63430008090033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000a55d6016065fd576e64f3081cd64e1dd3a0488da00000000000000000000000000000000000000000000000000000000000002b2000000000000000000000000118b9935cac62f0ddeb8f532afecc262fe7b7b6100000000000000000000000000000000000000000000000000000000000000174d696e696d656e436c7562202d204c6567656e6461727900000000000000000000000000000000000000000000000000000000000000000000000000000000034d4d4c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002e516d5a446a6750536632566f4c317544754137504533344d53434b79384c7036344568796d6b4c786f72674b6139000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : name (string): MinimenClub - Legendary
Arg [1] : symbol (string): MML
Arg [2] : _tokenDirectory (string): QmZDjgPSf2VoL1uDuA7PE34MSCKy8Lp64EhymkLxorgKa9
Arg [3] : _sourceAddress (address): 0xa55d6016065FD576E64f3081cD64e1Dd3A0488da
Arg [4] : royalty (uint256): 690
Arg [5] : royaltyWallet (address): 0x118B9935Cac62F0dDEB8F532Afecc262fE7B7b61
-----Encoded View---------------
13 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000140
Arg [3] : 000000000000000000000000a55d6016065fd576e64f3081cd64e1dd3a0488da
Arg [4] : 00000000000000000000000000000000000000000000000000000000000002b2
Arg [5] : 000000000000000000000000118b9935cac62f0ddeb8f532afecc262fe7b7b61
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000017
Arg [7] : 4d696e696d656e436c7562202d204c6567656e64617279000000000000000000
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [9] : 4d4d4c0000000000000000000000000000000000000000000000000000000000
Arg [10] : 000000000000000000000000000000000000000000000000000000000000002e
Arg [11] : 516d5a446a6750536632566f4c317544754137504533344d53434b79384c7036
Arg [12] : 344568796d6b4c786f72674b6139000000000000000000000000000000000000
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.