I am trying to call this instruction to lock an NFT.

            .authority(&ctx.accounts.admin.to_account_info()) //authority
            .lock_args(LockArgs::V1 {
                authorization_data: None,

The call is failing and these are the program logs

Unknown Program (MZp46X3Fdg3B9Neb1oFXmeuLaeZhf52McEjxL6hAJBb) Instruction

> Program logged: "Instruction: Initialize"
> Program logged: "freeze authority Some(9gafE5oBZnyTRXZD2WbcwJW5pfZ5WQXWJDLtCcTXMsBr)"
> Program invoked: Token Metadata Program
  > Program logged: "IX: Lock"
  > Program logged: "Invalid authority type"
  > Program consumed: 17579 of 162916 compute units
  > Program returned error: "custom program error: 0x9e"
> Program consumed: 54663 of 200000 compute units
> Program returned error: "custom program error: 0x9e"
  • 1
    have you set admin as delegate authority before locking the nft?
    – denimcodes
    Jan 19 at 7:42
  • Turns out that was the issue. I had to delegate first.
    – Jimii
    Jan 19 at 10:57

1 Answer 1


The error that you're seeing 0x9e, decimal 158, is InvalidAuthorityType: https://github.com/metaplex-foundation/mpl-token-metadata/blob/64ba3cb8937dff668a5e1926d3beaf694ea6f3dc/programs/token-metadata/program/src/error.rs#L625

So maybe the admin account you're providing isn't the correct authority on the NFT

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.