claimToBatch

This extension batches multiple claimTo extensions into one single multicall. Keep in mind that there is a limit of how many NFTs you can claim 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 { claimToBatch } from "thirdweb/extensions/erc721";
const transaction = claimToBatch({
contract: nftDropContract,
from: claimer.address, // address of the one calling this transaction
content: [
{ to: "0x...1", quantity: 1n },
{ to: "0x...2", quantity: 12n },
{ to: "0x...3", quantity: 2n },
],
});
function claimToBatch(

Parameters

the transaction options

Type

Returns

let returnType: PreparedTransaction<
any,
AbiFunction,
>;

A promise that resolves to the transaction result.