Hardhat Node doesn't handle estimateGas calls with a low base fee #3474
Labels
blocked-reason:needs-edr
status:blocked
Blocked by other issues or external reasons
type:bug
Something isn't working
If you start a Hardhat node and send an
eth_estimateGas
whose gas price (or max fee per gas) is lower than the current base fee, you get an ugly "If you think this is a bug in Hardhat, please report it here" error.This happens often when interacting with a contract in the node using MetaMask. I guess MetaMask assumes local networks have a base fee of 0.
A workaround is to set
initialBaseFeePerGas
to zero:But we should show a proper error in these cases.
Alternatively, maybe we should just accept
estimateGas
calls that don't have a gas price above the base fee. See #2469The text was updated successfully, but these errors were encountered: