better comment
This commit is contained in:
parent
6d13485168
commit
ee5f539d01
|
@ -54,7 +54,11 @@ impl Client {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the gas oracle
|
/// Returns the current Safe, Proposed and Fast gas prices
|
||||||
|
/// Post EIP-1559 changes:
|
||||||
|
/// - Safe/Proposed/Fast gas price recommendations are now modeled as Priority Fees.
|
||||||
|
/// - New field `suggestBaseFee`, the baseFee of the next pending block
|
||||||
|
/// - New field `gasUsedRatio`, to estimate how busy the network is
|
||||||
pub async fn gas_oracle(&self) -> Result<GasOracle> {
|
pub async fn gas_oracle(&self) -> Result<GasOracle> {
|
||||||
let query = self.create_query("gastracker", "gasoracle", serde_json::Value::Null);
|
let query = self.create_query("gastracker", "gasoracle", serde_json::Value::Null);
|
||||||
let response: Response<GasOracle> = self.get_json(&query).await?;
|
let response: Response<GasOracle> = self.get_json(&query).await?;
|
||||||
|
|
|
@ -70,9 +70,9 @@ async fn etherscan() {
|
||||||
assert!(data.is_err());
|
assert!(data.is_err());
|
||||||
|
|
||||||
// but fetching the `standard` gas price should work fine
|
// but fetching the `standard` gas price should work fine
|
||||||
let etherscan_oracle_2 = Etherscan::new(etherscan_client).category(GasCategory::SafeLow);
|
let etherscan_oracle = Etherscan::new(etherscan_client).category(GasCategory::SafeLow);
|
||||||
|
|
||||||
let data = etherscan_oracle_2.fetch().await;
|
let data = etherscan_oracle.fetch().await;
|
||||||
assert!(data.is_ok());
|
assert!(data.is_ok());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue