Skip to main content

useClaimedNFTSupply

Hook for retrieving the total supply of NFTs claimed from an NFT Drop contract.

Available to use on contracts that implement ERC721Claimable.

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

const { data, isLoading, error } = useClaimedNFTSupply(contract);

Usage

Provide your NFT drop contract as the argument.

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

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

function App() {
const { contract } = useContract(contractAddress);
const { data: claimedTokens, isLoading } = useClaimedNFTSupply(contract);
}

Return Value

Return Value

The hook's data property, once loaded, is a BigNumber representing the total supply of NFTs claimed from the NFT drop contract so far.

BigNumber;