MetaplexFixedPriceSaleProgram.buy constructor
MetaplexFixedPriceSaleProgram.buy({
- required SolAddress market,
- required SolAddress sellingResource,
- required SolAddress userTokenAccount,
- required SolAddress userWallet,
- required SolAddress tradeHistory,
- required SolAddress treasuryHolder,
- required SolAddress newMetadata,
- required SolAddress newEdition,
- required SolAddress masterEdition,
- required SolAddress newMint,
- required SolAddress editionMarker,
- required SolAddress vault,
- required SolAddress owner,
- required SolAddress newTokenAccount,
- required SolAddress masterEditionMetadata,
- required SolAddress clock,
- required SolAddress tokenMetadataProgram,
- required MetaplexFixedPriceSaleBuyLayout layout,
- List<
AccountMeta> anchorRemainingAccounts = const [], - SolAddress rent = SystemProgramConst.sysvarRentPubkey,
- SolAddress tokenProgram = SPLTokenProgramConst.tokenProgramId,
- SolAddress systemProgram = SystemProgramConst.programId,
Implementation
factory MetaplexFixedPriceSaleProgram.buy({
required SolAddress market,
required SolAddress sellingResource,
required SolAddress userTokenAccount,
required SolAddress userWallet,
required SolAddress tradeHistory,
required SolAddress treasuryHolder,
required SolAddress newMetadata,
required SolAddress newEdition,
required SolAddress masterEdition,
required SolAddress newMint,
required SolAddress editionMarker,
required SolAddress vault,
required SolAddress owner,
required SolAddress newTokenAccount,
required SolAddress masterEditionMetadata,
required SolAddress clock,
required SolAddress tokenMetadataProgram,
required MetaplexFixedPriceSaleBuyLayout layout,
List<AccountMeta> anchorRemainingAccounts = const [],
SolAddress rent = SystemProgramConst.sysvarRentPubkey,
SolAddress tokenProgram = SPLTokenProgramConst.tokenProgramId,
SolAddress systemProgram = SystemProgramConst.programId,
}) {
return MetaplexFixedPriceSaleProgram(keys: [
market.toWritable(),
sellingResource.toWritable(),
userTokenAccount.toWritable(),
userWallet.toSignerAndWritable(),
tradeHistory.toWritable(),
treasuryHolder.toWritable(),
newMetadata.toWritable(),
newEdition.toWritable(),
masterEdition.toWritable(),
newMint.toWritable(),
editionMarker.toWritable(),
vault.toWritable(),
owner.toReadOnly(),
newTokenAccount.toWritable(),
masterEditionMetadata.toWritable(),
clock.toReadOnly(),
rent.toReadOnly(),
tokenMetadataProgram.toReadOnly(),
tokenProgram.toReadOnly(),
systemProgram.toReadOnly(),
...anchorRemainingAccounts,
], programId: MetaplexFixedPriceSaleProgramConst.programId, layout: layout);
}