
Product
Introducing Webhook Events for Alert Changes
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.
@morpho-labs/ethers-fallback-provider
Advanced tools
Package providing a fallback provider based on ethers-providers, adding more resilience.
Package providing a fallback provider based on
etherspackage, adding more resilience.
The provider fallbacks on multiple providers in case of failure, and returns the first successful result.
It throws an error if all providers failed.
The providers are called in the order they are passed to the constructor.
Contrary to the FallbackProvider provided by ethers, this one does not use all providers at the same time, but only one at a time.
The purpose is more to have resilience if one provider fails, rather than having a resilience on the result.
npm install @morpho-labs/ethers-fallback-provider
or
yarn add @morpho-labs/ethers-fallback-provider
import FallbackProvider from '@morpho-labs/ethers-fallback-provider';
import {
InfuraProvider,
AlchemyProvider,
getDefaultProvider
} from "@ethersproject/providers";
const timeout = 1000; // 1 second, optionnal, default is 3000ms
const provider = new FallbackProvider([
new InfuraProvider('mainnet', 'your-api-key'),
new AlchemyProvider('mainnet', 'your-api-key'),
getDefaultProvider('mainnet')
]);
// You can now use the fallback provider as a classic provider
const blockNumber = await provider.getBlockNumber();
FAQs
Package providing a fallback provider based on ethers-providers, adding more resilience.
We found that @morpho-labs/ethers-fallback-provider demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.