Skip to main content

ILazyMintWithTier

Thirdweb's LazyMintWithTier is a contract extension for any base NFT contract. It lets you 'lazy mint' any number of NFTs at once, for a particular tier. Here, 'lazy mint' means defining the metadata for particular tokenIds of your NFT contract, without actually minting a non-zero balance of NFTs of those tokenIds.

Methods

lazyMint

function lazyMint(uint256 amount, string baseURIForTokens, string tier, bytes extraData) external nonpayable returns (uint256 batchId)

Lazy mints a given amount of NFTs.

Parameters

NameTypeDescription
amountuint256The number of NFTs to lazy mint.
baseURIForTokensstringThe base URI for the 'n' number of NFTs being lazy minted, where the metadata for each of those NFTs is ${baseURIForTokens}/${tokenId}.
tierstringThe tier for which these tokens are being lazy mitned. Here, tier is a unique string label that is used to group together different batches of lazy minted tokens under a common category.
extraDatabytesAdditional bytes data to be used at the discretion of the consumer of the contract.

Returns

NameTypeDescription
batchIduint256A unique integer identifier for the batch of NFTs lazy minted together.

Events

TokensLazyMinted

event TokensLazyMinted(string indexed tier, uint256 indexed startTokenId, uint256 endTokenId, string baseURI, bytes encryptedBaseURI)

Emitted when tokens are lazy minted.

Parameters

NameTypeDescription
tier indexedstringundefined
startTokenId indexeduint256undefined
endTokenIduint256undefined
baseURIstringundefined
encryptedBaseURIbytesundefined