MetaplexAuctionHouseProgram.auctioneerExecutePartialSale constructor

MetaplexAuctionHouseProgram.auctioneerExecutePartialSale({
  1. required SolAddress buyer,
  2. required SolAddress seller,
  3. required SolAddress tokenAccount,
  4. required SolAddress tokenMint,
  5. required SolAddress metadata,
  6. required SolAddress treasuryMint,
  7. required SolAddress escrowPaymentAccount,
  8. required SolAddress sellerPaymentReceiptAccount,
  9. required SolAddress buyerReceiptTokenAccount,
  10. required SolAddress authority,
  11. required SolAddress auctioneerAuthority,
  12. required SolAddress auctionHouse,
  13. required SolAddress auctionHouseFeeAccount,
  14. required SolAddress auctionHouseTreasury,
  15. required SolAddress buyerTradeState,
  16. required SolAddress sellerTradeState,
  17. required SolAddress freeTradeState,
  18. required SolAddress ahAuctioneerPda,
  19. required SolAddress programAsSigner,
  20. required MetaplexAuctionHouseAuctioneerExecutePartialSaleLayout layout,
  21. SolAddress ataProgram = AssociatedTokenAccountProgramConst.associatedTokenProgramId,
  22. SolAddress tokenProgram = SPLTokenProgramConst.tokenProgramId,
  23. SolAddress systemProgram = SystemProgramConst.programId,
  24. SolAddress rent = SystemProgramConst.sysvarRentPubkey,
})

Implementation

factory MetaplexAuctionHouseProgram.auctioneerExecutePartialSale(
    {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 auctioneerAuthority,
    required SolAddress auctionHouse,
    required SolAddress auctionHouseFeeAccount,
    required SolAddress auctionHouseTreasury,
    required SolAddress buyerTradeState,
    required SolAddress sellerTradeState,
    required SolAddress freeTradeState,
    required SolAddress ahAuctioneerPda,
    required SolAddress programAsSigner,
    required MetaplexAuctionHouseAuctioneerExecutePartialSaleLayout layout,
    SolAddress ataProgram =
        AssociatedTokenAccountProgramConst.associatedTokenProgramId,
    SolAddress tokenProgram = SPLTokenProgramConst.tokenProgramId,
    SolAddress systemProgram = SystemProgramConst.programId,
    SolAddress rent = SystemProgramConst.sysvarRentPubkey}) {
  return MetaplexAuctionHouseProgram(keys: [
    buyer.toWritable(),
    seller.toWritable(),
    tokenAccount.toWritable(),
    tokenMint.toReadOnly(),
    metadata.toReadOnly(),
    treasuryMint.toReadOnly(),
    escrowPaymentAccount.toWritable(),
    sellerPaymentReceiptAccount.toWritable(),
    buyerReceiptTokenAccount.toWritable(),
    authority.toReadOnly(),
    auctioneerAuthority.toSigner(),
    auctionHouse.toReadOnly(),
    auctionHouseFeeAccount.toWritable(),
    auctionHouseTreasury.toWritable(),
    buyerTradeState.toWritable(),
    sellerTradeState.toWritable(),
    freeTradeState.toWritable(),
    ahAuctioneerPda.toReadOnly(),
    tokenProgram.toReadOnly(),
    systemProgram.toReadOnly(),
    ataProgram.toReadOnly(),
    programAsSigner.toReadOnly(),
    rent.toReadOnly()
  ], programId: MetaplexAuctionHouseProgramConst.programId, layout: layout);
}