Skip to main content

Usage

Persistent Flags

Subcommands


mine

Mine one or more blocks.
Uses anvil_mine (or falls back to calling evm_mine in a loop).

Examples


set-balance

Set an account’s ETH balance.
Converts ETH to wei and calls anvil_setBalance (or hardhat_setBalance).

Examples


time-travel

Advance the chain’s block timestamp into the future.

Supported Duration Formats

Calls evm_increaseTime then mines a block to apply the timestamp change.

Examples

Time-travel is essential for testing vesting schedules, timelocks, and any time-dependent smart contract logic.

set-gas-price

Set the base gas price for the next blocks.
Calls anvil_setMinGasPrice or hardhat_setNextBlockBaseFeePerGas.

Examples


impersonate

Start impersonating an account. Transactions from this address will succeed without requiring the private key.
Calls anvil_impersonateAccount or hardhat_impersonateAccount.

Examples


stop-impersonating

Stop impersonating an account.

Examples


reset

Reset the chain to genesis state or to a new fork.

Examples


info

Display chain information including chain ID, RPC URL, current block, and block timestamp.

Example Output

Multi-chain