SECURITY WARNING: Never run commands you don't understand. Always review code before execution. Use at your own risk.
Web3 7 errors

Web3 & Blockchain Errors

Gas estimation, nonce management and reverted transactions.

Understanding Web3 errors

Web3 errors are unusually terse because the EVM reports failure without explanation by default. execution reverted means a require or revert triggered. The reason string is present in the return data but most libraries discard it. Nonce errors reflect the strict sequential ordering of transactions per account, so a stuck transaction blocks every one behind it.

How to debug Web3 errors

  1. Simulate before sending: eth_call against the same block returns the revert reason string that a submitted transaction hides.
  2. Use a transaction tracer (Tenderly, Foundry's cast run, or a node's debug_traceTransaction) to see the exact opcode and contract where execution reverted.
  3. For nonce errors, query the account's pending nonce (eth_getTransactionCount with the pending tag) rather than tracking it locally.
  4. To replace a stuck transaction, resend with the same nonce and a materially higher gas price: most nodes require at least a 10% increase.
  5. Check the chain ID matches the network you intend. Signing for the wrong chain produces confusing rejection messages.

Tools worth reaching for

  • cast (Foundry)
  • eth_call simulation
  • Tenderly / block explorer tracer
  • debug_traceTransaction

All 7 Web3 errors

Other categories