Navigate:
Ethers.js
~$ETHER0.0%

Ethers.js: Complete Ethereum JavaScript Library

A TypeScript library for Ethereum blockchain interaction, providing wallet management, smart contract interfaces, and provider connections.

LIVE RANKINGS • 06:45 PM • STEADY
OVERALL
#441
30
CRYPTO
#39
6
30 DAY RANKING TREND
ovr#441
·Crypt#39
STARS
8.7K
FORKS
2.1K
7D STARS
0
7D FORKS
-3
Tags:
See Repo:
Share:

Learn more about Ethers.js

Ethers.js is a JavaScript/TypeScript library that provides complete functionality for interacting with the Ethereum blockchain and compatible networks. The library implements wallet management, cryptographic operations, and smart contract interaction through a modular architecture that supports tree-shaking for optimized bundle sizes. It offers built-in support for multiple provider services including JSON-RPC, Infura, Etherscan, and Alchemy, along with ENS resolution and various wallet formats. The library is commonly used for building decentralized applications, managing cryptocurrency wallets, and integrating Ethereum functionality into web applications.

Ethers.js

1

TypeScript Native

Written entirely in TypeScript with strict typing for enhanced security and developer experience. Provides comprehensive type definitions for all Ethereum-related operations.

2

Modular Architecture

Supports tree-shaking to include only required functionality in bundles. Maintains a compact core with optional extension packages for specialized features.

3

Multi-Provider Support

Includes built-in integration with major Ethereum service providers and supports multiple connection methods. Offers default provider keys for immediate development setup.


import { ethers } from 'ethers';

async function checkBalance() {
  // Connect to Ethereum mainnet using a public RPC
  const provider = new ethers.JsonRpcProvider('https://eth.llamarpc.com');
  
  // Address to check balance for
  const address = '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045';
  
  try {
    // Get the current balance in wei
    const balanceWei = await provider.getBalance(address);
    
    // Convert wei to ether for readable format
    const balanceEth = ethers.formatEther(balanceWei);
    
    console.log(`Address: ${address}`);
    console.log(`Balance: ${balanceEth} ETH`);
    
    // Get current block number
    const blockNumber = await provider.getBlockNumber();
    console.log(`Current block: ${blockNumber}`);
    
    // Get network information
    const network = await provider.getNetwork();
    console.log(`Network: ${network.name} (Chain ID: ${network.chainId})`);
    
  } catch (error) {
    console.error('Error fetching balance:', error);
  }
}

checkBalance();


vv6.16.0

Added EIP-7594 PeerDAS support, expanded network support with Filecoin, and updated provider endpoints.

  • Added utility method to split EIP-7594 BLOb proofs into its cells
  • Update Alchemy URL endpoint for mainnet
  • Fail on unsupported Etherscan networks immediately to better support the default provider
  • Added Filecoin network and Ankr endpoints
  • Moved to better API for EIP-7594 PeerDAS
vv6.15.0

This release modifies signature validation to allow non-canonical S values by deferring error handling to access-time rather than validation-time.

  • Allow non-canonical S values in Signatures moving errors to access-time
vv6.14.4

This release fixes a serialization bug for EIP-7702 transactions that contain leading zero bytes.

  • Fixed serialization of EIP-7702 transactions with leading 0-bytes

See how people are using Ethers.js

Loading tweets...


[ EXPLORE MORE ]

Related Repositories

Discover similar tools and frameworks used by developers