ERC721LazyMintable
Functionality available for contracts that implement the
ERC721
and
LazyMint
extensions.
Allows you to lazy mint new batches of NFTs to be claimed in the future.
By default, the NFT metadata is uploaded and pinned to IPFS before lazy-minting. You can override this default behavior by providing a list of URLs as string
s
that point to valid metadata objects.
create_batch
Define a list of metadata objects that you want to lazy-mint.
from thirdweb.types.nft import NFTMetadataInput
# You can customize this metadata however you like
metadatas = [
NFTMetadataInput.from_json({
"name": "Cool NFT",
"description": "This is a cool NFT",
"image": open("path/to/file.jpg", "rb"),
}),
NFTMetadataInput.from_json({
"name": "Cooler NFT",
"description": "This is a cooler NFT",
"image": open("path/to/file.jpg", "rb"),
}),
]
txs = contract.erc721.create_batch(metadatas)
first_token_id = txs[0].id
first_nft = txs[0].data()