diff --git a/CHANGELOG.md b/CHANGELOG.md index f5538665..3cbfe5ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,8 @@ [597](https://github.com/gakonst/ethers-rs/pull/597) - Implement hex display format for `ethers::core::Bytes` [#624](https://github.com/gakonst/ethers-rs/pull/624). +- Fix `fee_history` to first try with `block_count` encoded as a hex `QUANTITY`. + [#668](https://github.com/gakonst/ethers-rs/pull/668) ## ethers-solc diff --git a/ethers-providers/src/provider.rs b/ethers-providers/src/provider.rs index 01c9b678..a8e1c1e1 100644 --- a/ethers-providers/src/provider.rs +++ b/ethers-providers/src/provider.rs @@ -848,7 +848,7 @@ impl Middleware for Provider

{ self.subscribe([logs, filter]).await } - async fn fee_history + serde::Serialize + Send + Sync>( + async fn fee_history + Send + Sync>( &self, block_count: T, last_block: BlockNumber, @@ -862,7 +862,7 @@ impl Middleware for Provider

{ // decode the param from client side would fallback to the old API spec. self.request( "eth_feeHistory", - [utils::serialize(&block_count), last_block.clone(), reward_percentiles.clone()], + [utils::serialize(&block_count.into()), last_block.clone(), reward_percentiles.clone()], ) .await .or(self