I am trying to test my program but I am getting Error: failed to send transaction: Transaction simulation failed: Error processing Instruction 0: custom program error: 0xc Can someone suggest the possible issue?

enter image description here

  • Could you provide which: - Solana network you are on - spl-token or anchor-spl crate you are using - anchor version you are using 0xc is "Invalid instruction" in the token program, so something probably did not serialize right. Jan 21 at 16:54
  • I am using devnet, token-2022 with anchor-spl crate
    – blackhorse
    Jan 21 at 17:59
  • Are you getting your instructions and CPI accounts from anchor_spl::token_2022 ? The issue might be that you're using anchor_spl::token. Jan 21 at 18:06
  • no I am using anchor_spl::token_2022 only, I am trying to call anchor_spl::token_200::mint_to present on my contract A, from my contract B
    – blackhorse
    Jan 21 at 18:18
  • Can you update the transaction message encoded in base 64? explorer.solana.com/tx/inspector
    – wei1769
    Jan 22 at 3:27

1 Answer 1


This is a total shot in the dark, but 0xc might refer to InvalidInstruction from the SPL token program: https://github.com/solana-labs/solana-program-library/blob/0e1f6a17bf6c492d0b9ea0abd09de0db16c5fe1c/token/program/src/error.rs#L59

This means that your instruction to the token program is incorrectly constructed in some way.

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.