Module provider

Module provider 

Source
Expand description

Provider-related instantiation and usage utilities.

Modules§

runtime_transport
Runtime transport that connects on first request, which can take either of an HTTP, WebSocket, or IPC transport. Retries are handled by a client layer (e.g., RetryBackoffLayer) when used.

Structs§

ProviderBuilder
Helper type to construct a RetryProvider

Constants§

DEFAULT_UNKNOWN_CHAIN_BLOCK_TIME 🔒
The assumed block time for unknown chains. We assume that these are chains have a faster block time.
POLL_INTERVAL_BLOCK_TIME_SCALE_FACTOR 🔒
The factor to scale the block time by to get the poll interval.

Functions§

get_http_provider
Constructs a provider with a 100 millisecond interval poll if it’s a localhost URL (most likely an anvil or other dev node) and with the default, or 7 second otherwise.
resolve_path 🔒 Non-Windows
try_get_http_provider
Constructs a provider with a 100 millisecond interval poll if it’s a localhost URL (most likely an anvil or other dev node) and with the default, or 7 second otherwise.

Type Aliases§

RetryProvider
Helper type alias for a retry provider
RetryProviderWithSigner
Helper type alias for a retry provider with a signer