MetaplexAuctionHouseProgram.auctioneerPublicBuy constructor
MetaplexAuctionHouseProgram.auctioneerPublicBuy({
- required SolAddress wallet,
- required SolAddress paymentAccount,
- required SolAddress transferAuthority,
- required SolAddress treasuryMint,
- required SolAddress tokenAccount,
- required SolAddress metadata,
- required SolAddress escrowPaymentAccount,
- required SolAddress authority,
- required SolAddress auctioneerAuthority,
- required SolAddress auctionHouse,
- required SolAddress auctionHouseFeeAccount,
- required SolAddress buyerTradeState,
- required SolAddress ahAuctioneerPda,
- required MetaplexAuctionHouseAuctioneerPublicBuyLayout layout,
- SolAddress tokenProgram = SPLTokenProgramConst.tokenProgramId,
- SolAddress systemProgram = SystemProgramConst.programId,
- SolAddress rent = SystemProgramConst.sysvarRentPubkey,
Create a public buy bid by creating a public_buyer_trade_state
account and an escrow_payment
account and funding the escrow with the necessary SOL or SPL token amount.
Implementation
factory MetaplexAuctionHouseProgram.auctioneerPublicBuy(
{required SolAddress wallet,
required SolAddress paymentAccount,
required SolAddress transferAuthority,
required SolAddress treasuryMint,
required SolAddress tokenAccount,
required SolAddress metadata,
required SolAddress escrowPaymentAccount,
required SolAddress authority,
required SolAddress auctioneerAuthority,
required SolAddress auctionHouse,
required SolAddress auctionHouseFeeAccount,
required SolAddress buyerTradeState,
required SolAddress ahAuctioneerPda,
required MetaplexAuctionHouseAuctioneerPublicBuyLayout layout,
SolAddress tokenProgram = SPLTokenProgramConst.tokenProgramId,
SolAddress systemProgram = SystemProgramConst.programId,
SolAddress rent = SystemProgramConst.sysvarRentPubkey}) {
return MetaplexAuctionHouseProgram(keys: [
wallet.toSigner(),
paymentAccount.toWritable(),
transferAuthority.toReadOnly(),
treasuryMint.toReadOnly(),
tokenAccount.toReadOnly(),
metadata.toReadOnly(),
escrowPaymentAccount.toWritable(),
authority.toReadOnly(),
auctioneerAuthority.toSigner(),
auctionHouse.toReadOnly(),
auctionHouseFeeAccount.toWritable(),
buyerTradeState.toWritable(),
ahAuctioneerPda.toReadOnly(),
tokenProgram.toReadOnly(),
systemProgram.toReadOnly(),
rent.toReadOnly(),
], programId: MetaplexAuctionHouseProgramConst.programId, layout: layout);
}