useEnglishAuctionsCount
Hook to get the total number of direct listings on a Marketplace V3 contract.
import { useEnglishAuctionsCount } from "@thirdweb-dev/react";
Usage
Provide your Marketplace V3 contract instance as an argument to the hook.
import { useEnglishAuctionsCount, useContract } from "@thirdweb-dev/react";
// Your smart contract address
const contractAddress = "{{contract_address}}";
function App() {
const { contract } = useContract(contractAddress, "marketplace-v3");
const {
data: englishAuctionsCount,
isLoading,
error,
} = useEnglishAuctionsCount(contract);
}
Return Value
The hook's data
property, once loaded, is a BigNumber
representing the number of direct listings on the Marketplace V3 contract.
BigNumber;