Skip to main content

ERC721LazyMintable

Functionality available for contracts that implement the IERC721 and ILazyMint interfaces.

Allows you to lazy mint new batches of NFTs to be claimed in the future.

By default, the NFT metadata is uploaded and pinned to IPFS before lazy-minting. You can override this default behavior by providing an array of URLs as strings that point to valid metadata objects.

lazyMint

Define an array of metadata objects that you want to lazy-mint.

// Custom metadata of the NFTs you want to mint.
const metadatas = [
{
name: "Cool NFT #1",
description: "This is a cool NFT",
image: "https://example.com/image.png", // URL, IPFS URI, or File object
// ... Any other metadata you want to include
},
{
name: "Cool NFT #2",
description: "This is a cool NFT",
image: "https://example.com/image.png", // URL, IPFS URI, or File object
// ... Any other metadata you want to include
},
];

const txResult = await contract.erc721.lazyMint(metadatas); // uploads and creates the NFTs on chain
Configuration

An array of metadata objects for the NFTs you want to mint.

Must be an array of objects that conform to the metadata standards. Alternatively, you can provide an array of strings that point to valid metadata objects, to override the default behavior of uploading and pinning the metadata to IPFS (shown below).

const metadatas = [
"https://example.com/metadata1.json",
"ipfs://my-ipfs-hash",
"https://some-other-url.com/metadata2.json",
];

const txResult = await contract.erc721.lazyMint(metadatas);