MetaplexAuctionHouseProgram.sell constructor

MetaplexAuctionHouseProgram.sell({
  1. required SolAddress wallet,
  2. required SolAddress tokenAccount,
  3. required SolAddress metadata,
  4. required SolAddress authority,
  5. required SolAddress auctionHouse,
  6. required SolAddress auctionHouseFeeAccount,
  7. required SolAddress sellerTradeState,
  8. required SolAddress freeSellerTradeState,
  9. required SolAddress programAsSigner,
  10. required MetaplexAuctionHouseSellLayout layout,
  11. SolAddress tokenProgram = SPLTokenProgramConst.tokenProgramId,
  12. SolAddress systemProgram = SystemProgramConst.programId,
  13. SolAddress rent = SystemProgramConst.sysvarRentPubkey,
})

Implementation

factory MetaplexAuctionHouseProgram.sell({
  required SolAddress wallet,
  required SolAddress tokenAccount,
  required SolAddress metadata,
  required SolAddress authority,
  required SolAddress auctionHouse,
  required SolAddress auctionHouseFeeAccount,
  required SolAddress sellerTradeState,
  required SolAddress freeSellerTradeState,
  required SolAddress programAsSigner,
  required MetaplexAuctionHouseSellLayout layout,
  SolAddress tokenProgram = SPLTokenProgramConst.tokenProgramId,
  SolAddress systemProgram = SystemProgramConst.programId,
  SolAddress rent = SystemProgramConst.sysvarRentPubkey,
}) {
  return MetaplexAuctionHouseProgram(keys: [
    wallet.toReadOnly(),
    tokenAccount.toWritable(),
    metadata.toReadOnly(),
    authority.toReadOnly(),
    auctionHouse.toReadOnly(),
    auctionHouseFeeAccount.toWritable(),
    sellerTradeState.toWritable(),
    freeSellerTradeState.toWritable(),
    tokenProgram.toReadOnly(),
    systemProgram.toReadOnly(),
    programAsSigner.toReadOnly(),
    rent.toReadOnly(),
  ], programId: MetaplexAuctionHouseProgramConst.programId, layout: layout);
}