ERC1155BatchMintable
Functionality available for contracts that implement the
IERC1155Enumerable
,
IMintableERC1155
, and
IMulticall
interfaces.
Allows you to mint multiple NFTs at once to a wallet address.
By default, the NFT metadata is uploaded and pinned to IPFS before minting.
You can override this default behavior by providing a string as the metadata
property
that points to valid metadata object.
mintBatch
Mint many different NFTs with limited supplies to the connected wallet.
// Custom metadata and supplies of your NFTs
const metadataWithSupply = [
{
supply: 50, // The number of this NFT you want to mint
metadata: {
name: "Cool NFT #1",
description: "This is a cool NFT",
image: "https://example.com/image.png", // URL, IPFS URI, or File object
// ... Any other metadata you want to include
},
},
{
supply: 100, // The number of this NFT you want to mint
metadata: {
name: "Cool NFT #2",
description: "This is a cool NFT",
image: "https://example.com/image.png", // URL, IPFS URI, or File object
// ... Any other metadata you want to include
},
},
];
const txResult = await contract.erc1155.mintBatch(metadataWithSupply);
Configuration
mintBatchTo
The same as mintBatch
, but allows you to specify the wallet, rather than using the connected one.
// Address of the wallet you want to mint the NFT to
const toAddress = "{{wallet_address}}";
// Custom metadata and supplies of your NFTs
const metadataWithSupply = [
{
supply: 50, // The number of this NFT you want to mint
metadata: {
name: "Cool NFT #1",
description: "This is a cool NFT",
image: "https://example.com/image.png", // URL, IPFS URI, or File object
// ... Any other metadata you want to include
},
},
{
supply: 100, // The number of this NFT you want to mint
metadata: {
name: "Cool NFT #2",
description: "This is a cool NFT",
image: "https://example.com/image.png", // URL, IPFS URI, or File object
// ... Any other metadata you want to include
},
},
];
const txResult = await contract.erc1155.mintBatchTo(
toAddress,
metadataWithSupply,
);