@redstone-finance/rpc-providers
v0.9.0
Published
:::info Tested only with JsonRpcProviders :::
Downloads
99
Readme
Magic providers, compatible with ethers.Provider interface
:::info Tested only with JsonRpcProviders :::
ProviderWithFallback
- If the provider fails on some operation new provider is elected.
- If all providers fail on the same operation error is thrown.
- When we switch to the next provider, all operations are executed by it till it fails.
- Providers are elected by the sequence given in array. If array ends we start from the beginning.
ProviderWithAgreement
- Works like `ProviderWithFallback, with an exception for two methods.
getBlockNumberasks all providers for blockNumber and then picks (default is median)callasks all providers for result- if at least
Nanswers are the same, it returns call result - ignores all errors
- as soon as it will receive
Nmatching responses returns. (doesn't wait for the rest of the providers to finish)
- if at least
