useEnglishAuctionWinningBid
Hook to get the winning bid for an English auction listing from a Marketplace V3 contract.
import { useEnglishAuctionWinningBid } from "@thirdweb-dev/react";
const { data, isLoading, error } = useEnglishAuctionWinningBid(
contract,
listingId,
);
Usage
Provide your Marketplace V3 contract instance and the listing ID as arguments to the hook.
import { useEnglishAuctionWinningBid, useContract } from "@thirdweb-dev/react";
// Your smart contract address
const contractAddress = "{{contract_address}}";
// The id of the auction listing you want to check
const listingId = "{{auction_id}}";
function App() {
const { contract } = useContract(contractAddress, "marketplace-v3");
const {
data: winningBid,
isLoading,
error,
} = useEnglishAuctionWinningBid(contract, listingId);
}