useAuctionWinner() function
This feature is currently in beta and may change based on feedback that we receive.
Use this to get the winner of an auction listing from your marketplace contract.
Example
const { data: auctionWinner, isLoading, error } = useAuctionWinner(<YourMarketplaceContractInstance>, <listingId>);
Signature:
export declare function useAuctionWinner(
contract: RequiredParam<Marketplace>,
listingId: RequiredParam<BigNumberish>,
): import("@tanstack/react-query").UseQueryResult<string | undefined, unknown>;
Parameters
Parameter | Type | Description |
---|---|---|
contract | RequiredParam<Marketplace> | an instance of a marketplace contract |
listingId | RequiredParam<BigNumberish> | the listing id to check |
Returns:
import("@tanstack/react-query").UseQueryResult<string | undefined, unknown>
a response object that includes the address of the winner of the auction or undefined if there is no winner yet