MetaplexTokenMetaDataProgram.revoke constructor

MetaplexTokenMetaDataProgram.revoke({
  1. required SolAddress delegate,
  2. required SolAddress metadata,
  3. required SolAddress authority,
  4. required SolAddress payer,
  5. required SolAddress mint,
  6. required SolAddress sysvarInstructions,
  7. required MetaplexTokenMetaDataRevokeLayout layout,
  8. SolAddress? delegateRecord,
  9. SolAddress? masterEdition,
  10. SolAddress? tokenRecord,
  11. SolAddress? token,
  12. SolAddress systemProgram = SystemProgramConst.programId,
  13. SolAddress? splTokenProgram,
  14. SolAddress? authorizationRulesProgram,
  15. SolAddress? authorizationRules,
})

Implementation

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