useWinningBid
Hook for getting the winning bid of an auction listing on a Marketplace contract.
import { useWinningBid } from "@thirdweb-dev/react";
const { data, isLoading, error } = useWinningBid(contract, listingId);
Usage
Provide your marketplace contract instance and the listing ID as arguments to the hook.
import { useContract, useWinningBid } from "@thirdweb-dev/react";
// Your marketplace contract address
const contractAddress = "{{contract_address}}";
// The listing ID to check
const listingId = "{{listing_id}}";
function App() {
const { contract } = useContract(contractAddress, "marketplace");
const { data, isLoading, error } = useWinningBid(contract, listingId);
}