MetaplexAuctionHouseProgram.cancel constructor
MetaplexAuctionHouseProgram.cancel({
- required SolAddress wallet,
- required SolAddress tokenAccount,
- required SolAddress tokenMint,
- required SolAddress authority,
- required SolAddress auctionHouse,
- required SolAddress auctionHouseFeeAccount,
- required SolAddress tradeState,
- required MetaplexAuctionHouseCancelLayout layout,
- SolAddress tokenProgram = 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 MetaplexAuctionHouseProgram.cancel({
required SolAddress wallet,
required SolAddress tokenAccount,
required SolAddress tokenMint,
required SolAddress authority,
required SolAddress auctionHouse,
required SolAddress auctionHouseFeeAccount,
required SolAddress tradeState,
required MetaplexAuctionHouseCancelLayout layout,
SolAddress tokenProgram = SPLTokenProgramConst.tokenProgramId,
}) {
return MetaplexAuctionHouseProgram(keys: [
wallet.toWritable(),
tokenAccount.toWritable(),
tokenMint.toReadOnly(),
authority.toReadOnly(),
auctionHouse.toReadOnly(),
auctionHouseFeeAccount.toWritable(),
tradeState.toWritable(),
tokenProgram.toReadOnly(),
], programId: MetaplexAuctionHouseProgramConst.programId, layout: layout);
}