# Ethers.js (/docs/builders/frontend/ethers)

Ethers.js is a complete and compact library for interacting with the Ethereum blockchain and its ecosystem. It's widely used and battle-tested.

## Why Ethers.js?

* **Complete**: Full-featured library with everything you need
* **Well-documented**: Extensive documentation and examples
* **Stable**: Mature and battle-tested in production
* **Popular**: Large community and ecosystem support
* **Easy to learn**: Intuitive API design

## Quick Start

```bash
npm install ethers
```

## Basic Setup

```javascript
import { ethers } from 'ethers';

// Connect to RISE Testnet
const provider = new ethers.JsonRpcProvider('https://testnet.riselabs.xyz');

// Get the latest block number
const blockNumber = await provider.getBlockNumber();
console.log('Current block:', blockNumber);

// Create a wallet
const wallet = new ethers.Wallet(privateKey, provider);
console.log('Wallet address:', wallet.address);

// Get balance
const balance = await provider.getBalance(wallet.address);
console.log('Balance:', ethers.formatEther(balance), 'ETH');
```

## Network Configuration

```javascript
const RISE_TESTNET = {
  chainId: 11155931,
  name: 'RISE Testnet',
  rpcUrl: 'https://testnet.riselabs.xyz',
  explorer: 'https://explorer.testnet.riselabs.xyz'
};
```

## Next Steps

<Cards>
  <Card icon={<Rocket />} title="Get Started" href="/docs/builders/ethers/get-started" description="Set up your first Ethers.js project" />

  <Card icon={<BookOpen />} title="Read Contracts" href="/docs/builders/ethers/reading" description="Query blockchain data and contract state" />

  <Card icon={<Zap />} title="Write Contracts" href="/docs/builders/ethers/writing" description="Send transactions and interact with contracts" />
</Cards>

## Resources

* [Official Ethers.js Documentation](https://docs.ethers.org)
* [Ethers.js GitHub](https://github.com/ethers-io/ethers.js)
* [Migration Guide (v5 to v6)](https://docs.ethers.org/v6/migrating/)
