Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.
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
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -480,3 +480,10 @@ Released with 1.0.0-beta.37 code base.

- Correct `web3.rst` example in documentation (#4511)
- Correct `BlockHeader` typing (`receiptRoot` -> `receiptsRoot`) (#4452)

## [1.7.0]

### Changed

- 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)

2 changes: 1 addition & 1 deletion packages/web3-eth/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ var Eth = function Eth() {
name: 'getFeeHistory',
call: 'eth_feeHistory',
params: 3,
inputFormatter: [utils.toNumber, formatter.inputBlockNumberFormatter, null]
inputFormatter: [utils.numberToHex, formatter.inputBlockNumberFormatter, null]
}),
new Method({
name: 'getAccounts',
Expand Down
12 changes: 6 additions & 6 deletions test/eth.feeHistory.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ var methodCall = 'eth_feeHistory';
var tests = [
{
args: [4, "0xA30953", []],
formattedArgs: [4, "0xa30953", []],
formattedArgs: ['0x4', "0xa30953", []],
result: {
"baseFeePerGas": [
"0xa",
Expand Down Expand Up @@ -45,7 +45,7 @@ var tests = [
},
{
args: ['0x4', 10684755, []],
formattedArgs: [4, "0xa30953", []],
formattedArgs: ['0x4', "0xa30953", []],
result: {
"baseFeePerGas": [
"0xa",
Expand Down Expand Up @@ -82,7 +82,7 @@ var tests = [
},
{
args: [new BigNumber(4), '10684755', []],
formattedArgs: [4, "0xa30953", []],
formattedArgs: ["0x4", "0xa30953", []],
result: {
"baseFeePerGas": [
"0xa",
Expand Down Expand Up @@ -119,7 +119,7 @@ var tests = [
},
{
args: [4, 'latest', []],
formattedArgs: [4, 'latest', []],
formattedArgs: ["0x4", 'latest', []],
result: {
"baseFeePerGas": [
"0xa",
Expand Down Expand Up @@ -156,7 +156,7 @@ var tests = [
},
{
args: [4, 'earliest', []],
formattedArgs: [4, 'earliest', []],
formattedArgs: ["0x4", 'earliest', []],
result: {
"baseFeePerGas": [
"0xa",
Expand Down Expand Up @@ -193,7 +193,7 @@ var tests = [
},
{
args: [4, 'pending', []],
formattedArgs: [4, 'pending', []],
formattedArgs: ['0x4', 'pending', []],
result: {
"baseFeePerGas": [
"0xa",
Expand Down