MarketplaceV3EnglishAuctions
Handles auctions
class MarketplaceV3EnglishAuctions< TContract extends EnglishAuctionsLogic,> implements DetectableFeature {}
function constructor( contractWrapper: ContractWrapper<TContract>,
Get all english auctions
const auctions = await contract.englishAuctions.getAll();
function getAll(
let returnType: { assetContractAddress: Address; bidBufferBps: bigint; buyoutBidAmount: bigint; creatorAddress: Address; currencyContractAddress: Address; endTimeInSeconds: bigint; id: bigint; minimumBidAmount: bigint; quantity: bigint; startTimeInSeconds: bigint; status: ListingStatus; timeBufferInSeconds: bigint; tokenId: bigint; type: "english-auction";};
The Auction object array
Get all valid english auctions
const auctions = await contract.englishAuctions.getAllValid();
function getAllValid(
let returnType: { assetContractAddress: Address; bidBufferBps: bigint; buyoutBidAmount: bigint; creatorAddress: Address; currencyContractAddress: Address; endTimeInSeconds: bigint; id: bigint; minimumBidAmount: bigint; quantity: bigint; startTimeInSeconds: bigint; status: ListingStatus; timeBufferInSeconds: bigint; tokenId: bigint; type: "english-auction";};
The Auction object array
Get a single english auction
const auctionId = 0;const auction = await contract.englishAuctions.getAuction(auctionId);
let returnType: { assetContractAddress: Address; bidBufferBps: bigint; buyoutBidAmount: bigint; creatorAddress: Address; currencyContractAddress: Address; endTimeInSeconds: bigint; id: bigint; minimumBidAmount: bigint; quantity: bigint; startTimeInSeconds: bigint; status: ListingStatus; timeBufferInSeconds: bigint; tokenId: bigint; type: "english-auction";};
The Auction object
Get the buffer for an english auction
// The ID of the auction you want to get the buffer forconst auctionId = "0";const buffer = await contract.englishAuctions.getBidBufferBps(auctionId);
function getBidBufferBps(auctionId: BigNumberish): Promise<number>;
Get the minimum next bid for an english auction
// The ID of the auction you want to get the minimum next bid forconst auctionId = "0";const minimumNextBid = await contract.englishAuctions.getMinimumNextBid(auctionId);
function getMinimumNextBid( auctionId: BigNumberish,): Promise<{ decimals: number; displayValue: string; name: string; symbol: string; value: BigNumber;}>;
Get the total number of english auctions
const totalAuctions = await contract.englishAuctions.getTotalCount();
function getTotalCount(): Promise<BigNumber>;
Get the winner for a specific english auction
Get the winner of the auction after an auction ends.
// The auction ID of a closed english auctionconst auctionId = 0;const auctionWinner = await contract.englishAuctions.getWinner(auctionId);
function getWinner(auctionId: BigNumberish): Promise<string>;
Get winning bid of an english auction
Get the current highest bid of an active auction.
// The ID of the auctionconst auctionId = 0;const winningBid = await contract.englishAuctions.getWinningBid(auctionId);
function getWinningBid( auctionId: BigNumberish,
Check if a bid is or will be a winning bid
const auctionId = 0;const bidAmount = 100;const isWinningBid = await contract.englishAuctions.isWinningBid( auctionId, bidAmount,);
function isWinningBid( auctionId: BigNumberish, bidAmount: BigNumberish,): Promise<boolean>;
function buyoutAuction(auctionId: BigNumberish): Promise<TResult>;
Preparable
You can also prepare the transaction without executing it by calling buyoutAuction.prepare()
with same arguments.Learn more
function cancelAuction(auctionId: BigNumberish): Promise<TResult>;
Preparable
You can also prepare the transaction without executing it by calling cancelAuction.prepare()
with same arguments.Learn more
function closeAuctionForBidder( auctionId: BigNumberish, closeFor: string,): Promise<TResult>;
Preparable
You can also prepare the transaction without executing it by calling closeAuctionForBidder.prepare()
with same arguments.Learn more
function closeAuctionForSeller( auctionId: BigNumberish,): Promise<TResult>;
Preparable
You can also prepare the transaction without executing it by calling closeAuctionForSeller.prepare()
with same arguments.Learn more
function createAuction(auction: { assetContractAddress: string; bidBufferBps?: string | number | bigint | BigNumber; buyoutBidAmount: string | number; currencyContractAddress?: string; endTimestamp?: number | Date; minimumBidAmount: string | number; quantity?: string | number | bigint | BigNumber; startTimestamp?: number | Date; timeBufferInSeconds?: string | number | bigint | BigNumber; tokenId: string | number | bigint | BigNumber;}): Promise<TResult>;
let auction: { assetContractAddress: string; bidBufferBps?: string | number | bigint | BigNumber; buyoutBidAmount: string | number; currencyContractAddress?: string; endTimestamp?: number | Date; minimumBidAmount: string | number; quantity?: string | number | bigint | BigNumber; startTimestamp?: number | Date; timeBufferInSeconds?: string | number | bigint | BigNumber; tokenId: string | number | bigint | BigNumber;};
Preparable
You can also prepare the transaction without executing it by calling createAuction.prepare()
with same arguments.Learn more
function createAuctionsBatch( listings: Array<{ assetContractAddress: string; bidBufferBps?: string | number | bigint | BigNumber; buyoutBidAmount: string | number; currencyContractAddress?: string; endTimestamp?: number | Date; minimumBidAmount: string | number; quantity?: string | number | bigint | BigNumber; startTimestamp?: number | Date; timeBufferInSeconds?: string | number | bigint | BigNumber; tokenId: string | number | bigint | BigNumber; }>,): Promise<TResult>;
let listings: Array<{ assetContractAddress: string; bidBufferBps?: string | number | bigint | BigNumber; buyoutBidAmount: string | number; currencyContractAddress?: string; endTimestamp?: number | Date; minimumBidAmount: string | number; quantity?: string | number | bigint | BigNumber; startTimestamp?: number | Date; timeBufferInSeconds?: string | number | bigint | BigNumber; tokenId: string | number | bigint | BigNumber;}>;
Preparable
You can also prepare the transaction without executing it by calling createAuctionsBatch.prepare()
with same arguments.Learn more
function executeSale(auctionId: BigNumberish): Promise<TResult>;
Preparable
You can also prepare the transaction without executing it by calling executeSale.prepare()
with same arguments.Learn more
function makeBid( auctionId: BigNumberish, bidAmount: string | number,): Promise<TResult>;
Preparable
You can also prepare the transaction without executing it by calling makeBid.prepare()
with same arguments.Learn more
let featureName: "EnglishAuctions";
let interceptor: ContractInterceptor<EnglishAuctionsLogic>;