Beta
an instance of a NFTContract
a mutation object that can be used to mint a new NFT token to the connected wallet
const Component = () => {
const { contract } = useContract("{{contract_address}}");
const {
mutate: mintNft,
isLoading,
error,
} = useMintNFT(contract);
if (error) {
console.error("failed to mint NFT", error);
}
return (
<button
disabled={isLoading}
onClick={() => mintNft({ name: "My awesome NFT!", to: "{{wallet_address}}" })}
>
Mint!
</button>
);
};
ERC721Mintable | ERC1155Mintable
Generated using TypeDoc
Mint an NFT to a specific wallet