Skip to content

eth_gasPrice return values #3472

Answered by zemse
rodrigoherrerai asked this question in Q&A
Discussion options

You must be logged in to vote

For chains that support EIP-1559 what is the exact return value ?

It gives: last block base fee + avg priority fee (while querying alchemy node it seemed to be 0.15930 gwei on mainnet, but avg priority fees on a etherscan chart say it's around 1-2 gwei usually).

For chains that do not support EIP-1559 what is the returned value ?

It gives a value suggested by the gas price oracle in the node. A standard eth node has a gas price oracle which is exposed over RPC under eth namespace. From geth docs:

GAS PRICE ORACLE OPTIONS:
  --gpo.blocks value                  Number of recent blocks to check for gas prices (default: 20)
  --gpo.percentile value              Suggested gas price is the …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by rodrigoherrerai
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants