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.

Example

import { useBatchesToReveal, useContract } from "@thirdweb-dev/react";
function App() {
const { contract } = useContract(contractAddress);
const {
data: batches,
isLoading,
error,
} = useBatchesToReveal(contract);
}

Parameters

Returns

The hook's data property, once loaded, contains an array of batches that need to be revealed.

Each batch is an object with the following properties:

{
batchId: BigNumber;
batchUri: string;
placeholderMetadata: NFTMetadata;
}