Skip to main content

i'mI'm wondering how can iI get the correct current average gas price ( or the new parameters maxPriorityFeePerGas and maxFeePerGas ) to push to my web3 wallet in order to have my transaction mined?

I know that there is an rpc call that you make that returns the current gasPrice of the rpc node you are calling, but it always seems not dynamic, by dynamic iI mean that i'd like the value to change over time to match the real variation of gasPrice used by transactions of the latest blocks.

I mean, in a self hosted geth node, there is a way for retriving a dynamic value for this attributes? they seems like hardcoded and never get updated, for example from the gethGETH cli eth.gasPrice , eth.maxPriorityFeePerGas returns always 1000000000 why is that? do i have to implement myself a tracker that based on the latest 'x' blocks it returns the average gasPrice used or does geth have an internal logic that already does this that iI can call ? Thanks in advance :)

i'm wondering how can i get the correct current average gas price ( or the new parameters maxPriorityFeePerGas and maxFeePerGas ) to push to my web3 wallet in order to have my transaction mined?

I know that there is an rpc call that you make that returns the current gasPrice of the rpc node you are calling, but it always seems not dynamic, by dynamic i mean that i'd like the value to change over time to match the real variation of gasPrice used by transactions of the latest blocks.

I mean, in a self hosted geth node, there is a way for retriving a dynamic value for this attributes? they seems like hardcoded and never get updated, for example from the geth cli eth.gasPrice , eth.maxPriorityFeePerGas returns always 1000000000 why is that? do i have to implement myself a tracker that based on the latest 'x' blocks it returns the average gasPrice used or does geth have an internal logic that already does this that i can call ? Thanks in advance :)

I'm wondering how can I get the correct current average gas price ( or the new parameters maxPriorityFeePerGas and maxFeePerGas ) to push to my web3 wallet in order to have my transaction mined?

I know that there is an rpc call that you make that returns the current gasPrice of the rpc node you are calling, but it always seems not dynamic, by dynamic I mean that i'd like the value to change over time to match the real variation of gasPrice used by transactions of the latest blocks.

I mean, in a self hosted geth node, there is a way for retriving a dynamic value for this attributes? they seems like hardcoded and never get updated, for example from the GETH cli eth.gasPrice , eth.maxPriorityFeePerGas returns always 1000000000 why is that? do i have to implement myself a tracker that based on the latest 'x' blocks it returns the average gasPrice used or does geth have an internal logic that already does this that I can call ? Thanks in advance :)

Notice removed Draw attention by Ismael
Bounty Ended with timsntech's answer chosen by Ismael
Notice added Draw attention by Ismael
Bounty Started worth 50 reputation by Ismael
Source Link
Mat.C
  • 176
  • 1
  • 1
  • 6

How to retrive a dynamic average value for gas-price

i'm wondering how can i get the correct current average gas price ( or the new parameters maxPriorityFeePerGas and maxFeePerGas ) to push to my web3 wallet in order to have my transaction mined?

I know that there is an rpc call that you make that returns the current gasPrice of the rpc node you are calling, but it always seems not dynamic, by dynamic i mean that i'd like the value to change over time to match the real variation of gasPrice used by transactions of the latest blocks.

I mean, in a self hosted geth node, there is a way for retriving a dynamic value for this attributes? they seems like hardcoded and never get updated, for example from the geth cli eth.gasPrice , eth.maxPriorityFeePerGas returns always 1000000000 why is that? do i have to implement myself a tracker that based on the latest 'x' blocks it returns the average gasPrice used or does geth have an internal logic that already does this that i can call ? Thanks in advance :)