# Foundry Anvil Testcontainers > Real anvil nodes for Node.js tests: every flag type-safe and validated, with a pre-configured viem test client. This file contains links to documentation sections following the llmstxt.org standard. ## Table of Contents - [anvil behaviours worth knowing](https://hellalabs.dev/foundryanvil-testcontainers-nodejs/docs/concepts/anvil-behaviours): Surprising anvil and viem behaviours found while writing the examples, and what to do about them. - [Architecture: node, test client, cheats](https://hellalabs.dev/foundryanvil-testcontainers-nodejs/docs/concepts/architecture): The three layers of a started node and how the test client is wired to it. - [Dedication to quality](https://hellalabs.dev/foundryanvil-testcontainers-nodejs/docs/concepts/dedication-to-quality): How the library, the examples and this site are tested, how the docs stay in sync with the code, and how the site stays fast. - [Concepts](https://hellalabs.dev/foundryanvil-testcontainers-nodejs/docs/concepts): How the library works, and why — background for the task pages. - [Isolation and snapshots](https://hellalabs.dev/foundryanvil-testcontainers-nodejs/docs/concepts/isolation): What per-test isolation restores, what it doesn't, and why snapshots are strict. - [Performance: fast suites](https://hellalabs.dev/foundryanvil-testcontainers-nodejs/docs/concepts/performance): Where a test suite's time goes, what the library optimises, and how to keep suites fast. - [Runtimes: Docker and local binaries](https://hellalabs.dev/foundryanvil-testcontainers-nodejs/docs/concepts/runtimes): The default Docker runtime, custom images, and running anvil as a local process. - [Signing: anvil-signed vs. locally signed](https://hellalabs.dev/foundryanvil-testcontainers-nodejs/docs/concepts/signing): Who signs a transaction changes when reverts surface, which chain id is used, and which keys are needed. - [Startup, readiness and file transfers](https://hellalabs.dev/foundryanvil-testcontainers-nodejs/docs/concepts/startup-and-files): What start() does, how readiness is detected, and how host files reach the container and back. - [How the docs are tested](https://hellalabs.dev/foundryanvil-testcontainers-nodejs/docs/concepts/tested-docs): The link/sync contract between this site, the tested examples and the library. - [Validation model](https://hellalabs.dev/foundryanvil-testcontainers-nodejs/docs/concepts/validation): What is checked when — from setters to startup — and which error you get. - [Install](https://hellalabs.dev/foundryanvil-testcontainers-nodejs/docs/get-started/install): Add the library to a Node.js test project. - [Quick start](https://hellalabs.dev/foundryanvil-testcontainers-nodejs/docs/get-started/quick-start): One node per test file, a typed default signer and a fluent cheat chain. - [Run in CI](https://hellalabs.dev/foundryanvil-testcontainers-nodejs/docs/get-started/run-in-ci): Run anvil-backed tests on GitHub Actions and other CI systems. - [Run without Docker](https://hellalabs.dev/foundryanvil-testcontainers-nodejs/docs/get-started/run-without-docker): Run the same tests against a local anvil binary on machines without Docker. - [Introduction](https://hellalabs.dev/foundryanvil-testcontainers-nodejs/content): Real anvil nodes for Node.js tests, configured through a type-safe API, with a pre-configured viem test client. - [anvil extras (AnvilActions)](https://hellalabs.dev/foundryanvil-testcontainers-nodejs/docs/reference/anvil-actions): anvil RPC methods viem doesn't wrap, added to the test client, plus strict reset and revert. - [AnvilContainer](https://hellalabs.dev/foundryanvil-testcontainers-nodejs/docs/reference/anvil-container): The Testcontainers module that turns options and test client settings into a started node. - [AnvilOptions](https://hellalabs.dev/foundryanvil-testcontainers-nodejs/docs/reference/anvil-options): Every anvil flag by option group, with methods, aliases and rules. - [Cheats (AnvilCheats)](https://hellalabs.dev/foundryanvil-testcontainers-nodejs/docs/reference/cheats): Every step of the fluent, awaitable cheats chain. - [Errors](https://hellalabs.dev/foundryanvil-testcontainers-nodejs/docs/reference/errors): Error classes, their fields, and AnvilTestClientError codes. - [Exports](https://hellalabs.dev/foundryanvil-testcontainers-nodejs/docs/reference/exports): Functions, classes, enums, constants and types exported by the package. - [Flag rules](https://hellalabs.dev/foundryanvil-testcontainers-nodejs/docs/reference/flag-rules): Conflicts and dependencies between anvil flags, enforced before anything starts. - [API reference](https://hellalabs.dev/foundryanvil-testcontainers-nodejs/docs/reference): Every class, method, flag, error and export of the library. - [StartedAnvilContainer](https://hellalabs.dev/foundryanvil-testcontainers-nodejs/docs/reference/started-anvil-container): A running node with its pre-configured test client and helpers. - [TestClientOptions](https://hellalabs.dev/foundryanvil-testcontainers-nodejs/docs/reference/test-client-options): Validated settings of the pre-configured viem test client. - [Test client](https://hellalabs.dev/foundryanvil-testcontainers-nodejs/docs/reference/test-client): AnvilTestClient — every viem test, public and wallet action plus anvil extras, bound to the node. - [useAnvil()](https://hellalabs.dev/foundryanvil-testcontainers-nodejs/docs/reference/use-anvil): Wire a node into the test lifecycle with per-test isolation. - [Act as multiple users](https://hellalabs.dev/foundryanvil-testcontainers-nodejs/docs/tasks/accounts/act-as-multiple-users): Give each user their own typed client and send transactions as them. - [Fund accounts](https://hellalabs.dev/foundryanvil-testcontainers-nodejs/docs/tasks/accounts/fund-accounts): Give any address Ether, ERC-20 balances and allowances, or set its nonce. - [Impersonate any address](https://hellalabs.dev/foundryanvil-testcontainers-nodejs/docs/tasks/accounts/impersonate-accounts): Send transactions as whales, treasuries or admins without their private keys. - [Sign locally like a wallet](https://hellalabs.dev/foundryanvil-testcontainers-nodejs/docs/tasks/accounts/sign-locally): Sign messages, EIP-712 data, raw transactions and EIP-7702 authorizations with local keys. - [Use dev accounts and keys](https://hellalabs.dev/foundryanvil-testcontainers-nodejs/docs/tasks/accounts/use-dev-accounts): Configure anvil's funded dev accounts and get their addresses and private keys. - [Configure the chain](https://hellalabs.dev/foundryanvil-testcontainers-nodejs/docs/tasks/configure/chain): Chain id, hardfork, gas limit, base fee, gas price, finality, OP Stack and Celo. - [Compose and inspect options](https://hellalabs.dev/foundryanvil-testcontainers-nodejs/docs/tasks/configure/compose-options): Share presets, swap flags, pass new anvil flags through, and inspect the command line. - [Configure EVM limits](https://hellalabs.dev/foundryanvil-testcontainers-nodejs/docs/tasks/configure/evm-limits): Contract size, memory, block gas limit, the CREATE2 deployer and mempool balance checks. - [Configure logging](https://hellalabs.dev/foundryanvil-testcontainers-nodejs/docs/tasks/configure/logging): Quiet nodes, verbosity, colour, JSON and Markdown formats, and logging at runtime. - [Configure the RPC server](https://hellalabs.dev/foundryanvil-testcontainers-nodejs/docs/tasks/configure/rpc-server): Port, CORS for browser dApps, request size, IPC, threads and cache path. - [Configure the test client](https://hellalabs.dev/foundryanvil-testcontainers-nodejs/docs/tasks/configure/test-client): Transport, polling, caching, timeouts, retries, batching, chain metadata and presets. - [Call any RPC method](https://hellalabs.dev/foundryanvil-testcontainers-nodejs/docs/tasks/debugging/call-any-rpc-method): Reach RPC methods without a viem action, such as Otterscan's or debug and trace methods. - [Inspect the node](https://hellalabs.dev/foundryanvil-testcontainers-nodejs/docs/tasks/debugging/inspect-the-node): Node info, metadata, the exact command line, client settings and logs. - [Trace a failed transaction](https://hellalabs.dev/foundryanvil-testcontainers-nodejs/docs/tasks/debugging/trace-transactions): Find the failing inner call with call traces, opcode traces and anvil's trace logs. - [Query logs and filters](https://hellalabs.dev/foundryanvil-testcontainers-nodejs/docs/tasks/events/query-logs): Query historical events, filter by indexed arguments, and get typed log arguments. - [Watch events and blocks](https://hellalabs.dev/foundryanvil-testcontainers-nodejs/docs/tasks/events/watch-events): Subscribe to contract events, blocks and pending transactions over WebSocket. - [Fork a live chain](https://hellalabs.dev/foundryanvil-testcontainers-nodejs/docs/tasks/forking/fork-a-chain): Run tests against real deployed state at a pinned block, change anything locally. - [Reset or move a fork](https://hellalabs.dev/foundryanvil-testcontainers-nodejs/docs/tasks/forking/reset-a-fork): Discard local changes, move to another block, or switch the upstream endpoint. - [Boot from a custom genesis](https://hellalabs.dev/foundryanvil-testcontainers-nodejs/docs/tasks/state/custom-genesis): Start with pre-deployed contracts, pre-funded accounts, a fixed time or a mainnet-like height. - [Limit history and memory](https://hellalabs.dev/foundryanvil-testcontainers-nodejs/docs/tasks/state/limit-history): Keep long-running nodes lean by pruning history and forgetting old transactions. - [Mock contracts and storage](https://hellalabs.dev/foundryanvil-testcontainers-nodejs/docs/tasks/state/mock-contracts): Replace an external dependency at a fixed address with a test double by writing code and storage. - [Save and load chain state](https://hellalabs.dev/foundryanvil-testcontainers-nodejs/docs/tasks/state/save-and-load-state): Build an expensive fixture once, save it, and boot or load other nodes from it. - [Script state changes](https://hellalabs.dev/foundryanvil-testcontainers-nodejs/docs/tasks/state/script-state-changes): Chain cheats fluently, inspect the plan, and read step failures. - [Catch misconfiguration in unit tests](https://hellalabs.dev/foundryanvil-testcontainers-nodejs/docs/tasks/test-suites/catch-misconfiguration): Test anvil and test-client configuration without Docker. - [Isolate state inside a test](https://hellalabs.dev/foundryanvil-testcontainers-nodejs/docs/tasks/test-suites/isolate-tests): Try something and roll it back, restore a checkpoint repeatedly, or manage snapshots yourself. - [Load contract artifacts](https://hellalabs.dev/foundryanvil-testcontainers-nodejs/docs/tasks/test-suites/load-contract-artifacts): Load ABIs and bytecode from Foundry, Hardhat or plain files and deploy them. - [Manage the node lifecycle](https://hellalabs.dev/foundryanvil-testcontainers-nodejs/docs/tasks/test-suites/manage-the-lifecycle): Start and stop nodes yourself, pass hooks explicitly, run custom start logic, and know what happens after stop(). - [Reset the chain](https://hellalabs.dev/foundryanvil-testcontainers-nodejs/docs/tasks/test-suites/reset-the-chain): Return a node to genesis (or its fork block) and discard every change. - [Share one node per test file](https://hellalabs.dev/foundryanvil-testcontainers-nodejs/docs/tasks/test-suites/share-a-node): Start a node once per file, deploy fixtures once, and give every test a clean copy of that state. - [Control block contents](https://hellalabs.dev/foundryanvil-testcontainers-nodejs/docs/tasks/time-and-blocks/build-blocks): Put several transactions in one block, control ordering and fees, and edit the mempool. - [Control mining](https://hellalabs.dev/foundryanvil-testcontainers-nodejs/docs/tasks/time-and-blocks/control-mining): Mine on demand, on an interval, on every transaction, or a mix — and switch at runtime. - [Simulate reorgs and rollbacks](https://hellalabs.dev/foundryanvil-testcontainers-nodejs/docs/tasks/time-and-blocks/reorgs-and-rollbacks): Replace or remove recent blocks to test confirmation and reorg handling. - [Fast-forward time](https://hellalabs.dev/foundryanvil-testcontainers-nodejs/docs/tasks/time-and-blocks/travel-in-time): Jump ahead, hit exact timestamps, set the clock, and simulate regular block times. - [Assert reverts and custom errors](https://hellalabs.dev/foundryanvil-testcontainers-nodejs/docs/tasks/transactions/assert-reverts): Assert decoded custom errors, panics and reverted receipts. - [Estimate gas and fees](https://hellalabs.dev/foundryanvil-testcontainers-nodejs/docs/tasks/transactions/estimate-gas-and-fees): Estimate gas and fees, build access lists, let the node fill transactions, and prove storage. - [Read contracts efficiently](https://hellalabs.dev/foundryanvil-testcontainers-nodejs/docs/tasks/transactions/read-contracts): Contract instances, multicall without Multicall3, batching, and your own clients. - [Send transactions and wait for receipts](https://hellalabs.dev/foundryanvil-testcontainers-nodejs/docs/tasks/transactions/send-transactions): Send transactions, wait for receipts even with automine off, and handle nonces. - [Simulate before sending](https://hellalabs.dev/foundryanvil-testcontainers-nodejs/docs/tasks/transactions/simulate-calls): Check results without changing state — single calls, call sequences, multi-block stories and overrides.