InsufficientFundsError
What InsufficientFundsError means, which codes it carries and how to catch it in ensforge. The account cannot pay for the operation.
Error class2 codes · @ensforge/sdk
The account cannot pay for the operation.
Any write can fail with InsufficientFundsError: it is part of Errors.WriteError.
Fields
| Field | Type | Description |
|---|---|---|
required | bigint | |
available | bigint | |
token | Address | ERC-20 token, or undefined for ETH. |
Codes
| Code | Meaning | Retryable |
|---|---|---|
INSUFFICIENT_ETH | The account does not have enough ETH. | No |
INSUFFICIENT_TOKEN_BALANCE | The account does not have enough of the payment token. | No |
Catch it
Effect.catchTag("InsufficientFundsError", …) or error instanceof Errors.InsufficientFundsError. See Handle errors.
Was this page helpful?