-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Confusing estimateGas
error message in Hardhat node
#1731
Comments
This issue was marked as stale because it didn't have any activity in the last 30 days. If you think it's still relevant, please leave a comment indicating so. Otherwise, it will be closed in 7 days. |
have this issue too |
have this issue too with apple m1 and node v18.4.0, hardhat 2.10.2 |
I have the same issue. Hardhat 2.11.0 My steps to reproduce:
A part of hardhat.config.ts
Here, what I have in console: |
I confirm. I'm facing the same issue. |
It looks like the issue is in MetaMask browser extension. It works just fine with MetaMask for Android. I tried Chrome and FireFox extensions. |
Finally I got it! The default /// hardhat.config.js:
/** @type import('hardhat/config').HardhatUserConfig */
module.exports = {
solidity: "0.8.17",
networks: {
hardhat: {
chainId: 1337, // default is 31337
}
}
}; I'm sure the root of the problem is out there. |
As described here: May it be related to this? |
estimateGas
error message in Hardhat nodeestimateGas
error message in Hardhat node
A user got this output in their node:
I don't have reproduction steps, although it can probably be simulated locally by hardcoding some
throw
somewhere. The point is that a message like that is very confusing and we should either not show anything at all or show something better.My guess of how to reproduce this:
hh node
and send aneth_estimateGas
EDIT: I'm pretty sure that most of the time this happens because of #3474; check that issue for an explanation and a workaround. This issue is still valid though: we should show a better error message when an unhandled error is thrown.
EDIT 2: we should improve this for all JSON-RPC methods, not just
eth_estimateGas
. See for example #1311.The text was updated successfully, but these errors were encountered: