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

fix: net_version returns string #1376

Merged
merged 2 commits into from
Jun 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion ethers-providers/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down
2 changes: 1 addition & 1 deletion ethers-providers/src/provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down