Skip to content
Logo

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

FeatureDescription
Local developmentStart a local node with pre-funded accounts and instant mining
ForkingFork mainnet or any chain at a specific block
State managementDump and load chain state for reproducible testing
Custom RPC methodsImpersonate accounts, manipulate time, and control mining
TracingDebug transactions with full execution traces

Common workflows

$ anvil
$ anvil --fork-url https://ethereum.reth.rs/rpc
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.

Learn more