useClaimedNFTSupply

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

Available to use on contracts that implement ERC721Claimable .

Example

import {
useClaimedNFTSupply,
useContract,
} from "@thirdweb-dev/react";
function App() {
const { contract } = useContract(contractAddress);
const { data, isLoading } = useClaimedNFTSupply(contract);
}
function useClaimedNFTSupply(
contract: RequiredParam<
null | NFTDrop | SignatureDrop | SmartContract<BaseContract>
>,
): UseQueryResult<BigNumber, unknown>;

Parameters

Instance of a contract that extends the ERC721 spec (NFT drop, Signature Drop, or any custom contract that extends the ERC721 spec)

Type

let contract: RequiredParam<
null | NFTDrop | SignatureDrop | SmartContract<BaseContract>
>;

Returns

let returnType: UseQueryResult<BigNumber, unknown>;

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