From 05864ff9ed6382d26825763c977eb03647a9d484 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Tue, 14 Jun 2022 22:00:46 +0200 Subject: [PATCH] fix: net_version returns string (#1376) * fix: net_version returns string * chore: update CHANGELOG --- CHANGELOG.md | 2 ++ ethers-providers/src/lib.rs | 2 +- ethers-providers/src/provider.rs | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d06ca4d..861e7c0a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -174,6 +174,8 @@ ### Unreleased +- Return String for net version + [1376](https://github.com/gakonst/ethers-rs/pull/1376) - Stream of paginated logs that load logs in small pages [1285](https://github.com/gakonst/ethers-rs/pull/1285) - Load previous logs before subscribing to new logs in case fromBlock is set diff --git a/ethers-providers/src/lib.rs b/ethers-providers/src/lib.rs index 7743df89..a977cf6f 100644 --- a/ethers-providers/src/lib.rs +++ b/ethers-providers/src/lib.rs @@ -340,7 +340,7 @@ pub trait Middleware: Sync + Send + Debug { self.inner().get_chainid().await.map_err(FromErr::from) } - async fn get_net_version(&self) -> Result { + async fn get_net_version(&self) -> Result { self.inner().get_net_version().await.map_err(FromErr::from) } diff --git a/ethers-providers/src/provider.rs b/ethers-providers/src/provider.rs index a8b4f22f..95de17a3 100644 --- a/ethers-providers/src/provider.rs +++ b/ethers-providers/src/provider.rs @@ -583,7 +583,7 @@ impl Middleware for Provider

{ } /// Returns the network version. - async fn get_net_version(&self) -> Result { + async fn get_net_version(&self) -> Result { self.request("net_version", ()).await }