MetaplexBubblegumProgram.decompressV1 constructor

MetaplexBubblegumProgram.decompressV1({
  1. required SolAddress voucher,
  2. required SolAddress leafOwner,
  3. required SolAddress tokenAccount,
  4. required SolAddress mint,
  5. required SolAddress mintAuthority,
  6. required SolAddress metadata,
  7. required SolAddress masterEdition,
  8. required SolAddress sysvarRent,
  9. required SolAddress tokenMetadataProgram,
  10. required SolAddress associatedTokenProgram,
  11. required SolAddress logWrapper,
  12. required MetaplexBubblegumDecompressV1Layout layout,
  13. List<AccountMeta> anchorRemainingAccounts = const [],
  14. SolAddress systemProgram = SystemProgramConst.programId,
  15. SolAddress tokenProgram = SPLTokenProgramConst.tokenProgramId,
})

Implementation

factory MetaplexBubblegumProgram.decompressV1({
  required SolAddress voucher,
  required SolAddress leafOwner,
  required SolAddress tokenAccount,
  required SolAddress mint,
  required SolAddress mintAuthority,
  required SolAddress metadata,
  required SolAddress masterEdition,
  required SolAddress sysvarRent,
  required SolAddress tokenMetadataProgram,
  required SolAddress associatedTokenProgram,
  required SolAddress logWrapper,
  required MetaplexBubblegumDecompressV1Layout layout,
  List<AccountMeta> anchorRemainingAccounts = const [],
  SolAddress systemProgram = SystemProgramConst.programId,
  SolAddress tokenProgram = SPLTokenProgramConst.tokenProgramId,
}) {
  return MetaplexBubblegumProgram(keys: [
    voucher.toWritable(),
    leafOwner.toSignerAndWritable(),
    tokenAccount.toWritable(),
    mint.toWritable(),
    mintAuthority.toWritable(),
    metadata.toWritable(),
    masterEdition.toWritable(),
    systemProgram.toReadOnly(),
    sysvarRent.toReadOnly(),
    tokenMetadataProgram.toReadOnly(),
    tokenProgram.toReadOnly(),
    associatedTokenProgram.toReadOnly(),
    logWrapper.toReadOnly(),
    ...anchorRemainingAccounts
  ], programId: MetaplexBubblegumProgramConst.programId, layout: layout);
}