Skip to content

Commit 34875cc

Browse files
committed
Clarify feeHistory docs and add param types
1 parent 96ff650 commit 34875cc

File tree

1 file changed

+21
-19
lines changed

1 file changed

+21
-19
lines changed

docs/web3.eth.rst

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1051,25 +1051,27 @@ The following methods are available on the ``web3.eth`` namespace.
10511051
10521052
* Delegates to ``eth_feeHistory`` RPC Method
10531053

1054-
Returns transaction fee data for up to 1024 blocks.
1055-
1056-
Parameters:
1057-
1058-
* ``block_count``: The number of blocks in the requested range. This value is a number between 1 and 1024.
1059-
Less than requested may be returned if not all blocks are available.
1060-
* ``newest_block``: The newest, highest-numbered, block in the requested range.
1061-
* ``reward_percentiles`` (optional): A monotonically increasing list of percentile values to sample from each
1062-
block's effective priority fees per gas in ascending order, weighted by gas used.
1063-
1064-
Return data:
1065-
1066-
* ``oldestBlock``: The oldest, lowest-numbered, block in the range requested.
1067-
* ``baseFeePerGas``: An array of block base fees per gas. This includes the next block after the newest of the
1068-
returned range, because this value can be derived from the newest block. Zeroes are returned for pre-EIP-1559
1069-
blocks.
1070-
* ``gasUsedRatio``: An array of ``gasUsed``/``gasLimit`` values for the requested blocks.
1071-
* ``reward`` (optional): An array of effective priority fee per gas data points from a single block.
1072-
All zeroes are returned if the block is empty.
1054+
Returns transaction fee data for up to 1,024 blocks.
1055+
1056+
:param block_count: The number of blocks in the requested range. This value should be an :py:class:`int` between 1
1057+
and 1024. Less than requested may be returned if not all blocks are available.
1058+
:type block_count: int
1059+
:param newest_block: The newest, highest-numbered, block in the requested range. This value may be an
1060+
:py:class:`int` or one of the predefined block parameters ``'latest'``, ``'earliest'``, or ``'pending'``.
1061+
:type newest_block: int or BlockParams
1062+
:param reward_percentiles: *(optional)* A monotonically increasing list of percentile :py:class:`float` values to
1063+
sample from each block's effective priority fees per gas in ascending order, weighted by gas used.
1064+
:type reward_percentiles: List[float] or None
1065+
:return: An ``AttributeDict`` containing the following keys:
1066+
1067+
* **oldestBlock** *(int)* -- The oldest, lowest-numbered, block in the range requested as a ``BlockNumber`` type
1068+
with :py:class:`int` value.
1069+
* **baseFeePerGas** *(List[Wei])* -- An array of block base fees per gas. This includes the next block after the
1070+
newest of the returned range, because this value can be derived from the newest block. Zeroes are returned for
1071+
pre-EIP-1559 blocks.
1072+
* **gasUsedRatio** *(List[float])* -- An array of ``gasUsed``/``gasLimit`` float values for the requested blocks.
1073+
* **reward** *(List[List[Wei]])* -- *(optional)* A two-dimensional array of effective priority fees per gas at the
1074+
requested block percentiles.
10731075

10741076
.. code-block:: python
10751077

0 commit comments

Comments
 (0)