Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
A

anvil-zksync

> 测试质量
Open source

In-memory node that can be used for integration testing and debugging.

322 stars0 likes1 views
WebsiteGitHub

About

In-memory node that can be used for integration testing and debugging.

Install · User Book · Rust Book · Contributing


✨ Features

  • Instant local node – in‑memory execution for lightning‑fast startup
  • Seamless forking – mirror any Elastic Network ZK chain or any custom RPC
  • Rich dev accounts – pre-funded wallets for immediate testing
  • Transaction replay – debug any live tx with full VM call‑trace introspection
  • Custom base token – simulate fee tokens & gas ratios for custom base token ZK chains
  • Protocol development – target non-builtin system contracts for quick protocol testing

Installation

Install anvil-zksync with your preferred method from the below options:

Homebrew

bash
brew tap matter-labs/anvil-zksync https://github.com/matter-labs/anvil-zksync.git
brew install anvil-zksync

Script (installs forge-zksync, cast-zksync & anvil‑zksync)

bash
curl -L https://raw.githubusercontent.com/matter-labs/foundry-zksync/main/install-foundry-zksync | bash

Pre‑built binaries

bash
# download and unpack the latest release
tar -xzf anvil-zksync_x.y.z_.tar.gz -C /usr/local/bin
chmod +x /usr/local/bin/anvil-zksync

Build from source

bash
# clone and build from source
git clone [email protected]:matter-labs/anvil-zksync.git
cd anvil-zksync
cargo build --release

⚡️ Quick‑start

Start a local ZK chain node

bash
anvil-zksync run

Launches a fast, in-memory ZK chain for local development.

Fork any Elastic Network chain

bash
anvil-zksync fork --fork-url era

Mirror mainnet, testnet, or any Elastic ZK chain using a custom RPC.

Replay transactions

bash
anvil-zksync -vv replay_tx --fork-url era 0x0820a939dfe83221f44a6f0f81f8059ec8a7a4e17006965a8b0c146a2c4a00c2

Debug live transactions with full VM call‑trace and verbose output.

Integrate an L1 node

For L1–L2 interactions, choose one of the following:

  • Spawn a local L1 (defaults to port 8012):

    bash
    anvil-zksync --spawn-l1 [port]
  • Connect to an external L1 (must be started with --no-request-size-limit):

    bash
    anvil --no-request-size-limit
    anvil-zksync --external-l1 http://localhost:8545

Note: --spawn-l1 and --external-l1 are mutually exclusive.

For the full CLI reference and advanced usage, see the user docs: https://matter-labs.github.io/anvil-zksync/latest

Contributing

Bug reports, fixes and new features are welcome! Please read the contributing guide to get started.

License

This project is licensed under the terms of the MIT License / Apache License – see the LICENSE-MIT, LICENSE-APACHE and file for details.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Rustanvil-zksyncdebuggingtesting

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category测试质量
PricingOpen source

> Related tools

J
Jest
JavaScript 测试框架
P
Playwright
现代端到端测试框架
E
eslint-plugin-test-selectors
Enforces that data-test-id attributes are added to interactive DOM elements (JSX) to help with UI testing. JSX only.