better comment

This commit is contained in:
Alexey Shekhirin 2021-11-25 09:06:15 +03:00
parent 6d13485168
commit ee5f539d01
No known key found for this signature in database
GPG Key ID: AF9A26AA133B5B98
2 changed files with 7 additions and 3 deletions

View File

@ -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> {
let query = self.create_query("gastracker", "gasoracle", serde_json::Value::Null);
let response: Response<GasOracle> = self.get_json(&query).await?;

View File

@ -70,9 +70,9 @@ async fn etherscan() {
assert!(data.is_err());
// 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());
}