Skip to main content

try_get_http_provider

Function try_get_http_provider 

Source
pub fn try_get_http_provider(builder: impl AsRef<str>) -> Result<RetryProvider>
Expand description

Constructs a provider, retaining Alloy’s default polling interval for local URLs.

For non-local URLs, the polling interval is 60% of the chain’s average block time hint, capped at 3 seconds before scaling (at most 1.8 seconds). If no hint is available, 3 seconds is used before scaling.