Custom program error

0x7d02000

Appears in logs as custom program error: 0x7d0

Anchor

ConstraintMut

“A mut constraint was violated”

An account marked #[account(mut)] was passed as read-only in the transaction.

Common causes

  • The client marked the account isWritable: false, which happens when the IDL is stale or when building instructions manually.
  • A CPI passed the account without mut to the callee.

How to fix it

  • Regenerate the client from the current IDL so writable flags match.
  • For CPIs, pass AccountMeta::new(key, false) (writable) rather than new_readonly.

Decode another error

Try: