ERC-721
Overview
Max Total Supply
7 FD
Holders
2
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
4 FDLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Minimal Proxy Contract for 0xd3de35027a5c3dafae8f7a7d354eec22d4461cdd
Contract Name:
NFTCollection
Compiler Version
v0.8.25+commit.b61c2a91
Optimization Enabled:
Yes with 1337000 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT OR Apache-2.0pragma solidity ^0.8.18;// solhint-disable max-line-lengthimport { IERC165 } from "@openzeppelin/contracts/utils/introspection/IERC165.sol";import { IERC721Metadata } from "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol";import { INFTCollectionInitializer } from "../interfaces/internal/collections/INFTCollectionInitializer.sol";import { AddressUpgradeable } from "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol";import { ERC721BurnableUpgradeable } from "@openzeppelin/contracts-upgradeable-v5/token/ERC721/extensions/ERC721BurnableUpgradeable.sol";import { ERC721Upgradeable } from "@openzeppelin/contracts-upgradeable-v5/token/ERC721/ERC721Upgradeable.sol";import { Initializable } from "@openzeppelin/contracts-upgradeable-v5/proxy/utils/Initializable.sol";import { Ownable2StepUpgradeable } from "@openzeppelin/contracts-upgradeable-v5/access/Ownable2StepUpgradeable.sol";import "../mixins/shared/Constants.sol";import { AddressLibrary } from "../libraries/AddressLibrary.sol";import { CollectionRoyalties } from "../mixins/collections/CollectionRoyalties.sol";import { NFTCollectionType } from "../mixins/collections/NFTCollectionType.sol";import { SelfDestructibleCollection } from "../mixins/collections/SelfDestructibleCollection.sol";import { SequentialMintCollection } from "../mixins/collections/SequentialMintCollection.sol";import { StringsLibrary } from "../libraries/StringsLibrary.sol";import { TokenLimitedCollection } from "../mixins/collections/TokenLimitedCollection.sol";// solhint-enable max-line-lengtherror NFTCollection_Max_Token_Id_Has_Already_Been_Minted(uint256 maxTokenId);error NFTCollection_Token_CID_Already_Minted();
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable2Step.sol)pragma solidity ^0.8.20;import {OwnableUpgradeable} from "./OwnableUpgradeable.sol";import {Initializable} from "../proxy/utils/Initializable.sol";/*** @dev Contract module which provides access control mechanism, where* there is an account (an owner) that can be granted exclusive access to* specific functions.** The initial owner is specified at deployment time in the constructor for `Ownable`. This* can later be changed with {transferOwnership} and {acceptOwnership}.** This module is used through inheritance. It will make available all functions* from parent (Ownable).*/abstract contract Ownable2StepUpgradeable is Initializable, OwnableUpgradeable {/// @custom:storage-location erc7201:openzeppelin.storage.Ownable2Stepstruct Ownable2StepStorage {address _pendingOwner;}// keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Ownable2Step")) - 1)) & ~bytes32(uint256(0xff))
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)pragma solidity ^0.8.20;import {ContextUpgradeable} from "../utils/ContextUpgradeable.sol";import {Initializable} from "../proxy/utils/Initializable.sol";/*** @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.** The initial owner is set to the address provided by the deployer. 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 OwnableUpgradeable is Initializable, ContextUpgradeable {/// @custom:storage-location erc7201:openzeppelin.storage.Ownablestruct OwnableStorage {address _owner;}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v5.0.0) (proxy/utils/Initializable.sol)pragma solidity ^0.8.20;/*** @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed* behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an* external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer* function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.** The initialization functions use a version number. Once a version number is used, it is consumed and cannot be* reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in* case an upgrade adds a module that needs to be initialized.** For example:** [.hljs-theme-light.nopadding]* ```solidity* contract MyToken is ERC20Upgradeable {* function initialize() initializer public {* __ERC20_init("MyToken", "MTK");* }* }** contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/ERC721.sol)pragma solidity ^0.8.20;import {IERC721} from "@openzeppelin/contracts/token/ERC721/IERC721.sol";import {IERC721Receiver} from "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";import {IERC721Metadata} from "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol";import {ContextUpgradeable} from "../../utils/ContextUpgradeable.sol";import {Strings} from "@openzeppelin/contracts/utils/Strings.sol";import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol";import {ERC165Upgradeable} from "../../utils/introspection/ERC165Upgradeable.sol";import {IERC721Errors} from "@openzeppelin/contracts/interfaces/draft-IERC6093.sol";import {Initializable} from "../../proxy/utils/Initializable.sol";/*** @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}.*/abstract contract ERC721Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC721, IERC721Metadata, IERC721Errors {using Strings for uint256;/// @custom:storage-location erc7201:openzeppelin.storage.ERC721struct ERC721Storage {// Token name
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/extensions/ERC721Burnable.sol)pragma solidity ^0.8.20;import {ERC721Upgradeable} from "../ERC721Upgradeable.sol";import {ContextUpgradeable} from "../../../utils/ContextUpgradeable.sol";import {Initializable} from "../../../proxy/utils/Initializable.sol";/*** @title ERC721 Burnable Token* @dev ERC721 Token that can be burned (destroyed).*/abstract contract ERC721BurnableUpgradeable is Initializable, ContextUpgradeable, ERC721Upgradeable {function __ERC721Burnable_init() internal onlyInitializing {}function __ERC721Burnable_init_unchained() internal onlyInitializing {}/*** @dev Burns `tokenId`. See {ERC721-_burn}.** Requirements:** - The caller must own `tokenId` or be an approved operator.*/
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)pragma solidity ^0.8.20;import {Initializable} from "../proxy/utils/Initializable.sol";/*** @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 ContextUpgradeable is Initializable {function __Context_init() internal onlyInitializing {}function __Context_init_unchained() internal onlyInitializing {}function _msgSender() internal view virtual returns (address) {return msg.sender;}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol)pragma solidity ^0.8.20;import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol";import {Initializable} from "../../proxy/utils/Initializable.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);* }* ```*/abstract contract ERC165Upgradeable is Initializable, IERC165 {function __ERC165_init() internal onlyInitializing {}function __ERC165_init_unchained() internal onlyInitializing {}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)pragma solidity ^0.8.1;/*** @dev Collection of functions related to the address type*/library AddressUpgradeable {/*** @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** Furthermore, `isContract` will also return true if the target contract within
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol)pragma solidity ^0.8.20;/*** @dev Standard ERC20 Errors* Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens.*/interface IERC20Errors {/*** @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.* @param sender Address whose tokens are being transferred.* @param balance Current balance for the interacting account.* @param needed Minimum amount required to perform a transfer.*/error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);/*** @dev Indicates a failure with the token `sender`. Used in transfers.* @param sender Address whose tokens are being transferred.*/error ERC20InvalidSender(address sender);/*** @dev Indicates a failure with the token `receiver`. Used in transfers.* @param receiver Address to which tokens are being transferred.
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/extensions/IERC721Metadata.sol)pragma solidity ^0.8.20;import {IERC721} from "../IERC721.sol";/*** @title ERC-721 Non-Fungible Token Standard, optional metadata extension* @dev See https://eips.ethereum.org/EIPS/eip-721*/interface IERC721Metadata is IERC721 {/*** @dev Returns the token collection name.*/function name() external view returns (string memory);/*** @dev Returns the token collection symbol.*/function symbol() external view returns (string memory);/*** @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.*/function tokenURI(uint256 tokenId) external view returns (string memory);
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/IERC721.sol)pragma solidity ^0.8.20;import {IERC165} from "../../utils/introspection/IERC165.sol";/*** @dev Required interface of an 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);
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/IERC721Receiver.sol)pragma solidity ^0.8.20;/*** @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
12345678910111213141516171819202122232425// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)pragma solidity ^0.8.20;/*** @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);}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)pragma solidity ^0.8.20;/*** @dev Standard math utilities missing in the Solidity language.*/library Math {/*** @dev Muldiv operation overflow.*/error MathOverflowedMulDiv();enum Rounding {Floor, // Toward negative infinityCeil, // Toward positive infinityTrunc, // Toward zeroExpand // Away from zero}/*** @dev Returns the addition of two unsigned integers, with an overflow flag.*/function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {unchecked {
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol)pragma solidity ^0.8.20;/*** @dev Standard signed math utilities missing in the Solidity language.*/library SignedMath {/*** @dev Returns the largest of two signed numbers.*/function max(int256 a, int256 b) internal pure returns (int256) {return a > b ? a : b;}/*** @dev Returns the smallest of two signed numbers.*/function min(int256 a, int256 b) internal pure returns (int256) {return a < b ? a : b;}/*** @dev Returns the average of two signed numbers without overflow.* The result is rounded towards zero.
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v5.0.0) (utils/ShortStrings.sol)pragma solidity ^0.8.20;import {StorageSlot} from "./StorageSlot.sol";// | string | 0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA |// | length | 0x BB |type ShortString is bytes32;/*** @dev This library provides functions to convert short memory strings* into a `ShortString` type that can be used as an immutable variable.** Strings of arbitrary length can be optimized using this library if* they are short enough (up to 31 bytes) by packing them with their* length (1 byte) in a single EVM word (32 bytes). Additionally, a* fallback mechanism can be used for every other case.** Usage example:** ```solidity* contract Named {* using ShortStrings for *;*
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v5.0.0) (utils/StorageSlot.sol)// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.pragma solidity ^0.8.20;/*** @dev Library for reading and writing primitive types to specific storage slots.** Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.* This library helps with reading and writing to such slots without the need for inline assembly.** The functions in this library return Slot structs that contain a `value` member that can be used to read or write.** Example usage to set ERC1967 implementation slot:* ```solidity* contract ERC1967 {* bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;** function _getImplementation() internal view returns (address) {* return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;* }** function _setImplementation(address newImplementation) internal {* require(newImplementation.code.length > 0);* StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol)pragma solidity ^0.8.20;import {Math} from "./math/Math.sol";import {SignedMath} from "./math/SignedMath.sol";/*** @dev String operations.*/library Strings {bytes16 private constant HEX_DIGITS = "0123456789abcdef";uint8 private constant ADDRESS_LENGTH = 20;/*** @dev The `value` string doesn't fit in the specified `length`.*/error StringsInsufficientHexLength(uint256 value, uint256 length);/*** @dev Converts a `uint256` to its ASCII `string` decimal representation.*/function toString(uint256 value) internal pure returns (string memory) {unchecked {uint256 length = Math.log10(value) + 1;
1234567891011// SPDX-License-Identifier: MIT OR Apache-2.0pragma solidity ^0.8.18;/*** @title Declares the interface for initializing an NFTCollection contract.* @author batu-inal & HardlyDifficult*/interface INFTCollectionInitializer {function initialize(address payable _creator, string memory _name, string memory _symbol) external;}
123456789101112// SPDX-License-Identifier: MIT OR Apache-2.0pragma solidity ^0.8.18;/*** @title Declares the type of the collection contract.* @dev This interface is declared as an ERC-165 interface.* @author reggieag*/interface INFTCollectionType {function getNFTCollectionType() external view returns (string memory collectionType);}
12345678910111213141516171819202122232425// SPDX-License-Identifier: MIT OR Apache-2.0pragma solidity ^0.8.18;/*** @notice An interface for communicating fees to 3rd party marketplaces.* @dev Originally implemented in mainnet contract 0x44d6e8933f8271abcf253c72f9ed7e0e4c0323b3*/interface IGetFees {/*** @notice Get the recipient addresses to which creator royalties should be sent.* @dev The expected royalty amounts are communicated with `getFeeBps`.* @param tokenId The ID of the NFT to get royalties for.* @return recipients An array of addresses to which royalties should be sent.*/function getFeeRecipients(uint256 tokenId) external view returns (address payable[] memory recipients);/*** @notice Get the creator royalty amounts to be sent to each recipient, in basis points.* @dev The expected recipients are communicated with `getFeeRecipients`.* @param tokenId The ID of the NFT to get royalties for.* @return royaltiesInBasisPoints The array of fees to be sent to each recipient, in basis points.*/function getFeeBps(uint256 tokenId) external view returns (uint256[] memory royaltiesInBasisPoints);}
12345678910111213141516// SPDX-License-Identifier: MIT OR Apache-2.0pragma solidity ^0.8.18;interface IGetRoyalties {/*** @notice Get the creator royalties to be sent.* @dev The data is the same as when calling `getFeeRecipients` and `getFeeBps` separately.* @param tokenId The ID of the NFT to get royalties for.* @return recipients An array of addresses to which royalties should be sent.* @return royaltiesInBasisPoints The array of fees to be sent to each recipient, in basis points.*/function getRoyalties(uint256 tokenId) external view returns (address payable[] memory recipients, uint256[] memory royaltiesInBasisPoints);}
123456789101112131415161718192021// SPDX-License-Identifier: MIT OR Apache-2.0pragma solidity ^0.8.18;/*** @notice Interface for EIP-2981: NFT Royalty Standard.* For more see: https://eips.ethereum.org/EIPS/eip-2981.*/interface IRoyaltyInfo {/*** @notice Get the creator royalties to be sent.* @param tokenId The ID of the NFT to get royalties for.* @param salePrice The total price of the sale.* @return receiver The address to which royalties should be sent.* @return royaltyAmount The total amount that should be sent to the `receiver`.*/function royaltyInfo(uint256 tokenId,uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount);}
123456789101112// SPDX-License-Identifier: MIT OR Apache-2.0pragma solidity ^0.8.18;interface ITokenCreator {/*** @notice Returns the creator of this NFT collection.* @param tokenId The ID of the NFT to get the creator payment address for.* @return creator The creator of this collection.*/function tokenCreator(uint256 tokenId) external view returns (address payable creator);}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT OR Apache-2.0pragma solidity ^0.8.18;import { AddressUpgradeable } from "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol";struct CallWithoutValue {address target;bytes callData;}/*** @title A library for address helpers not already covered by the OZ library.* @author batu-inal & HardlyDifficult*/library AddressLibrary {using AddressUpgradeable for address;using AddressUpgradeable for address payable;error AddressLibrary_Proxy_Call_Did_Not_Return_A_Contract(address addressReturned);/*** @notice Calls an external contract with arbitrary data and parse the return value into an address.* @param externalContract The address of the contract to call.* @param callData The data to send to the contract.* @return contractAddress The address of the contract returned by the call.
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT OR Apache-2.0pragma solidity ^0.8.18;import { Strings } from "@openzeppelin/contracts/utils/Strings.sol";library StringsLibrary {using Strings for uint256;error StringsLibrary_Required_String_Is_Empty();/*** @notice Converts a number into a string and adds leading "0"s so the total string length matches `digitCount`.*/function padLeadingZeros(uint256 value, uint256 digitCount) internal pure returns (string memory paddedString) {paddedString = value.toString();for (uint256 i = bytes(paddedString).length; i < digitCount; ) {paddedString = string.concat("0", paddedString);unchecked {++i;}}}function validateStringNotEmpty(string memory str) internal pure {if (bytes(str).length == 0) {revert StringsLibrary_Required_String_Is_Empty();
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT OR Apache-2.0pragma solidity ^0.8.18;import "@openzeppelin/contracts-upgradeable-v5/utils/introspection/ERC165Upgradeable.sol";import "../../interfaces/standards/royalties/IGetFees.sol";import "../../interfaces/standards/royalties/IGetRoyalties.sol";import "../../interfaces/standards/royalties/IRoyaltyInfo.sol";import "../../interfaces/standards/royalties/ITokenCreator.sol";import "../shared/Constants.sol";/*** @title Defines various royalty APIs for broad marketplace support.* @author batu-inal & HardlyDifficult*/abstract contract CollectionRoyalties is IGetRoyalties, IGetFees, IRoyaltyInfo, ITokenCreator, ERC165Upgradeable {/*** @inheritdoc IGetFees*/function getFeeRecipients(uint256 tokenId) external view returns (address payable[] memory recipients) {recipients = new address payable[](1);recipients[0] = getTokenCreatorPaymentAddress(tokenId);}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT OR Apache-2.0pragma solidity ^0.8.18;import "@openzeppelin/contracts-upgradeable-v5/utils/introspection/ERC165Upgradeable.sol";import "@openzeppelin/contracts/utils/ShortStrings.sol";import "../../interfaces/internal/INFTCollectionType.sol";/*** @title A mixin to add the NFTCollectionType interface to a contract.* @author HardlyDifficult & reggieag*/abstract contract NFTCollectionType is INFTCollectionType {using ShortStrings for string;using ShortStrings for ShortString;ShortString private immutable _collectionTypeName;constructor(string memory collectionTypeName) {_collectionTypeName = collectionTypeName.toShortString();}/*** @notice Returns a name of the type of collection this contract represents.* @return collectionType The collection type.
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT OR Apache-2.0pragma solidity ^0.8.18;import { ContextUpgradeable } from "@openzeppelin/contracts-upgradeable-v5/utils/ContextUpgradeable.sol";/*** @title Allows the contract owner to signal that this contract should no longer be used.* @author HardlyDifficult* @dev It's understood that self destruct is no longer functional on-chain. This feature is still used to signal to the* app that a collection should be hidden.* This feature may be renamed in the future and may disable the contract instead, e.g. "brick contract".*/abstract contract SelfDestructibleCollection is ContextUpgradeable {/*** @notice Emitted when this collection is self destructed by the creator/owner/admin.* @param operator The account which requested this contract be self destructed.*/event SelfDestruct(address indexed operator);error SelfDestructibleCollection_Minted_NFTs_Must_Be_Burned_First(uint256 totalSupply);function totalSupply() public view virtual returns (uint256 supply);/*** @notice Allows the collection owner to signal that this contract should no longer be used only if no NFTs have been* minted yet or the minted NFTs have been burned.
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT OR Apache-2.0pragma solidity ^0.8.18;// solhint-disable max-line-lengthimport { ITokenCreator } from "../../interfaces/standards/royalties/ITokenCreator.sol";import { ERC721BurnableUpgradeable } from "@openzeppelin/contracts-upgradeable-v5/token/ERC721/extensions/ERC721BurnableUpgradeable.sol";import { Ownable2StepUpgradeable } from "@openzeppelin/contracts-upgradeable-v5/access/Ownable2StepUpgradeable.sol";// solhint-enable max-line-length/*** @title Extends the OZ ERC721 implementation for collections which mint sequential token IDs.* @author batu-inal & HardlyDifficult*/abstract contract SequentialMintCollection is ITokenCreator, Ownable2StepUpgradeable, ERC721BurnableUpgradeable {/*** @notice The tokenId of the most recently created NFT.* @dev Minting starts at tokenId 1. Each mint will use this value + 1.* @return The most recently minted tokenId, or 0 if no NFTs have been minted yet.*/uint32 public latestTokenId;/*** @notice Tracks how many tokens have been burned.* @dev This number is used to calculate the total supply efficiently.*/
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT OR Apache-2.0pragma solidity ^0.8.18;import "./SequentialMintCollection.sol";error TokenLimitedCollection_Max_Token_Id_May_Not_Be_Cleared(uint256 currentMaxTokenId);error TokenLimitedCollection_Max_Token_Id_May_Not_Increase(uint256 currentMaxTokenId);error TokenLimitedCollection_Max_Token_Id_Must_Be_Greater_Than_Current_Minted_Count(uint256 currentMintedCount);error TokenLimitedCollection_Max_Token_Id_Must_Not_Be_Zero();/*** @title Defines an upper limit on the number of tokens which may be minted by this collection.* @author HardlyDifficult*/abstract contract TokenLimitedCollection is SequentialMintCollection {/*** @notice The max tokenId which can be minted.* @dev This max may be less than the final `totalSupply` if 1 or more tokens were burned.* @return The max tokenId which can be minted.*/uint32 public maxTokenId;/*** @notice Emitted when the max tokenId supported by this collection is updated.* @param maxTokenId The new max tokenId. All NFTs in this collection will have a tokenId less than
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT OR Apache-2.0pragma solidity ^0.8.18;/// Constant values shared across mixins./// @dev 100% in basis points.uint256 constant BASIS_POINTS = 10_000;/// @dev The default admin role defined by OZ ACL modules.bytes32 constant DEFAULT_ADMIN_ROLE = 0x00;/// @dev The `role` type used to validate drop collections have granted this market access to mint.bytes32 constant MINTER_ROLE = keccak256("MINTER_ROLE");////////////////////////////////////////////////////////////////// Royalties & Take Rates/////////////////////////////////////////////////////////////////// @dev The max take rate a World can have.uint256 constant MAX_WORLD_TAKE_RATE = 5_000;/// @dev Cap the number of royalty recipients./// A cap is required to ensure gas costs are not too high when a sale is settled.uint256 constant MAX_ROYALTY_RECIPIENTS = 5;
1234567891011121314151617181920212223{"optimizer": {"enabled": true,"runs": 1337000},"outputSelection": {"*": {"*": ["evm.bytecode","evm.deployedBytecode","devdoc","userdoc","metadata","abi"]}},"evmVersion": "paris","metadata": {"useLiteralContent": true},"libraries": {}}
Contract ABI
API[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"addressReturned","type":"address"}],"name":"AddressLibrary_Proxy_Call_Did_Not_Return_A_Contract","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"owner","type":"address"}],"name":"ERC721IncorrectOwner","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ERC721InsufficientApproval","type":"error"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"name":"ERC721InvalidApprover","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"ERC721InvalidOperator","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"ERC721InvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC721InvalidReceiver","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"ERC721InvalidSender","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ERC721NonexistentToken","type":"error"},{"inputs":[],"name":"InvalidInitialization","type":"error"},{"inputs":[],"name":"InvalidShortString","type":"error"},{"inputs":[{"internalType":"uint256","name":"maxTokenId","type":"uint256"}],"name":"NFTCollection_Max_Token_Id_Has_Already_Been_Minted","type":"error"},{"inputs":[],"name":"NFTCollection_Token_CID_Already_Minted","type":"error"},{"inputs":[],"name":"NFTCollection_Token_Creator_Payment_Address_Required","type":"error"},{"inputs":[],"name":"NotInitializing","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[{"internalType":"uint256","name":"totalSupply","type":"uint256"}],"name":"SelfDestructibleCollection_Minted_NFTs_Must_Be_Burned_First","type":"error"},{"inputs":[{"internalType":"string","name":"str","type":"string"}],"name":"StringTooLong","type":"error"},{"inputs":[],"name":"StringsLibrary_Required_String_Is_Empty","type":"error"},{"inputs":[{"internalType":"uint256","name":"currentMaxTokenId","type":"uint256"}],"name":"TokenLimitedCollection_Max_Token_Id_May_Not_Be_Cleared","type":"error"},{"inputs":[{"internalType":"uint256","name":"currentMaxTokenId","type":"uint256"}],"name":"TokenLimitedCollection_Max_Token_Id_May_Not_Increase","type":"error"},{"inputs":[{"internalType":"uint256","name":"currentMintedCount","type":"uint256"}],"name":"TokenLimitedCollection_Max_Token_Id_Must_Be_Greater_Than_Current_Minted_Count","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":false,"internalType":"string","name":"baseURI","type":"string"}],"name":"BaseURIUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"version","type":"uint64"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"maxTokenId","type":"uint256"}],"name":"MaxTokenIdUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"creator","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"string","name":"indexedTokenCID","type":"string"},{"indexed":false,"internalType":"string","name":"tokenCID","type":"string"}],"name":"Minted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferStarted","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":"operator","type":"address"}],"name":"SelfDestruct","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"fromPaymentAddress","type":"address"},{"indexed":true,"internalType":"address","name":"toPaymentAddress","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"TokenCreatorPaymentAddressSet","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":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","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":[],"name":"baseURI","outputs":[{"internalType":"string","name":"uri","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"getFeeBps","outputs":[{"internalType":"uint256[]","name":"royaltiesInBasisPoints","type":"uint256[]"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getFeeRecipients","outputs":[{"internalType":"address payable[]","name":"recipients","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"tokenCID","type":"string"}],"name":"getHasMintedCID","outputs":[{"internalType":"bool","name":"hasBeenMinted","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getNFTCollectionType","outputs":[{"internalType":"string","name":"collectionType","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getRoyalties","outputs":[{"internalType":"address payable[]","name":"recipients","type":"address[]"},{"internalType":"uint256[]","name":"royaltiesInBasisPoints","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getTokenCreatorPaymentAddress","outputs":[{"internalType":"address payable","name":"creatorPaymentAddress","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"_creator","type":"address"},{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestTokenId","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxTokenId","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"tokenCID","type":"string"}],"name":"mint","outputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"tokenCID","type":"string"},{"internalType":"address","name":"operator","type":"address"}],"name":"mintAndApprove","outputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"tokenCID","type":"string"},{"internalType":"address payable","name":"tokenCreatorPaymentAddress","type":"address"}],"name":"mintWithCreatorPaymentAddress","outputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"tokenCID","type":"string"},{"internalType":"address payable","name":"tokenCreatorPaymentAddress","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"mintWithCreatorPaymentAddressAndApprove","outputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"tokenCID","type":"string"},{"internalType":"address","name":"paymentAddressFactory","type":"address"},{"internalType":"bytes","name":"paymentAddressCall","type":"bytes"}],"name":"mintWithCreatorPaymentFactory","outputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"tokenCID","type":"string"},{"internalType":"address","name":"paymentAddressFactory","type":"address"},{"internalType":"bytes","name":"paymentAddressCall","type":"bytes"},{"internalType":"address","name":"operator","type":"address"}],"name":"mintWithCreatorPaymentFactoryAndApprove","outputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"stateMutability":"nonpayable","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":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","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":[],"name":"selfDestruct","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"interfaceSupported","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":"tokenCreator","outputs":[{"internalType":"address payable","name":"creator","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"uri","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"supply","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":"string","name":"baseURIOverride","type":"string"}],"name":"updateBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"_maxTokenId","type":"uint32"}],"name":"updateMaxTokenId","outputs":[],"stateMutability":"nonpayable","type":"function"}]
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.