Description
Since eth_maxPriorityFeePerGas
is Geth-specific, we should stop using it to fill in gas values. We should use eth_feeHistory
instead. I think it still makes sense to keep the RPC endpoint in web3/eth.py
, but all places we call eth_maxPriorityFeePerGas
should be changed.
Comment from #2237:
Hi, I'd like to add that
eth_maxPriorityFeePerGas
isn't part of ETH JSON-RPC spec. It is an endpoint Geth added on its own. Clearly some ETH providers don't have a plan to add it NomicFoundation/hardhat#1664. Maybe usingeth_feeHistory
is a better idea since it's part of the spec?
Also, it would be great if this can be a built-in middleware so that users could choose between
eth_maxPriorityFeePerGas
(oreth_feeHistory
) andeth_gasPrice
based on the chain they want to use.
Originally posted by @guoyiteng in #2237 (comment)