Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

Commit

Permalink
Serialize eth_feeHistory block count as QUANTITY (#668)
Browse files Browse the repository at this point in the history
* Serialize eth_feeHistory block count as QUANTITY

* update changelog
  • Loading branch information
nlordell authored Dec 10, 2021
1 parent 59cf991 commit 7bd42be
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions ethers-providers/src/provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,7 @@ impl<P: JsonRpcClient> Middleware for Provider<P> {
self.subscribe([logs, filter]).await
}

async fn fee_history<T: Into<U256> + serde::Serialize + Send + Sync>(
async fn fee_history<T: Into<U256> + Send + Sync>(
&self,
block_count: T,
last_block: BlockNumber,
Expand All @@ -862,7 +862,7 @@ impl<P: JsonRpcClient> Middleware for Provider<P> {
// 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
Expand Down

0 comments on commit 7bd42be

Please sign in to comment.