foundry: bug: invalid gas estimation on Metis
Component
Cast
Have you ensured that all of these are up to date?
- Foundry
- Foundryup
What version of Foundry are you on?
forge 0.3.0 (5a8bd89 2024-12-20T08:46:21.555250780Z)
What version of Foundryup are you on?
foundryup: 0.3.3
What command(s) is the bug in?
cast send
Operating System
Linux
Describe the bug
Sending transactions on Metis fails due to bad gas estimation. E.g. my wallet holds 0.5 metis and running
cast send $WALLET_ARGS --value 0.0000001ether $(cast wallet address $WALLET_ARGS)
(which is just sending some metis to self) yields:
Error: server returned an error response: error code -32000: insufficient balance to pay for gas
Checked with https://andromeda.metis.io/, https://metis-rpc.publicnode.com and https://metis.drpc.org, so it’s consistent.
Using --gas-limit to override estimation solves the issue, transactions work fine. Using forge script also solves the problem, probably because simulation is done locally. It seems that metis RPCs may be returning something exotic when estimating gas.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 17 (8 by maintainers)
If you face any problems with the faucet, I can send testnet or mainnet tokens for testing
I can confirm, it works with https://andromeda.metis.io/ and still fails with https://metis-rpc.publicnode.com/ and https://metis.drpc.org/. When I was opening this issue it was failing on all 3, so t0mcr8se is right, it was fixed on Metis side and will probably soon be resolved for all RPCs. Thank you all for looking into this!
Of course. I’m using
I’m not sure which exact part is contains the bad bit, so here are the full logs: