Get base fee to caculate the transaction fee #1963
Replies: 4 comments 1 reply
-
https://ropsten.etherscan.io/tx/0x47e0f8c979f2d51fe244aed3110263371f96a766ca5351c4c044bcfb391d853e |
Beta Was this translation helpful? Give feedback.
-
You probably want to use the provider.getFeeData. The current defaults are to use twice the most recents block's baseFee and use 2.5 gwei for the priority fee. In the future the priority fee will be based on additional properties queried from a node, but for now 2.5 gwei accounts for both uncle risk (+1 gwei) and for the majority (I believe TP90) of MEV risk (+1.5 gwei). |
Beta Was this translation helpful? Give feedback.
-
@ricmoo [Error: cannot estimate gas; transaction may fail or may require manual gas limit (error={"reason":"processing response error","code":"SERVER_ERROR","body":"{"jsonrpc":"2.0","id":103,"error":{"code":-32000,"message":"err: max fee per gas less than block base fee"] how can i detect extract error message instead of error cannot estimate gas ? |
Beta Was this translation helpful? Give feedback.
-
I want error max fee per gas less than block base fee |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
@ricmoo can you help me to estimate transaction fee on eip 1559 ?
Beta Was this translation helpful? Give feedback.
All reactions