• Beta

    Airdrop NFTs to a list of wallets

    Parameters

    • contract: Erc1155<BaseERC1155 | BaseSignatureMintERC1155>

      an instance of a Erc1155

    Returns UseMutationResult<Omit<{
        data: (() => Promise<unknown>);
        receipt: providers.TransactionReceipt;
    }, "data">, unknown, AirdropNFTParams, unknown>

    a mutation object that can be used to transfer batch NFTs

    Example

    const Component = () => {
    const { contract } = useContract("{{contract_address}}");
    const {
    mutate: airdropNFT,
    isLoading,
    error,
    } = useAirdropNFT(contract);

    if (error) {
    console.error("failed to transfer batch NFTs", error);
    }

    return (
    <button
    disabled={isLoading}
    onClick={() => airdropNFT({
    tokenId: 2,
    addresses: [
    { address: "{{wallet_address}}", quantity: 2 },
    { address: "{{wallet_address}}", quantity: 4 } }
    ]
    )}
    >
    Airdrop NFT
    </button>
    );
    };

    Twfeature

    ERC1155

    See

    Documentation

Generated using TypeDoc