Skip to main content

ERC721 - Lazy Mint & Claim NFTs

You can utilize these features of the SDK on your contract if it implements LazyMint.

Batch Lazy-Mint NFTs

Batch upload NFT metadata to be lazy-minted to the contract.

You can provide metadata objects to have them uploaded and pinned to IPFS, or provide your own URLs.

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>
);
};

This snippet is for v3 of the SDK. Learn how to upgrade.

View in React SDK Documentation