Expand description
Provider-related instantiation and usage utilities.
ModulesΒ§
- curl_
transport - Transport that outputs equivalent curl commands instead of making RPC requests.
- fee
- EIP-1559 fee estimation with configurable presets.
- mpp
- MPP (Machine Payments Protocol) support for 402-gated RPC endpoints.
- 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Β§
- Provider
Builder - Helper type to construct a
RetryProvider - Round
Robin Service - A round-robin transport that distributes requests across multiple transports.
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.
- is_
rpc_ method_ not_ found - Returns whether an RPC transport error reports JSON-RPC method-not-found.
- redact_
url - Returns an RPC URL safe for display by retaining only its scheme, host, and port.
- resolve_
path πNon-Windows - rpc_
error_ πcode - rpc_
error_ πcode_ from_ body - 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Β§
- Retry
Provider - Helper type alias for a retry provider
- Retry
Provider With Signer - Helper type alias for a retry provider with a signer