This repository was archived by the owner on Mar 5, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
eth-feehistory docs #4190
Merged
Merged
eth-feehistory docs #4190
Changes from 2 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
c6e1d4a
updating docs
e1eeb89
updating example
14c5da4
updating types and adding example of list
148dcc9
Update docs/web3-eth.rst
spacesailor24 1369a3b
Update docs/web3-eth.rst
spacesailor24 7a64e0f
Update docs/web3-eth.rst
spacesailor24 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -716,6 +716,43 @@ Example | |
|
|
||
| ------------------------------------------------------------------------------ | ||
|
|
||
| .. _eth-feehistory: | ||
|
|
||
|
|
||
| getFeeHistory | ||
| ===================== | ||
|
|
||
| .. code-block:: javascript | ||
|
|
||
| web3.eth.getFeeHistory(blockCount, newestBlock, rewardPercentiles, [callback]) | ||
|
|
||
| Transaction fee history | ||
| Returns base fee per gas and transaction effective priority fee per gas history for the requested block range if available. | ||
| The range between headBlock-4 and headBlock is guaranteed to be available while retrieving data from the pending block and older | ||
| history are optional to support. For pre-EIP-1559 blocks the gas prices are returned as rewards and zeroes are returned for the base fee per gas. | ||
|
|
||
| ---------- | ||
| Parameters | ||
| ---------- | ||
|
|
||
| 1. ``String`` - Number of blocks in the requested range. Between 1 and 1024 blocks can be requested in a single query. Less than requested may be returned if not all blocks are available. | ||
| 2. ``String`` - Highest number block of the requested range. | ||
spacesailor24 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| 3. ``Array of numbers`` - (optional) A monotonically increasing list of percentile values to sample from each block's effective priority fees per gas in ascending order, weighted by gas used. | ||
|
||
| 3. ``Function`` - (optional) Optional callback, returns an error object as first parameter and the result as second. | ||
|
|
||
| ------- | ||
| Returns | ||
| ------- | ||
|
|
||
| ``Promise`` returns ``Object`` - Fee history for the returned block range. The object: | ||
|
|
||
| - ``String`` oldestBlock - Lowest number block of the returned range. | ||
spacesailor24 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| - ``Array of strings`` baseFeePerGas - An array of block base fees per gas. This includes the next block after the newest of the returned range, because this value can be derived from the newest block. Zeroes are returned for pre-EIP-1559 blocks. | ||
| - ``Array of numbers`` gasUsedRatio - An array of block gas used ratios. These are calculated as the ratio of gasUsed and gasLimit. | ||
| - ``Array of strings`` reward - An array of effective priority fee per gas data points from a single block. All zeroes are returned if the block is empty. | ||
spacesailor24 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ------------------------------------------------------------------------------ | ||
|
|
||
|
|
||
| getAccounts | ||
| ===================== | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.