MetaplexTokenMetaDataProgram.mintNewEditionFromMasterEditionViaToken constructor

MetaplexTokenMetaDataProgram.mintNewEditionFromMasterEditionViaToken({
  1. required SolAddress newMetadata,
  2. required SolAddress newEdition,
  3. required SolAddress masterEdition,
  4. required SolAddress newMint,
  5. required SolAddress editionMarkPda,
  6. required SolAddress newMintAuthority,
  7. required SolAddress payer,
  8. required SolAddress tokenAccountOwner,
  9. required SolAddress tokenAccount,
  10. required SolAddress newMetadataUpdateAuthority,
  11. required SolAddress metadata,
  12. required MetaplexTokenMetaDataMintNewEditionFromMasterEditionViaTokenLayout layout,
  13. SolAddress tokenProgram = SPLTokenProgramConst.tokenProgramId,
  14. SolAddress systemProgram = SystemProgramConst.programId,
  15. SolAddress? rent,
})

Implementation

factory MetaplexTokenMetaDataProgram.mintNewEditionFromMasterEditionViaToken({
  required SolAddress newMetadata,
  required SolAddress newEdition,
  required SolAddress masterEdition,
  required SolAddress newMint,
  required SolAddress editionMarkPda,
  required SolAddress newMintAuthority,
  required SolAddress payer,
  required SolAddress tokenAccountOwner,
  required SolAddress tokenAccount,
  required SolAddress newMetadataUpdateAuthority,
  required SolAddress metadata,
  required MetaplexTokenMetaDataMintNewEditionFromMasterEditionViaTokenLayout
      layout,
  SolAddress tokenProgram = SPLTokenProgramConst.tokenProgramId,
  SolAddress systemProgram = SystemProgramConst.programId,
  SolAddress? rent,
}) {
  return MetaplexTokenMetaDataProgram(keys: [
    newMetadata.toWritable(),
    newEdition.toWritable(),
    masterEdition.toWritable(),
    newMint.toWritable(),
    editionMarkPda.toWritable(),
    newMintAuthority.toSigner(),
    payer.toSignerAndWritable(),
    tokenAccountOwner.toSigner(),
    tokenAccount.toReadOnly(),
    newMetadataUpdateAuthority.toReadOnly(),
    metadata.toReadOnly(),
    tokenProgram.toReadOnly(),
    systemProgram.toReadOnly(),
    if (rent != null) rent.toReadOnly()
  ], programId: MetaplexTokenMetaDataProgramConst.programId, layout: layout);
}