MetaplexAuctionHouseProgram.createAuctionHouse constructor
MetaplexAuctionHouseProgram.createAuctionHouse({
- required MetaplexAuctionHouseCreateAuctionHouseLayout layout,
- required SolAddress treasuryMint,
- required SolAddress payer,
- required SolAddress authority,
- required SolAddress feeWithdrawalDestination,
- required SolAddress treasuryWithdrawalDestination,
- required SolAddress treasuryWithdrawalDestinationOwner,
- required SolAddress auctionHouse,
- required SolAddress auctionHouseFeeAccount,
- required SolAddress auctionHouseTreasury,
- SolAddress tokenProgram = SPLTokenProgramConst.tokenProgramId,
- SolAddress systemProgram = SystemProgramConst.programId,
- SolAddress associatedTokenProgramId = AssociatedTokenAccountProgramConst.associatedTokenProgramId,
- SolAddress rent = SystemProgramConst.sysvarRentPubkey,
Create a new Auction House instance.
Implementation
factory MetaplexAuctionHouseProgram.createAuctionHouse({
required MetaplexAuctionHouseCreateAuctionHouseLayout layout,
/// 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,
/// 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,
/// Auction House instance fee account.
required SolAddress auctionHouseFeeAccount,
/// Auction House instance treasury PDA account.
required SolAddress auctionHouseTreasury,
SolAddress tokenProgram = SPLTokenProgramConst.tokenProgramId,
SolAddress systemProgram = SystemProgramConst.programId,
SolAddress associatedTokenProgramId =
AssociatedTokenAccountProgramConst.associatedTokenProgramId,
SolAddress rent = SystemProgramConst.sysvarRentPubkey,
}) {
return MetaplexAuctionHouseProgram(keys: [
treasuryMint.toReadOnly(),
payer.toSignerAndWritable(),
authority.toReadOnly(),
feeWithdrawalDestination.toWritable(),
treasuryWithdrawalDestination.toWritable(),
treasuryWithdrawalDestinationOwner.toReadOnly(),
auctionHouse.toWritable(),
auctionHouseFeeAccount.toWritable(),
auctionHouseTreasury.toWritable(),
tokenProgram.toReadOnly(),
systemProgram.toReadOnly(),
associatedTokenProgramId.toReadOnly(),
rent.toReadOnly(),
], programId: MetaplexAuctionHouseProgramConst.programId, layout: layout);
}