Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add finish to EIP-1559 v2 gas estimate code (#660)
After integration-testing both the fallback and non-fallback code responsible for pulling gas fee estimates, there were a few fixes needed: * `ethQuery.latestBlock()` was not being called correctly. * For some datapoints, we need to pull the estimated base fee for the next block. This adds an `includeNextBlock` option to `fetchBlockFeeHistory` so that this is possible. It also splits the `FeeHistoryBlock` type into two types, because the next block won't have information about gas used ratios or priority fees (because there is no transaction data associated with the next block, as it doesn't exist). * One of the allowed values for the `endBlock` argument to `fetchBlockFeeHistory` was "pending". This breaks `fetchBlockFeeHistory`, so this has been removed. * Some of the datapoints were based on the wrong data, so this has been corrected as well.
- Loading branch information
Showing
9 changed files
with
320 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.