parent
8a3ee415b7
commit
ab60a5e738
|
@ -21,6 +21,7 @@
|
||||||
- add a method on the `Middleware` to broadcast a tx with a series of escalating gas prices via [#566](https://github.com/gakonst/ethers-rs/pull/566)
|
- add a method on the `Middleware` to broadcast a tx with a series of escalating gas prices via [#566](https://github.com/gakonst/ethers-rs/pull/566)
|
||||||
- Remove unnecessary `Serialize` constraint to `R` (the Response type) in the `request` method of `JsonRpcClient`.
|
- Remove unnecessary `Serialize` constraint to `R` (the Response type) in the `request` method of `JsonRpcClient`.
|
||||||
- Fix `http Provider` data race when generating new request `id`s.
|
- Fix `http Provider` data race when generating new request `id`s.
|
||||||
|
- Add support for `net_version` RPC method. [595](https://github.com/gakonst/ethers-rs/pull/595)
|
||||||
|
|
||||||
### 0.5.3
|
### 0.5.3
|
||||||
|
|
||||||
|
|
|
@ -390,6 +390,10 @@ pub trait Middleware: Sync + Send + Debug {
|
||||||
self.inner().get_chainid().await.map_err(FromErr::from)
|
self.inner().get_chainid().await.map_err(FromErr::from)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async fn get_net_version(&self) -> Result<U64, Self::Error> {
|
||||||
|
self.inner().get_net_version().await.map_err(FromErr::from)
|
||||||
|
}
|
||||||
|
|
||||||
async fn get_balance<T: Into<NameOrAddress> + Send + Sync>(
|
async fn get_balance<T: Into<NameOrAddress> + Send + Sync>(
|
||||||
&self,
|
&self,
|
||||||
from: T,
|
from: T,
|
||||||
|
|
|
@ -432,6 +432,11 @@ impl<P: JsonRpcClient> Middleware for Provider<P> {
|
||||||
self.request("eth_chainId", ()).await
|
self.request("eth_chainId", ()).await
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Returns the network version.
|
||||||
|
async fn get_net_version(&self) -> Result<U64, ProviderError> {
|
||||||
|
self.request("net_version", ()).await
|
||||||
|
}
|
||||||
|
|
||||||
////// Contract Execution
|
////// Contract Execution
|
||||||
//
|
//
|
||||||
// These are relatively low-level calls. The Contracts API should usually be used instead.
|
// These are relatively low-level calls. The Contracts API should usually be used instead.
|
||||||
|
|
Loading…
Reference in New Issue