MetaplexFixedPriceSaleProgram.initSellingResource constructor

MetaplexFixedPriceSaleProgram.initSellingResource({
  1. required SolAddress store,
  2. required SolAddress admin,
  3. required SolAddress sellingResource,
  4. required SolAddress sellingResourceOwner,
  5. required SolAddress resourceMint,
  6. required SolAddress masterEdition,
  7. required SolAddress metadata,
  8. required SolAddress vault,
  9. required SolAddress owner,
  10. required SolAddress resourceToken,
  11. required MetaplexFixedPriceSaleInitSellingResourceLayout layout,
  12. List<AccountMeta> anchorRemainingAccounts = const [],
  13. SolAddress rent = SystemProgramConst.sysvarRentPubkey,
  14. SolAddress tokenProgram = SPLTokenProgramConst.tokenProgramId,
  15. SolAddress systemProgram = SystemProgramConst.programId,
})

Implementation

factory MetaplexFixedPriceSaleProgram.initSellingResource({
  required SolAddress store,
  required SolAddress admin,
  required SolAddress sellingResource,
  required SolAddress sellingResourceOwner,
  required SolAddress resourceMint,
  required SolAddress masterEdition,
  required SolAddress metadata,
  required SolAddress vault,
  required SolAddress owner,
  required SolAddress resourceToken,
  required MetaplexFixedPriceSaleInitSellingResourceLayout layout,
  List<AccountMeta> anchorRemainingAccounts = const [],
  SolAddress rent = SystemProgramConst.sysvarRentPubkey,
  SolAddress tokenProgram = SPLTokenProgramConst.tokenProgramId,
  SolAddress systemProgram = SystemProgramConst.programId,
}) {
  return MetaplexFixedPriceSaleProgram(keys: [
    store.toReadOnly(),
    admin.toSignerAndWritable(),
    sellingResource.toSignerAndWritable(),
    sellingResourceOwner.toReadOnly(),
    resourceMint.toReadOnly(),
    masterEdition.toReadOnly(),
    metadata.toReadOnly(),
    vault.toWritable(),
    owner.toReadOnly(),
    resourceToken.toWritable(),
    rent.toReadOnly(),
    tokenProgram.toReadOnly(),
    systemProgram.toReadOnly(),
    ...anchorRemainingAccounts,
  ], programId: MetaplexFixedPriceSaleProgramConst.programId, layout: layout);
}