MetaplexAuctionHouseProgram.withdrawFromTreasury constructor
MetaplexAuctionHouseProgram.withdrawFromTreasury({
- required SolAddress treasuryMint,
- required SolAddress authority,
- required SolAddress treasuryWithdrawalDestination,
- required SolAddress auctionHouseTreasury,
- required SolAddress auctionHouse,
- required MetaplexAuctionHouseWithdrawFromTreasuryLayout layout,
- SolAddress tokenProgram = SPLTokenProgramConst.tokenProgramId,
- 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);
}