-
Notifications
You must be signed in to change notification settings - Fork 394
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add SerialFallbackProvider for Ethers
SerialFallbackProvider is an Ethers JsonRpcProvider that is built to fall back among a list of providers that could fulfill requests. By default, it always uses a WebSocketProvider, but can fall back to other providers that may or may not use WebSockets if that provider fails. Fallbacks only kick in after exponentially backed-off retries, and retries can, for WebSockets, reconnect the WebSocket. Additionally, the fallback provider tracks subscriptions and reattaches them when a provider switches or is reconnected. The serial fallback provider will also be the place where abstractions will occur between different types of providers, e.g. using optimized Alchemy-specific calls for an Alchemy provider but less optimized ones for non-Alchemy providers.
- Loading branch information
1 parent
76ef8b8
commit 561fd25
Showing
5 changed files
with
524 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.