MetaplexTokenMetaDataProgram.freezeDelegatedAccount constructor

MetaplexTokenMetaDataProgram.freezeDelegatedAccount({
  1. required SolAddress delegate,
  2. required SolAddress tokenAccount,
  3. required SolAddress edition,
  4. required SolAddress mint,
  5. SolAddress tokenProgram = SPLTokenProgramConst.tokenProgramId,
})

Implementation

factory MetaplexTokenMetaDataProgram.freezeDelegatedAccount({
  required SolAddress delegate,
  required SolAddress tokenAccount,
  required SolAddress edition,
  required SolAddress mint,
  SolAddress tokenProgram = SPLTokenProgramConst.tokenProgramId,
}) {
  return MetaplexTokenMetaDataProgram(
      keys: [
        delegate.toSignerAndWritable(),
        tokenAccount.toWritable(),
        edition.toReadOnly(),
        mint.toReadOnly(),
        tokenProgram.toReadOnly(),
      ],
      programId: MetaplexTokenMetaDataProgramConst.programId,
      layout: const MetaplexTokenMetaDataFreezeDelegatedAccountLayout());
}