ERC721Airdrop
Functionality available for contracts that implement the
ERC721Airdrop
extension.
Deploy an ERC721Airdrop
contract from the Explore page:
drop
Airdrop ERC721 tokens to multiple recipients.
// Airdrop content array, with recipients and tokenIds
const contents = [
{
recipient: "0xabc...", // first recipient address
tokenId: 0,
},
{
recipient: "0x123...", // second recipient address
tokenId: 2,
},
];
const tokenAddress = "0x..."; // Address of the ERC721 token being airdropped
const tokenOwner = "0x..."; // Address of the owner of the tokens being airdropped
const output = await contract.airdrop721.drop(
tokenAddress,
tokenOwner,
contents,
);
// the `output` return value above contains:
// - count of successful and failed drops
// - array containing failed drops, if any
Return Value
The drop
function returns an array of recipients for who the airdrop failed (empty means all transfers were successful).