MetaplexBubblegumProgram.transfer constructor

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

Implementation

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