Skip to content

Contract revert reasons can mimic node errors #2954

Closed
@fvictorio

Description

Ethers Version

5.6.4

Search Terms

insufficient funds, insufficient funds for intrinsic transaction cost, error message

Describe the Problem

Given a contract with a require like this one:

require(false, "Insufficient funds")

Ethers will (wrongly) say that the error was "Error: insufficient funds for intrinsic transaction cost"

I guess there's some pattern matching going on with the returned error message.

This happens even with the hardhat network when a correct data is returned with the encoded error string.

Code Snippet

No response

Contract ABI

No response

Errors

No response

Environment

No response

Environment (Other)

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

bugVerified to be an issue.fixed/completeThis Bug is fixed or Enhancement is complete and published.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions