Adds Eth feeHistory & maxPriorityFeePerGas rpc (#4956)

* Adds Eth feeHistory & maxPriorityFeePerGas

* linted

* Fixes rpc method ordering
This commit is contained in:
Alan Sapede
2022-06-23 20:22:05 +03:00
committed by GitHub
parent c8ab0e6959
commit c295d699e7
2 changed files with 29 additions and 0 deletions
@@ -164,6 +164,12 @@ const types: DefinitionsTypes = objectSpread({}, V0, V1, V2, {
data: 'Option<Bytes>',
nonce: 'Option<U256>'
},
EthFeeHistory: {
oldestBlock: 'U256',
baseFeePerGas: 'Vec<U256>',
gasUsedRatio: 'Vec<f64>',
reward: 'Option<Vec<Vec<U256>>>'
},
EthFilter: {
fromBlock: 'Option<BlockNumber>',
toBlock: 'Option<BlockNumber>',
+23
View File
@@ -96,6 +96,24 @@ export const rpc: DefinitionsRpc = objectSpread({}, netRpc, web3Rpc, {
],
type: 'U256'
},
feeHistory: {
description: 'Returns fee history for given block count & reward percentiles',
params: [
{
name: 'blockCount',
type: 'U256'
},
{
name: 'newestBlock',
type: 'BlockNumber'
},
{
name: 'rewardPercentiles',
type: 'Option<Vec<f64>>'
}
],
type: 'EthFeeHistory'
},
gasPrice: {
description: 'Returns current gas price.',
params: [],
@@ -368,6 +386,11 @@ export const rpc: DefinitionsRpc = objectSpread({}, netRpc, web3Rpc, {
params: [],
type: 'U256'
},
maxPriorityFeePerGas: {
description: 'Returns max priority fee per gas',
params: [],
type: 'U256'
},
mining: {
description: 'Returns true if client is actively mining new blocks.',
params: [],