Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fee history method #29

Merged
merged 2 commits into from
Jul 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions src/methods/chain.json

This file was deleted.

95 changes: 95 additions & 0 deletions src/methods/fee_market.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
[
{
"name": "eth_gasPrice",
"summary": "Returns the current price per gas in wei.",
"params": [],
"result": {
"name": "Gas price",
"schema": {
"title": "Gas price",
"$ref": "#/components/schemas/uint"
}
}
},
{
"name": "eth_feeHistory",
"summary": "",
"params": [
{
"name": "blockCount",
"description": "Requested range of blocks. Clients will return less than the requested range if not all blocks are available.",
"required": true,
"schema": {
"$ref": "#/components/schemas/uint"
}
},
{
"name": "newestBlock",
"description": "Highest block of the requested range.",
"required": true,
"schema": {
"$ref": "#/components/schemas/BlockNumberOrTag"
}
},
{
"name": "rewardPercentiles",
"description": "A monotonically increasing list of percentile values. For each block in the requested range, the transactions will be sorted in ascending order by effective tip per gas and the coresponding effective tip for the percentile will be determined, accounting for gas consumed.",
"required": true,
"schema": {
"title": "rewardPercentiles",
"type": "array",
"items": {
"title": "rewardPercentile",
"description": "Floating point value between 0 and 100.",
"type": "number"
}
}
}
],
"result": {
"name": "feeHistoryResult",
"description": "Fee history for the returned block range. This can be a subsection of the requested range if not all blocks are available.",
"schema": {
"title": "feeHistoryResults",
"description": "Fee history results.",
"type": "object",
"required": [
"firstBlock",
"baseFeePerGas",
"gasUsedRatio"
],
"properties": {
"oldestBlock": {
"title": "oldestBlock",
"description": "Lowest number block of returned range.",
"$ref": "#/components/schemas/uint"
},
"baseFeePerGas": {
"title": "baseFeePerGasArray",
"description": "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.",
"type": "array",
"items": {
"$ref": "#/components/schemas/uint"
}
},
"reward": {
"title": "rewardArray",
"description": "A two-dimensional array of effective priority fees per gas at the requested block percentiles.",
"type": "array",
"items": {
"title": "rewardPercentile",
"description": "An array of effective priority fee per gas data points from a single block. All zeroes are returned if the block is empty.",
"type": "array",
"items": {
"title": "rewardPercentile",
"description": "A given percentile sample of effective priority fees per gas from a single block in ascending order, weighted by gas used. Zeroes are returned if the block is empty.",
"$ref": "#/components/schemas/uint"
}
}
}
}
}
}
}

]