MetaplexTokenMetaDataProgram.burnV1 constructor

MetaplexTokenMetaDataProgram.burnV1({
  1. required SolAddress authority,
  2. SolAddress? collectionMetadata,
  3. required SolAddress metadata,
  4. SolAddress? edition,
  5. required SolAddress mint,
  6. required SolAddress token,
  7. SolAddress? masterEdition,
  8. SolAddress? masterEditionMint,
  9. SolAddress? masterEditionToken,
  10. SolAddress? editionMarker,
  11. SolAddress? tokenRecord,
  12. required MetaplexTokenMetaDataBurnV1Layout layout,
  13. SolAddress tokenProgram = SPLTokenProgramConst.tokenProgramId,
  14. SolAddress systemProgram = SystemProgramConst.programId,
  15. SolAddress sysvarInstructions = SystemProgramConst.sysvarInstructionsPubkey,
})

Implementation

factory MetaplexTokenMetaDataProgram.burnV1({
  required SolAddress authority,
  SolAddress? collectionMetadata,
  required SolAddress metadata,
  SolAddress? edition,
  required SolAddress mint,
  required SolAddress token,
  SolAddress? masterEdition,
  SolAddress? masterEditionMint,
  SolAddress? masterEditionToken,
  SolAddress? editionMarker,
  SolAddress? tokenRecord,
  required MetaplexTokenMetaDataBurnV1Layout layout,
  SolAddress tokenProgram = SPLTokenProgramConst.tokenProgramId,
  SolAddress systemProgram = SystemProgramConst.programId,
  SolAddress sysvarInstructions = SystemProgramConst.sysvarInstructionsPubkey,
}) {
  return MetaplexTokenMetaDataProgram(keys: [
    authority.toSignerAndWritable(),
    collectionMetadata?.toWritable() ??
        MetaplexTokenMetaDataProgramConst.programId.toReadOnly(),
    metadata.toWritable(),
    edition?.toWritable() ??
        MetaplexTokenMetaDataProgramConst.programId.toReadOnly(),
    mint.toWritable(),
    token.toWritable(),
    masterEdition?.toWritable() ??
        MetaplexTokenMetaDataProgramConst.programId.toReadOnly(),
    masterEditionMint?.toReadOnly() ??
        MetaplexTokenMetaDataProgramConst.programId.toReadOnly(),
    masterEditionToken?.toReadOnly() ??
        MetaplexTokenMetaDataProgramConst.programId.toReadOnly(),
    editionMarker?.toWritable() ??
        MetaplexTokenMetaDataProgramConst.programId.toReadOnly(),
    tokenRecord?.toWritable() ??
        MetaplexTokenMetaDataProgramConst.programId.toReadOnly(),
    systemProgram.toReadOnly(),
    sysvarInstructions.toReadOnly(),
    tokenProgram.toReadOnly(),
  ], programId: MetaplexTokenMetaDataProgramConst.programId, layout: layout);
}