useMinimumNextBid

Hook for getting the minimum value a bid must be to be valid in an auction listing on a Marketplace or MarketplaceV3 contract.

Takes into account the current highest bid, or the reserve price if there is no bid, and increments it by the bid buffer to calculate the minimum next bid.

Example

import { useContract, useMinimumNextBid } from "@thirdweb-dev/react";
function App() {
const { contract } = useContract(contractAddress, "marketplace");
const { data, isLoading, error } = useMinimumNextBid(
contract,
listingId,
);
}
function useMinimumNextBid(
contract: RequiredParam<Marketplace | MarketplaceV3>,
listingId: RequiredParam<BigNumberish>,
): UseQueryResult<
{
decimals: number;
displayValue: string;
name: string;
symbol: string;
value: BigNumber;
},
unknown
>;

Parameters

Instance of a marketplace contract

Type

let contract: RequiredParam<Marketplace | MarketplaceV3>;

The ID of the listing to get the minimum next bid for.

If the listing cannot be found, is not an auction listing, or is not active, the error property will be set.

Type

let listingId: RequiredParam<BigNumberish>;

Returns

let returnType: UseQueryResult<
{
decimals: number;
displayValue: string;
name: string;
symbol: string;
value: BigNumber;
},
unknown
>;

Query result object that includes the minimum next bid for the auction listing