MetaplexAuctioneerProgram.cancel constructor
MetaplexAuctioneerProgram.cancel({
- required SolAddress auctionHouseProgram,
- required SolAddress listingConfig,
- required SolAddress seller,
- required SolAddress wallet,
- required SolAddress tokenAccount,
- required SolAddress tokenMint,
- required SolAddress authority,
- required SolAddress auctionHouse,
- required SolAddress auctionHouseFeeAccount,
- required SolAddress tradeState,
- required SolAddress auctioneerAuthority,
- required SolAddress ahAuctioneerPda,
- required MetaplexAuctioneerCancelLayout layout,
- SolAddress tokenProgramId = SPLTokenProgramConst.tokenProgramId,
Cancel a bid or ask by revoking the token delegate, transferring all lamports from the trade state account to the fee payer, and setting the trade state account data to zero so it can be garbage collected.
Implementation
factory MetaplexAuctioneerProgram.cancel(
{
/// Auction House Program
required SolAddress auctionHouseProgram,
/// The Listing Config used for listing settings
required SolAddress listingConfig,
/// The seller of the NFT
required SolAddress seller,
/// User wallet account.
required SolAddress wallet,
/// SPL token account containing the token of the sale to be canceled.
required SolAddress tokenAccount,
/// Token mint account of SPL token.
required SolAddress tokenMint,
/// Auction House instance authority account.
required SolAddress authority,
/// Auction House instance PDA account.
required SolAddress auctionHouse,
/// Auction House instance fee account.
required SolAddress auctionHouseFeeAccount,
/// Trade state PDA account representing the bid or ask to be canceled.
required SolAddress tradeState,
/// The auctioneer program PDA running this auction.
required SolAddress auctioneerAuthority,
/// The auctioneer PDA owned by Auction House storing scopes.
required SolAddress ahAuctioneerPda,
required MetaplexAuctioneerCancelLayout layout,
SolAddress tokenProgramId = SPLTokenProgramConst.tokenProgramId}) {
return MetaplexAuctioneerProgram(keys: [
auctionHouseProgram.toReadOnly(),
listingConfig.toWritable(),
seller.toReadOnly(),
wallet.toWritable(),
tokenAccount.toWritable(),
tokenMint.toReadOnly(),
authority.toReadOnly(),
auctionHouse.toReadOnly(),
auctionHouseFeeAccount.toWritable(),
tradeState.toWritable(),
auctioneerAuthority.toReadOnly(),
ahAuctioneerPda.toReadOnly(),
tokenProgramId.toReadOnly(),
], programId: MetaplexAuctioneerProgramConst.programId, layout: layout);
}