MetaplexFixedPriceSaleProgram.withdraw constructor

MetaplexFixedPriceSaleProgram.withdraw({
  1. required SolAddress market,
  2. required SolAddress sellingResource,
  3. required SolAddress metadata,
  4. required SolAddress treasuryHolder,
  5. required SolAddress treasuryMint,
  6. required SolAddress owner,
  7. required SolAddress destination,
  8. required SolAddress funder,
  9. required SolAddress payer,
  10. required SolAddress payoutTicket,
  11. required SolAddress clock,
  12. required SolAddress associatedTokenProgram,
  13. required MetaplexFixedPriceSaleWithdrawLayout layout,
  14. List<AccountMeta> anchorRemainingAccounts = const [],
  15. SolAddress rent = SystemProgramConst.sysvarRentPubkey,
  16. SolAddress tokenProgram = SPLTokenProgramConst.tokenProgramId,
  17. SolAddress systemProgram = SystemProgramConst.programId,
})

Implementation

factory MetaplexFixedPriceSaleProgram.withdraw({
  required SolAddress market,
  required SolAddress sellingResource,
  required SolAddress metadata,
  required SolAddress treasuryHolder,
  required SolAddress treasuryMint,
  required SolAddress owner,
  required SolAddress destination,
  required SolAddress funder,
  required SolAddress payer,
  required SolAddress payoutTicket,
  required SolAddress clock,
  required SolAddress associatedTokenProgram,
  required MetaplexFixedPriceSaleWithdrawLayout layout,
  List<AccountMeta> anchorRemainingAccounts = const [],
  SolAddress rent = SystemProgramConst.sysvarRentPubkey,
  SolAddress tokenProgram = SPLTokenProgramConst.tokenProgramId,
  SolAddress systemProgram = SystemProgramConst.programId,
}) {
  return MetaplexFixedPriceSaleProgram(keys: [
    market.toReadOnly(),
    sellingResource.toReadOnly(),
    metadata.toReadOnly(),
    treasuryHolder.toWritable(),
    treasuryMint.toReadOnly(),
    owner.toReadOnly(),
    destination.toWritable(),
    funder.toReadOnly(),
    payer.toSignerAndWritable(),
    payoutTicket.toWritable(),
    rent.toReadOnly(),
    clock.toReadOnly(),
    tokenProgram.toReadOnly(),
    associatedTokenProgram.toReadOnly(),
    systemProgram.toReadOnly(),
    ...anchorRemainingAccounts
  ], programId: MetaplexFixedPriceSaleProgramConst.programId, layout: layout);
}