-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fetch gas price natively #305
Comments
We discussed on the call to implement this now, but there was an idea to make sure sanitized gas price is higher than the base fee. Tracked in #306 |
We discussed on call to only implement #306 |
Although the issue #306 requires obtaining the base fee for blocks, my investigation of the underlying getFeeData function in ethers.js revealed that it does not directly return the block's base fee. Instead, it performs heuristic calculations using both the base fee and the maximum priority fee ( While it is theoretically possible to reverse this calculation to derive the base fee, it introduces several potential issues, such as handling cases where the maximum priority fee is null, and increases the risk of errors during the reverse calculation. Addition to that, we will still end up with making 3 calls ( Therefore, it would be more efficient to fetch gas price using low-level RPC call. |
Thanks for that. I agree. |
See: https://api3workspace.slack.com/archives/C06R2JCFSS1/p1715585624116669?thread_ts=1715333508.842309&cid=C06R2JCFSS1
The text was updated successfully, but these errors were encountered: