---
description: Anvil is Foundry's local Ethereum node for development and testing.
---

## Anvil

Anvil is a fast local Ethereum node for development and testing. It runs entirely in-memory and supports forking from any EVM-compatible chain.

### Key capabilities

| Feature | Description |
|---------|-------------|
| **Local development** | Start a local node with pre-funded accounts and instant mining |
| **Forking** | Fork mainnet or any chain at a specific block |
| **Mining control** | Choose instant, interval, mixed, or manual mining and inspect the pending pool |
| **State management** | Dump and load chain state for reproducible testing |
| **Custom RPC methods** | Impersonate accounts, manipulate time, and control mining |
| **Tracing** | Debug transactions with full execution traces |

### Common workflows

:::code-group

```bash [Start local node]
$ anvil
```

```bash [Custom accounts]
$ anvil --accounts 20
```

:::

:::code-group

```bash [Fork mainnet]
$ anvil --fork-url https://ethereum.reth.rs/rpc
```

```bash [Fork at block]
$ anvil --fork-url https://ethereum.reth.rs/rpc --fork-block-number 18000000
```

:::

```bash [Auto-impersonate]
$ anvil --auto-impersonate
```

### Default accounts

Anvil generates 10 development accounts with 10,000 ETH each. The default mnemonic is:

```
test test test test test test test test test test test junk
```

You can customize accounts with `--accounts`, `--balance`, and `--mnemonic`.

:::warning
Default Anvil accounts are publicly known. Use a custom mnemonic when forking mainnet or interacting with public RPC providers.
:::

### Learn more

- [Forking](/anvil/forking) — Fork mainnet and other chains
- [Mining and transaction pool](/anvil/mining) — Control block production and pending transactions
- [State management](/anvil/state-management) — Dump and load chain state
- [Custom methods](/anvil/custom-methods) — Impersonation, mining control, and time manipulation
