Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Commit 994988b

Browse files
committedNov 15, 2021
Merge branch '1.x' into release/1.6.1
2 parents edb812d + 2812172 commit 994988b

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed
 

‎CHANGELOG.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -480,4 +480,9 @@ Released with 1.0.0-beta.37 code base.
480480

481481
## [Unreleased]
482482

483-
## [1.6.2]
483+
## [1.7.0]
484+
485+
### Changed
486+
487+
- Changed getFeeHistory first parameter type from `number` to `hex` according to the [spec](https://playground.open-rpc.org/?schemaUrl=https://raw.githubusercontent.com/ethereum/eth1.0-apis/assembled-spec/openrpc.json&uiSchema%5BappBar%5D%5Bui:splitView%5D=false&uiSchema%5BappBar%5D%5Bui:input%5D=false&uiSchema%5BappBar%5D%5Bui:examplesDropdown%5D=false) (#4529)
488+

‎packages/web3-eth/src/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ var Eth = function Eth() {
408408
name: 'getFeeHistory',
409409
call: 'eth_feeHistory',
410410
params: 3,
411-
inputFormatter: [utils.toNumber, formatter.inputBlockNumberFormatter, null]
411+
inputFormatter: [utils.numberToHex, formatter.inputBlockNumberFormatter, null]
412412
}),
413413
new Method({
414414
name: 'getAccounts',

‎test/eth.feeHistory.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ var methodCall = 'eth_feeHistory';
88
var tests = [
99
{
1010
args: [4, "0xA30953", []],
11-
formattedArgs: [4, "0xa30953", []],
11+
formattedArgs: ['0x4', "0xa30953", []],
1212
result: {
1313
"baseFeePerGas": [
1414
"0xa",
@@ -45,7 +45,7 @@ var tests = [
4545
},
4646
{
4747
args: ['0x4', 10684755, []],
48-
formattedArgs: [4, "0xa30953", []],
48+
formattedArgs: ['0x4', "0xa30953", []],
4949
result: {
5050
"baseFeePerGas": [
5151
"0xa",
@@ -82,7 +82,7 @@ var tests = [
8282
},
8383
{
8484
args: [new BigNumber(4), '10684755', []],
85-
formattedArgs: [4, "0xa30953", []],
85+
formattedArgs: ["0x4", "0xa30953", []],
8686
result: {
8787
"baseFeePerGas": [
8888
"0xa",
@@ -119,7 +119,7 @@ var tests = [
119119
},
120120
{
121121
args: [4, 'latest', []],
122-
formattedArgs: [4, 'latest', []],
122+
formattedArgs: ["0x4", 'latest', []],
123123
result: {
124124
"baseFeePerGas": [
125125
"0xa",
@@ -156,7 +156,7 @@ var tests = [
156156
},
157157
{
158158
args: [4, 'earliest', []],
159-
formattedArgs: [4, 'earliest', []],
159+
formattedArgs: ["0x4", 'earliest', []],
160160
result: {
161161
"baseFeePerGas": [
162162
"0xa",
@@ -193,7 +193,7 @@ var tests = [
193193
},
194194
{
195195
args: [4, 'pending', []],
196-
formattedArgs: [4, 'pending', []],
196+
formattedArgs: ['0x4', 'pending', []],
197197
result: {
198198
"baseFeePerGas": [
199199
"0xa",

0 commit comments

Comments
 (0)
This repository has been archived.