useLazyMint
Lazy mint NFTs
Example
const Component = () => {
const { contract } = useContract("{{contract_address}}");
const {
mutate: lazyMint,
isLoading,
error,
} = useLazyMint(contract);
if (error) {
console.error("failed to lazy mint NFT", error);
}
return (
<button
disabled={isLoading}
onClick={() => lazyMint({ metadatas: [{ name: "My NFT!" }] })}
>
Lazy mint NFT!
</button>
);
};
Parameters
Returns
a mutation object that can be used to lazy mint a batch of NFTs