Erc1155.airdrop() method
Airdrop multiple NFTs
Example
// The token ID of the NFT you want to airdrop
const tokenId = "0";
// Array of objects of addresses and quantities to airdrop NFTs to
const addresses = [
{
address: "0x...",
quantity: 2,
},
{
address: "0x...",
quantity: 3,
},
];
await contract.airdrop(tokenId, addresses);
// You can also pass an array of addresses, it will airdrop 1 NFT per address
const tokenId = "0";
const addresses = ["0x...", "0x...", "0x..."];
await contract.airdrop(tokenId, addresses);
Signature:
airdrop(tokenId: BigNumberish, addresses: AirdropInput, data?: BytesLike): Promise<TransactionResult>;
Parameters
Parameter | Type | Description |
---|---|---|
tokenId | BigNumberish | |
addresses | AirdropInput | |
data | BytesLike | (Optional) |
Returns:
Promise<TransactionResult>
Remarks
Airdrop one or multiple NFTs to the provided wallet addresses.