generateAirdropSignatureERC1155

Generates the req and signature for sending ERC1155 airdrop.

Example

import {
airdropERC1155WithSignature,
generateAirdropSignatureERC1155,
} from "thirdweb/extensions/airdrop";
// list of recipients, tokenIds and amounts to airdrop for each recipient
const contents = [
{ recipient: "0x...", tokenId: 0, amount: 10n },
{ recipient: "0x...", tokenId: 0, amount: 15n },
{ recipient: "0x...", tokenId: 0, amount: 20n },
];
const { req, signature } = await generateAirdropSignatureERC1155({
account,
contract,
airdropRequest: {
tokenAddress: "0x...", // address of the ERC1155 token to airdrop
contents,
},
});
const transaction = airdropERC1155WithSignature({
contract,
req,
signature,
});
await sendTransaction({ transaction, account });

Parameters

Returns

A promise that resolves to the req and signature.