Skip to main content

ERC1155 - Claim

You can utilize these features of the SDK if your contract implements the ERC1155Claimable interface.

Claim A Lazy-Minted NFT

Claim the next available NFT(s) from the lazy minted batch.

Unless otherwise specified in your contract, the default is to claim the next available token IDs; starting from 0.

const address = "{{wallet_address}}"; // address of the wallet you want to claim the NFTs
const tokenId = 0; // the id of the NFT you want to claim
const quantity = 1; // how many NFTs you want to claim

const tx = await contract.erc1155.claimTo(address, tokenId, quantity);
const receipt = tx.receipt; // the transaction receipt

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

View in React SDK Documentation