Skip to content

Move usage of eth_maxPriorityFeePerGas to eth_feeHistory #2259

Closed
@kclowes

Description

@kclowes

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 using eth_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 (or eth_feeHistory) and eth_gasPrice based on the chain they want to use.

Originally posted by @guoyiteng in #2237 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions