CONTRACT_REVERTED
What CONTRACT_REVERTED means, why ContractRevertError throws it, what to show users and how to fix it in ensforge. Also covers retry safety.
ContractRevertErrorNot retryable
@ensforge/sdk
What happened
The contract call reverted.
What to show users
| Title | Message | Action |
|---|---|---|
| Transaction would fail | The network rejected this action. |
Retry safety
Retrying the same call fails the same way until the cause is fixed (retryable: false).
Actions that throw it
| Action | When |
|---|---|
plan.resume | , or the failing step's own error (Errors.AnyError: a plan can hold any step), with context.planId and context.step. |
plan.send | , or the failing step's own error (Errors.AnyError: a plan can hold any step), with context.planId and context.step. |
Any action can fail with ContractRevertError: it is part of Errors.CommonError.
Catch it
Errors.hasCode("CONTRACT_REVERTED") narrows to this error. See Handle errors.
Was this page helpful?