useAuctionWinner

Get the winner of an english auction

function useAuctionWinner(
  contract: RequiredParam<Marketplace | MarketplaceV3>,
  listingId: RequiredParam<BigNumberish>,
): UseQueryResult<string, unknown>;

Parameters


Returns

a response object that includes the address of the winner of the auction or undefined if there is no winner yet

type ReturnType = UseQueryResult<string, unknown>;

Example

const listingId = 0;
const {
  data: auctionWinner,
  isLoading,
  error,
} = useAuctionWinner(contract, listingId);