ethers.js
Complete Ethereum library for building dapps, wallets and blockchain tools.
3. Used by agents' projects
Dependency in 30 public GitHub projects set up for AI coding agents that we scanned (0.5%).
4. Agent access
Agent skills for this library in the skills catalog; community skills are written by others, read them before you install.
ethereum.org/llms.txtFrom the package registry and GitHub, checked daily. Tap a verdict to see its source.How we checkedReport an error
What ethers.js does
ethers puts key handling (the README says it keeps "your private keys in your client"), contract objects built from an ABI and node connections in one TypeScript package, and it ships shared default provider keys so <code>ethers.getDefaultProvider()</code> works before you sign up for any service.
ethers.js popularity
Gid Score measures public popularity and activity, not quality. How the Gid Score is calculated
How ethers.js is used
- ethers.js is a dependency in 30 of the 6,258 public GitHub projects set up for AI coding agents that we scanned (0.6% of the 4,867 JavaScript/TypeScript ones), #2 of 155 in crypto and web3.
- Counting the projects our scan samples by dependency (Solana 3,067, Ethereum and EVM 1,774, 3D and games 3,130, agent frameworks and SDKs 13,750), it appears in 705; those are left out of every share on this page.
- The most used alternative in our scan is viem (47 projects).
- Projects that use it most often also use dotenv (56.7%), Hardhat (30.0%), Solana Web3.js (20.0%).
By coding agent
Often used with
ethers.js in practice
Strengths
The README says private keys stay in your client. It lists JSON wallet import and export for Geth, Parity and crowdsale files. It also lists BIP 39 mnemonic phrases in nine languages: English plus Czech, French, Italian, Japanese, Korean, Simplified Chinese, Spanish and Traditional Chinese.
Meta-classes build a JavaScript object from any contract ABI. The README says this includes ABIv2 and the Human-Readable ABI format.
The README says ENS names "are first-class citizens". It says they "can be used anywhere an Ethereum addresses can be used".
The README says ethers provides default keys to each service in an "ever-growing list of third-party providers". It says this lets you call <code>ethers.getDefaultProvider()</code> and start developing right away.
Watch out for
The README says the built-in provider keys are shared and are throttled on purpose. It says your own keys give "faster responses, more capacity, analytics and other features like archival data."
The README lists MulticallProvider, MulticoinPlugin for extra ENS coin types, a Ganache provider, Optimism Utilities and LedgerSigner as extension packages. It says the <code>ethers</code> package itself only includes the most common and most core functionality.
The website warns that ethers has no token. It says any token or website claiming to be affiliated with ethers is a scam.
Load the bundled build in the browser
<script type="module">
import { ethers } from "./dist/ethers.min.js";
</script>More about ethers.js
Funding
- GitHub Sponsors: https://github.com/ethers-io
- Own page: https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2
- Own page: https://www.buymeacoffee.com/ricmoo
- Buy Me a Coffee: https://www.buymeacoffee.com/ricmoo
- 5 GitHub sponsors
Packages around it
- viem: TypeScript Ethereum interface
- wagmi: React hooks for Ethereum
- @tanstack/react-query: Async data fetching and caching
- axios: HTTP client
- react: UI library
- eslint: JavaScript linter
Alternatives
ethers.js This page
TypeScript interface for Ethereum with type-safe interactions.
Solana JavaScript SDK for building web3 applications on the Solana blockchain.
Get started
Install it.
npm install ethersRules for your agent
## ethers.js
- Install with `npm install ethers`. In the browser, import from the bundled ESM build in `./dist/ethers.min.js`.
- Use the v6 docs at docs.ethers.org/v6 for Getting Started and the full API.
- Treat `ethers.getDefaultProvider()` as a starting point. The README says its keys are shared and intentionally throttled, so set up the project's own provider keys.
- ENS names can be passed wherever an Ethereum address can be used, per the README.
- For call batching, extra ENS coin types, Ganache, Optimism utilities or Ledger signing, use the extension packages the README lists rather than looking for them in the core `ethers` package.
- Pass coinType as a `bigint`; the releases page lists "Use bigint for coinType instead of number values".
- Do not add or trust any token claiming affiliation with ethers. The website says ethers has none.