MetaplexBubblegumProgram.updateMetadata constructor

MetaplexBubblegumProgram.updateMetadata({
  1. required SolAddress treeAuthority,
  2. required SolAddress authority,
  3. SolAddress? collectionMint,
  4. SolAddress? collectionMetadata,
  5. SolAddress? collectionAuthorityRecordPda,
  6. required SolAddress leafOwner,
  7. required SolAddress leafDelegate,
  8. required SolAddress payer,
  9. required SolAddress merkleTree,
  10. required SolAddress logWrapper,
  11. required SolAddress compressionProgram,
  12. required SolAddress tokenMetadataProgram,
  13. required MetaplexBubblegumUpdateMetadataLayout layout,
  14. List<AccountMeta> anchorRemainingAccounts = const [],
  15. SolAddress systemProgram = SystemProgramConst.programId,
})

Implementation

factory MetaplexBubblegumProgram.updateMetadata({
  required SolAddress treeAuthority,
  required SolAddress authority,
  SolAddress? collectionMint,
  SolAddress? collectionMetadata,
  SolAddress? collectionAuthorityRecordPda,
  required SolAddress leafOwner,
  required SolAddress leafDelegate,
  required SolAddress payer,
  required SolAddress merkleTree,
  required SolAddress logWrapper,
  required SolAddress compressionProgram,
  required SolAddress tokenMetadataProgram,
  required MetaplexBubblegumUpdateMetadataLayout layout,
  List<AccountMeta> anchorRemainingAccounts = const [],
  SolAddress systemProgram = SystemProgramConst.programId,
}) {
  return MetaplexBubblegumProgram(keys: [
    treeAuthority.toReadOnly(),
    authority.toSigner(),
    collectionMint?.toReadOnly() ??
        MetaplexBubblegumProgramConst.programId.toReadOnly(),
    collectionMetadata?.toReadOnly() ??
        MetaplexBubblegumProgramConst.programId.toReadOnly(),
    collectionAuthorityRecordPda?.toReadOnly() ??
        MetaplexBubblegumProgramConst.programId.toReadOnly(),
    leafOwner.toReadOnly(),
    leafDelegate.toReadOnly(),
    payer.toSigner(),
    merkleTree.toWritable(),
    logWrapper.toReadOnly(),
    compressionProgram.toReadOnly(),
    tokenMetadataProgram.toReadOnly(),
    systemProgram.toReadOnly(),
    ...anchorRemainingAccounts
  ], programId: MetaplexBubblegumProgramConst.programId, layout: layout);
}