MetaplexAuctionHouseProgram.executeSale constructor
MetaplexAuctionHouseProgram.executeSale({
- required SolAddress buyer,
- required SolAddress seller,
- required SolAddress tokenAccount,
- required SolAddress tokenMint,
- required SolAddress metadata,
- required SolAddress treasuryMint,
- required SolAddress escrowPaymentAccount,
- required SolAddress sellerPaymentReceiptAccount,
- required SolAddress buyerReceiptTokenAccount,
- required SolAddress authority,
- required SolAddress auctionHouse,
- required SolAddress auctionHouseFeeAccount,
- required SolAddress auctionHouseTreasury,
- required SolAddress buyerTradeState,
- required SolAddress sellerTradeState,
- required SolAddress freeTradeState,
- required SolAddress programAsSigner,
- required MetaplexAuctionHouseExecuteSaleLayout layout,
- SolAddress tokenProgram = SPLTokenProgramConst.tokenProgramId,
- SolAddress systemProgram = SystemProgramConst.programId,
- SolAddress rent = SystemProgramConst.sysvarRentPubkey,
- SolAddress ataProgram = AssociatedTokenAccountProgramConst.associatedTokenProgramId,
Implementation
factory MetaplexAuctionHouseProgram.executeSale(
{required SolAddress buyer,
required SolAddress seller,
required SolAddress tokenAccount,
required SolAddress tokenMint,
required SolAddress metadata,
required SolAddress treasuryMint,
required SolAddress escrowPaymentAccount,
required SolAddress sellerPaymentReceiptAccount,
required SolAddress buyerReceiptTokenAccount,
required SolAddress authority,
required SolAddress auctionHouse,
required SolAddress auctionHouseFeeAccount,
required SolAddress auctionHouseTreasury,
required SolAddress buyerTradeState,
required SolAddress sellerTradeState,
required SolAddress freeTradeState,
required SolAddress programAsSigner,
required MetaplexAuctionHouseExecuteSaleLayout layout,
SolAddress tokenProgram = SPLTokenProgramConst.tokenProgramId,
SolAddress systemProgram = SystemProgramConst.programId,
SolAddress rent = SystemProgramConst.sysvarRentPubkey,
SolAddress ataProgram =
AssociatedTokenAccountProgramConst.associatedTokenProgramId}) {
return MetaplexAuctionHouseProgram(keys: [
buyer.toWritable(),
seller.toWritable(),
tokenAccount.toWritable(),
tokenMint.toReadOnly(),
metadata.toReadOnly(),
treasuryMint.toReadOnly(),
escrowPaymentAccount.toWritable(),
sellerPaymentReceiptAccount.toWritable(),
buyerReceiptTokenAccount.toWritable(),
authority.toReadOnly(),
auctionHouse.toReadOnly(),
auctionHouseFeeAccount.toWritable(),
auctionHouseTreasury.toWritable(),
buyerTradeState.toWritable(),
sellerTradeState.toWritable(),
freeTradeState.toWritable(),
tokenProgram.toReadOnly(),
systemProgram.toReadOnly(),
ataProgram.toReadOnly(),
programAsSigner.toReadOnly(),
rent.toReadOnly(),
], programId: MetaplexAuctionHouseProgramConst.programId, layout: layout);
}