MetaplexBubblegumProgram.redeem constructor

MetaplexBubblegumProgram.redeem({
  1. required SolAddress treeAuthority,
  2. required SolAddress leafOwner,
  3. required SolAddress leafDelegate,
  4. required SolAddress merkleTree,
  5. required SolAddress voucher,
  6. required SolAddress logWrapper,
  7. required SolAddress compressionProgram,
  8. required MetaplexBubblegumRedeemLayout layout,
  9. List<AccountMeta> anchorRemainingAccounts = const [],
  10. SolAddress systemProgram = SystemProgramConst.programId,
})

Implementation

factory MetaplexBubblegumProgram.redeem({
  required SolAddress treeAuthority,
  required SolAddress leafOwner,
  required SolAddress leafDelegate,
  required SolAddress merkleTree,
  required SolAddress voucher,
  required SolAddress logWrapper,
  required SolAddress compressionProgram,
  required MetaplexBubblegumRedeemLayout layout,
  List<AccountMeta> anchorRemainingAccounts = const [],
  SolAddress systemProgram = SystemProgramConst.programId,
}) {
  return MetaplexBubblegumProgram(keys: [
    treeAuthority.toReadOnly(),
    leafOwner.toSignerAndWritable(),
    leafDelegate.toReadOnly(),
    merkleTree.toWritable(),
    voucher.toWritable(),
    logWrapper.toReadOnly(),
    compressionProgram.toReadOnly(),
    systemProgram.toReadOnly(),
    ...anchorRemainingAccounts
  ], programId: MetaplexBubblegumProgramConst.programId, layout: layout);
}