eth_feeHistory
Returns a collection of historical gas information from which you can decide what to submit as your maxFeePerGas and/or maxPriorityFeePerGas.
Parameters:
Returns:
Example:
// Request
curl https://scroll.blockpi.network/v1/rpc/your-rpc-key -X POST -H "Content-Type: application/json" --data '{"method":"eth_feeHistory","params":[4,"latest",[25,75]],"id":1,"jsonrpc":"2.0"}'
// Result
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"oldestBlock": "0xe729e",
"reward": [
[
"0x59682f00",
"0x59682f00"
],
[
"0x59682f00",
"0x59682f00"
],
[
"0x59682f00",
"0x59682f00"
],
[
"0x59682f00",
"0x59682f00"
]
],
"baseFeePerGas": [
"0x7",
"0x7",
"0x7",
"0x7",
"0x7"
],
"gasUsedRatio": [
0.032008,
0.091302625,
0.045848875,
0.016661
]
}
}Last updated
Was this helpful?