useEnglishAuction
Hook to get an english auction listing from a Marketplace V3 contract.
Marketplace
Note: This hook is only for Marketplace V3 contracts.
For Marketplace contracts, use useListing instead.
import { useEnglishAuction } from "@thirdweb-dev/react";
const { data, isLoading, error } = useEnglishAuction(contract, listingId);
Usage
Provide your Marketplace V3 contract instance and the listing ID as arguments to the hook.
import { useEnglishAuction, useContract } from "@thirdweb-dev/react";
// Your smart contract address
const contractAddress = "{{contract_address}}";
// The auction id you want to check
const listingId = "{{auction_id}}";
function App() {
const { contract } = useContract(contractAddress, "marketplace-v3");
const {
data: englishAuction,
isLoading,
error,
} = useEnglishAuction(contract, listingId);
}