ERC721BatchMintable
Functionality available for contracts that implement the
ERC721
,
ERC721Mintable
, and
Multicall
extensions.
Allows you to mint multiple NFTs at once to a wallet.
By default, the NFT metadata is uploaded and pinned to IPFS before minting. You can override this default behavior by providing an array of URLs as string
s
that point to valid metadata objects.
mint_batch_to
Mint multiple NFTs to a specified wallet address.
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"),
}),
]
# You can pass in any address here to mint the NFT to
txs = contract.erc721.mint_batch(metadatas)
receipt = txs[0].receipt
first_token_id = txs[0].id
first_nft = txs[0].data()