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

Description
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
- Send a transaction to a contract that will revert with errors
- Try to catch the error
Environment
Web3.js v1.5.1
Node v12.18.4
elementary OS 5.1.7