Skip to main content

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

metadataWithSupply

An array of objects that contain the metadata and supply of each NFT you want to mint.

The supply property is the number of this NFT you want to mint. Must be a string, number, bigint, or BigNumber.

The metadata object must follow the metadata standards. Alternatively, you can provide a strings that points to a valid metadata object to override the default behavior of uploading and pinning the metadata to IPFS (shown below).

const metadatas = [
{
metadata: "https://example.com/metadata1.json", // Any URI/URL that points to metadata
supply: 50,
},
{
metadata: "ipfs://my-ipfs-hash", // Any URI/URL that points to metadata
supply: 100,
},
];

const txResult = await contract.erc1155.mintBatch(metadatas);

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,
);
Configuration

toAddress

The address of the wallet you want to mint the NFT to.

Must be a string.

// Custom metadata and supplies of your NFTs
const metadataWithSupply = [
// ...
];

const txResult = await contract.erc1155.mintBatchTo(
"{{wallet_address}}",
metadataWithSupply,
);

metadataWithSupply

See mintBatch for more details.