mintToBatch

This extension batches multiple mintTo extensions into one single multicall. Keep in mind that there is a limit of how many NFTs you can mint per transaction. This limit varies depends on the network that you are transacting on.

You are recommended to experiment with the number to figure out the best number for your chain of choice.

Example

import { mintBatchTo } from "thirdweb/extension/erc1155";
const transaction = mintToBatch({
contract: editionContract,
to: "0x...",
nfts: [
{
metadata: {
name: "Token #0",
image: "...",
attributes: [],
},
supply: 100n,
},
{
metadata: {
name: "Token #1",
image: "...",
attributes: [],
},
supply: 111n,
},
],
});
await sendTransaction({ transaction, account });
function mintToBatch(

Parameters

the transaction options

Type

Returns

let returnType: PreparedTransaction<
any,
AbiFunction,
>;

A promise that resolves to the transaction result.