MetaplexTokenMetaDataProgram.update constructor

MetaplexTokenMetaDataProgram.update({
  1. required SolAddress authority,
  2. required SolAddress mint,
  3. required SolAddress metadata,
  4. required SolAddress payer,
  5. required SolAddress sysvarInstructions,
  6. required MetaplexTokenMetaDataUpdateProgramLayout layout,
  7. SolAddress systemProgram = SystemProgramConst.programId,
  8. SolAddress? delegateRecord,
  9. SolAddress? token,
  10. SolAddress? edition,
  11. SolAddress? authorizationRulesProgram,
  12. SolAddress? authorizationRules,
})

Implementation

factory MetaplexTokenMetaDataProgram.update({
  required SolAddress authority,
  required SolAddress mint,
  required SolAddress metadata,
  required SolAddress payer,
  required SolAddress sysvarInstructions,
  required MetaplexTokenMetaDataUpdateProgramLayout layout,
  SolAddress systemProgram = SystemProgramConst.programId,
  SolAddress? delegateRecord,
  SolAddress? token,
  SolAddress? edition,
  SolAddress? authorizationRulesProgram,
  SolAddress? authorizationRules,
}) {
  return MetaplexTokenMetaDataProgram(keys: [
    authority.toSigner(),
    delegateRecord?.toReadOnly() ??
        MetaplexTokenMetaDataProgramConst.programId.toReadOnly(),
    token?.toReadOnly() ??
        MetaplexTokenMetaDataProgramConst.programId.toReadOnly(),
    mint.toReadOnly(),
    metadata.toWritable(),
    edition?.toReadOnly() ??
        MetaplexTokenMetaDataProgramConst.programId.toReadOnly(),
    payer.toSignerAndWritable(),
    systemProgram.toReadOnly(),
    sysvarInstructions.toReadOnly(),
    authorizationRulesProgram?.toReadOnly() ??
        MetaplexTokenMetaDataProgramConst.programId.toReadOnly(),
    authorizationRules?.toReadOnly() ??
        MetaplexTokenMetaDataProgramConst.programId.toReadOnly(),
  ], programId: MetaplexTokenMetaDataProgramConst.programId, layout: layout);
}