Skip to main content

ILazyMint

Thirdweb's LazyMint is a contract extension for any base NFT contract. It lets you 'lazy mint' any number of NFTs at once. 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, 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}.
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(uint256 indexed startTokenId, uint256 endTokenId, string baseURI, bytes encryptedBaseURI)

Emitted when tokens are lazy minted.

Parameters

NameTypeDescription
startTokenId indexeduint256undefined
endTokenIduint256undefined
baseURIstringundefined
encryptedBaseURIbytesundefined