Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

EIP-838 Error Codes #4235

@TomiOhl

Description

@TomiOhl

Expected behavior

It would be nice to be able to get the new, custom error codes with their arguments, introduced in Solidity 0.8.4.
Ethers.js already supports them: https://github.com/shapeshift/ethers.js/blob/master/packages/tests/src.ts/test-contract-interface.ts#L636

Actual behavior

If I try to catch the error as in the link above, I get the following error message:
Error: Returned error: VM Exception while processing transaction: revert
Error code, error name, etc. are all undefined

Steps to reproduce the behavior

  1. Send a transaction to a contract that will revert with errors
  2. Try to catch the error

Environment

Web3.js v1.5.1
Node v12.18.4
elementary OS 5.1.7

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions