1

I am getting this error in my contract written in Anchor.

I have already checked the custom errors of anchor at https://docs.rs/anchor-lang/latest/anchor_lang/error/enum.ErrorCode.html, but did not find anything 0x70 error code there.

3
  • does the instruction throwing this error have any CPI calls? if so, what are they?
    – m_callens
    Commented Oct 10, 2022 at 12:20
  • It would be more helpful to post the program logs, that way it's possible to figure out what program is causing the error. It's not just anchor that shows errors.
    – Henry E
    Commented Oct 13, 2022 at 19:55
  • Thank you @m_callens & @Henry E I printed the program logs and figured out mpl_token_metadata::instruction::update_metadata_accounts_v2 CPI was failing. Commented Oct 19, 2022 at 5:52

1 Answer 1

0

I figured out the issue was coming because mpl_token_metadata::instruction::update_metadata_accounts_v2 CPI was failing.

The reason of failing of above CPI was: In my update instruction collection was None & the nft, I was trying of update, had their collection set beforehand.

Lesson Learned:

Printing out the program logs helps a lot to figure out the issue.

1
  • How do you get program logs if the whole transaction fails
    – frawd
    Commented Oct 20, 2022 at 12:42

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.