MetaplexAuctionHouseProgram.withdrawFromTreasury constructor

MetaplexAuctionHouseProgram.withdrawFromTreasury({
  1. required SolAddress treasuryMint,
  2. required SolAddress authority,
  3. required SolAddress treasuryWithdrawalDestination,
  4. required SolAddress auctionHouseTreasury,
  5. required SolAddress auctionHouse,
  6. required MetaplexAuctionHouseWithdrawFromTreasuryLayout layout,
  7. SolAddress tokenProgram = SPLTokenProgramConst.tokenProgramId,
  8. SolAddress systemProgram = SystemProgramConst.programId,
})

Withdraw amount from the Auction House Treasury Account to a provided destination account.

Implementation

factory MetaplexAuctionHouseProgram.withdrawFromTreasury({
  /// Treasury mint account, either native SOL mint or a SPL token mint.
  required SolAddress treasuryMint,

  /// Authority key for the Auction House.
  required SolAddress authority,

  /// SOL or SPL token account to receive Auction House fees. If treasury mint is native this will be the same as the `treasury_withdrawl_destination_owner`.
  required SolAddress treasuryWithdrawalDestination,

  /// Auction House treasury PDA account.
  required SolAddress auctionHouseTreasury,

  /// Auction House instance PDA account.
  required SolAddress auctionHouse,
  required MetaplexAuctionHouseWithdrawFromTreasuryLayout layout,
  SolAddress tokenProgram = SPLTokenProgramConst.tokenProgramId,
  SolAddress systemProgram = SystemProgramConst.programId,
}) {
  return MetaplexAuctionHouseProgram(keys: [
    treasuryMint.toReadOnly(),
    authority.toSigner(),
    treasuryWithdrawalDestination.toWritable(),
    auctionHouseTreasury.toWritable(),
    auctionHouse.toWritable(),
    tokenProgram.toReadOnly(),
    systemProgram.toReadOnly()
  ], programId: MetaplexAuctionHouseProgramConst.programId, layout: layout);
}