MetaplexHydraProgram.distributeToken constructor

MetaplexHydraProgram.distributeToken({
  1. required SolAddress payer,
  2. required SolAddress member,
  3. required SolAddress membershipMintTokenAccount,
  4. required SolAddress membershipVoucher,
  5. required SolAddress fanout,
  6. required SolAddress holdingAccount,
  7. required SolAddress fanoutForMint,
  8. required SolAddress fanoutForMintMembershipVoucher,
  9. required SolAddress fanoutMint,
  10. required SolAddress fanoutMintMemberTokenAccount,
  11. required SolAddress membershipMint,
  12. required SolAddress memberStakeAccount,
  13. required MetaplexHydraDistributeTokenLayout layout,
  14. SolAddress systemProgram = SystemProgramConst.programId,
  15. SolAddress rent = SystemProgramConst.sysvarRentPubkey,
  16. SolAddress tokenProgram = SPLTokenProgramConst.tokenProgramId,
})

Implementation

factory MetaplexHydraProgram.distributeToken(
    {required SolAddress payer,
    required SolAddress member,
    required SolAddress membershipMintTokenAccount,
    required SolAddress membershipVoucher,
    required SolAddress fanout,
    required SolAddress holdingAccount,
    required SolAddress fanoutForMint,
    required SolAddress fanoutForMintMembershipVoucher,
    required SolAddress fanoutMint,
    required SolAddress fanoutMintMemberTokenAccount,
    required SolAddress membershipMint,
    required SolAddress memberStakeAccount,
    required MetaplexHydraDistributeTokenLayout layout,
    SolAddress systemProgram = SystemProgramConst.programId,
    SolAddress rent = SystemProgramConst.sysvarRentPubkey,
    SolAddress tokenProgram = SPLTokenProgramConst.tokenProgramId}) {
  return MetaplexHydraProgram(keys: [
    payer.toSigner(),
    member.toWritable(),
    membershipMintTokenAccount.toWritable(),
    membershipVoucher.toWritable(),
    fanout.toWritable(),
    holdingAccount.toWritable(),
    fanoutForMint.toWritable(),
    fanoutForMintMembershipVoucher.toWritable(),
    fanoutMint.toReadOnly(),
    fanoutMintMemberTokenAccount.toWritable(),
    systemProgram.toReadOnly(),
    rent.toReadOnly(),
    tokenProgram.toReadOnly(),
    membershipMint.toWritable(),
    memberStakeAccount.toWritable(),
  ], programId: MetaplexHydraProgramConst.programId, layout: layout);
}