Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Commit cc84f3f

Browse files
docs: document eth_feeHistory in RCP-METHODS.md (#3840)
Co-authored-by: Micaiah Reid <[email protected]>
1 parent 2baadd5 commit cc84f3f

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

src/chains/ethereum/ethereum/RPC-METHODS.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,31 @@ Generates and returns an estimate of how much gas is necessary to allow the tran
203203

204204
---
205205

206+
#### eth_feeHistory
207+
208+
Returns a collection of historical block gas data and optional effective fee spent per unit of gas for a given percentile of block gas usage.
209+
210+
##### Arguments
211+
212+
- `blockCount: string`
213+
- `newestBlock: string`
214+
- `rewardPercentiles: number[]`
215+
216+
##### Returns
217+
218+
`Promise<FeeHistory>` : transaction base fee per gas and effective priority fee per gas for the requested/supported block range
219+
220+
- `oldestBlock`: - Lowest number block of the returned range.
221+
- `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.
222+
- `gasUsedRatio`: - An array of block gas used ratios. These are calculated as the ratio of `gasUsed` and `gasLimit`.
223+
- `reward`: - An array of effective priority fee per gas data points from a single block. All zeroes are returned if the block is empty.
224+
225+
##### Eip
226+
227+
[1559 - Fee market change](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1559.md)
228+
229+
---
230+
206231
#### eth_gasPrice
207232

208233
Returns the current price per gas in wei.

0 commit comments

Comments
 (0)