MetaplexAuctionHouseProgram.updateAuctionHouse constructor

MetaplexAuctionHouseProgram.updateAuctionHouse({
  1. required SolAddress treasuryMint,
  2. required SolAddress payer,
  3. required SolAddress authority,
  4. required SolAddress newAuthority,
  5. required SolAddress feeWithdrawalDestination,
  6. required SolAddress treasuryWithdrawalDestination,
  7. required SolAddress treasuryWithdrawalDestinationOwner,
  8. required SolAddress auctionHouse,
  9. required MetaplexAuctionHouseUpdateAuctionHouseLayout layout,
  10. SolAddress tokenProgram = SPLTokenProgramConst.tokenProgramId,
  11. SolAddress systemProgram = SystemProgramConst.programId,
  12. SolAddress rent = SystemProgramConst.sysvarRentPubkey,
  13. SolAddress ataProgram = AssociatedTokenAccountProgramConst.associatedTokenProgramId,
})

Update Auction House values such as seller fee basis points, update authority, treasury account, etc.

Implementation

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

    /// Key paying SOL fees for setting up the Auction House.
    required SolAddress payer,

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

    /// New authority key for the Auction House.
    required SolAddress newAuthority,

    /// Account that pays for fees if the marketplace executes sales.
    required SolAddress feeWithdrawalDestination,

    /// 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,

    /// Owner of the `treasury_withdrawal_destination` account or the same address if the `treasury_mint` is native.
    required SolAddress treasuryWithdrawalDestinationOwner,

    /// Auction House instance PDA account.
    required SolAddress auctionHouse,
    required MetaplexAuctionHouseUpdateAuctionHouseLayout layout,
    SolAddress tokenProgram = SPLTokenProgramConst.tokenProgramId,
    SolAddress systemProgram = SystemProgramConst.programId,
    SolAddress rent = SystemProgramConst.sysvarRentPubkey,
    SolAddress ataProgram =
        AssociatedTokenAccountProgramConst.associatedTokenProgramId}) {
  return MetaplexAuctionHouseProgram(keys: [
    treasuryMint.toReadOnly(),
    payer.toSigner(),
    authority.toSigner(),
    newAuthority.toReadOnly(),
    feeWithdrawalDestination.toWritable(),
    treasuryWithdrawalDestination.toWritable(),
    treasuryWithdrawalDestinationOwner.toReadOnly(),
    auctionHouse.toWritable(),
    tokenProgram.toReadOnly(),
    systemProgram.toReadOnly(),
    ataProgram.toReadOnly(),
    rent.toReadOnly()
  ], programId: MetaplexAuctionHouseProgramConst.programId, layout: layout);
}