useBatchesToReveal
Hook for fetching batches of lazy-minted NFTs that were set to be revealed at a later date, but have not yet been revealed.
Available to use on contracts that implement the ERC721Revealable or ERC1155Revealable interfaces, such as the NFT Drop and Edition Drop smart contracts.
import { useBatchesToReveal } from "@thirdweb-dev/react";
const { data, isLoading, error } = useBatchesToReveal(contract);
Usage
Provide your NFT collection smart contract from the useContract
hook as the argument.
import { useBatchesToReveal, useContract } from "@thirdweb-dev/react";
// Your smart contract address
const contractAddress = "{{contract_address}}";
function App() {
// Contract must implement the Delayed reveal interface.
const { contract } = useContract(contractAddress);
const { data: batches, isLoading, error } = useBatchesToReveal(contract);
}