Struct ethers_middleware::gas_oracle::Polygon
source · pub struct Polygon { /* private fields */ }Expand description
The Polygon gas station API
Queries over HTTP and implements the GasOracle trait
Implementations
sourceimpl Polygon
impl Polygon
pub fn new(chain: Chain) -> Result<Self, GasOracleError>
pub fn with_client(client: Client, chain: Chain) -> Result<Self, GasOracleError>
sourcepub fn category(self, gas_category: GasCategory) -> Self
pub fn category(self, gas_category: GasCategory) -> Self
Sets the gas price category to be used when fetching the gas price.
sourcepub async fn request(&self) -> Result<(f64, GasEstimate), GasOracleError>
pub async fn request(&self) -> Result<(f64, GasEstimate), GasOracleError>
Perform request to Blocknative, decode response
Trait Implementations
sourceimpl GasOracle for Polygon
impl GasOracle for Polygon
sourcefn fetch<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<U256, GasOracleError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn fetch<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<U256, GasOracleError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Makes an asynchronous HTTP query to the underlying
GasOracle Read morefn estimate_eip1559_fees<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<(U256, U256), GasOracleError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Auto Trait Implementations
impl !RefUnwindSafe for Polygon
impl Send for Polygon
impl Sync for Polygon
impl Unpin for Polygon
impl !UnwindSafe for Polygon
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more