MetaplexBubblegumProgram.createTree constructor

MetaplexBubblegumProgram.createTree({
  1. required SolAddress treeAuthority,
  2. required SolAddress merkleTree,
  3. required SolAddress payer,
  4. required SolAddress treeCreator,
  5. required SolAddress logWrapper,
  6. required SolAddress compressionProgram,
  7. required MetaplexBubblegumCreateTreeLayout layout,
  8. List<AccountMeta> anchorRemainingAccounts = const [],
  9. SolAddress systemProgram = SystemProgramConst.programId,
})

Implementation

factory MetaplexBubblegumProgram.createTree({
  required SolAddress treeAuthority,
  required SolAddress merkleTree,
  required SolAddress payer,
  required SolAddress treeCreator,
  required SolAddress logWrapper,
  required SolAddress compressionProgram,
  required MetaplexBubblegumCreateTreeLayout layout,
  List<AccountMeta> anchorRemainingAccounts = const [],
  SolAddress systemProgram = SystemProgramConst.programId,
}) {
  return MetaplexBubblegumProgram(keys: [
    treeAuthority.toWritable(),
    merkleTree.toWritable(),
    payer.toSignerAndWritable(),
    treeCreator.toSigner(),
    logWrapper.toReadOnly(),
    compressionProgram.toReadOnly(),
    systemProgram.toReadOnly(),
    ...anchorRemainingAccounts
  ], programId: MetaplexBubblegumProgramConst.programId, layout: layout);
}