
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
@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
ethers
package, 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([
{
provider: new InfuraProvider('mainnet', 'your-api-key'),
retries: 3, // retry after a timeout or an error 3 times, default is 0.
timeout,
retryDelay: 1000 // wait a random time less than 1 second before retrying. Default is 0.
},
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.
The npm package @morpho-labs/ethers-fallback-provider receives a total of 104 weekly downloads. As such, @morpho-labs/ethers-fallback-provider popularity was classified as not popular.
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.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.