Function useMintNFTSupply

  • Beta

    Increase the supply of an existing NFT

    Parameters

    • contract: Erc1155<BaseERC1155 | BaseSignatureMintERC1155>

      an instance of a Erc1155

    Returns UseMutationResult<TransactionResultWithId, unknown, MintNFTSupplyParams, unknown>

    a mutation object that can be used to mint a more supply of a token id to the provided wallet

    Example

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

    if (error) {
    console.error("failed to mint additional supply", error);
    }

    return (
    <button
    disabled={isLoading}
    onClick={() => mintNftSupply({ tokenId: 0, additionalSupply: 100, to: "{{wallet_address}}"})}
    >
    Mint Additional Supply!
    </button>
    );
    };

    Twfeature

    ERC1155Mintable

    See

    Documentation

Generated using TypeDoc