web3-rpc-failover
v1.2.1
Published
configurable rpc failover for ethereum dapps using ethers framework
Downloads
4
Readme
web3-rpc-failover
FailoverProvider via yaml configuration file for cascading connection fallbacks
Motivation
Providing assurances for Service Provider outages in a robust and simple way.
Do not confuse our usage of failover
with how ethers-js uses fallback. see the ethers documentation, fallback provider
Usage
npm i ethereum-provider-failover
External Module
providers:
- url: 'https://mainnet.infura**'
config:
priority: 2
stallTimeout: 200
weight: 2
- url: 'infura.io/zzz'
config:
priority: 1
stallTimeout: 100
weight: 1
priority
: priority used for the provider
stallTimeout
: timeout (in ms)
Library
const {FallbackProvider} = require('ethereum-provider-failover')
const provider = new FallbackProvider(<pathToConfig>)
License
MIT