Skip to main content

useUnclaimedNFTSupply

Hook for fetching the number of unclaimed NFTs from an NFT/Edition Drop contract.

Unclaimed NFTs are tokens that were lazy-minted but have not yet been claimed by a user.

Available to use on contracts that implement either the ERC721LazyMintable or ERC1155LazyMintable interfaces; such as the NFT Drop and Edition Drop contracts.

import { useUnclaimedNFTSupply } from "@thirdweb-dev/react";

Usage

Provide your drop contract from the useContract hook as the argument.

Returns the number of NFTs that are still unclaimed.

import { useUnclaimedNFTSupply, useContract } from "@thirdweb-dev/react";

// Your smart contract address
const contractAddress = "{{contract_address}}";

function App() {
const { contract } = useContract(contractAddress, "nftDrop");
const { data, isLoading, error } = useUnclaimedNFTSupply(contract);
}

Return Value

The hook's data property, once loaded, contains a BigNumber representing the number of unclaimed NFTs.

BigNumber;