> ## Documentation Index
> Fetch the complete documentation index at: https://metalayerlabs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# ethers.js

You can connect to Blast by instantiating a new ethers.js `JsonRpcProvider` object with a RPC URL of the Blast network.

# Mainnet

```jsx theme={null}
const ethers = require('ethers'); // ethers v6
const url = 'https://rpc.blast.io';
const provider = new ethers.JsonRpcProvider(url);
```

See [Network Information](/building/network-information) for additional mainnet RPC endpoints.

# Testnet

```jsx theme={null}
const ethers = require('ethers'); // ethers v6
const url = 'https://sepolia.blast.io';
const provider = new ethers.JsonRpcProvider(url);
```
