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

Serialize block count as quantity 2 #669

Merged
merged 7 commits into from
Dec 10, 2021
Merged
Changes from 1 commit
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
Next Next commit
Serialize eth_feeHistory block count as QUANTITY
nlordell authored Dec 10, 2021
commit 7637d3e9782feec697c4aa808b231e41d4c38df0
4 changes: 2 additions & 2 deletions ethers-providers/src/provider.rs
Original file line number Diff line number Diff line change
@@ -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,
@@ -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