typescript-sdk

Home > @3rdweb/sdk > MarketplaceModule > getAuctionWinner

MarketplaceModule.getAuctionWinner() method

Get Auction Winner

Signature:

getAuctionWinner(listingId: BigNumberish): Promise<string>;

Parameters

Parameter Type Description
listingId BigNumberish  

Returns:

Promise<string>

Remarks

Get the winner of the auction after an auction ends.

Example

// The listing ID of the auction that closed
const listingId = 0;

module
  .getAuctionWinner(listingId)
  .then((auctionWinner) => console.log(auctionWinner))
  .catch((err) => console.error(err));