fix: net_version returns string (#1376)

* fix: net_version returns string

* chore: update CHANGELOG
This commit is contained in:
Matthias Seitz 2022-06-14 22:00:46 +02:00 committed by GitHub
parent e991148790
commit 05864ff9ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 2 deletions

View File

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

View File

@ -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<U64, Self::Error> {
async fn get_net_version(&self) -> Result<String, Self::Error> {
self.inner().get_net_version().await.map_err(FromErr::from)
}

View File

@ -583,7 +583,7 @@ impl<P: JsonRpcClient> Middleware for Provider<P> {
}
/// Returns the network version.
async fn get_net_version(&self) -> Result<U64, ProviderError> {
async fn get_net_version(&self) -> Result<String, ProviderError> {
self.request("net_version", ()).await
}