anvil_zksync_core/lib.rs
1//! anvil-zksync
2//!
3//! The `anvil-zksync` crate provides an in-memory node designed primarily for local testing.
4//! It supports forking the state from other networks, making it a valuable tool for integration testing,
5//! bootloader and system contract testing, and prototyping.
6//!
7//! ## Overview
8//!
9//! - **In-Memory Database**: The node uses an in-memory database for storing state information,
10//! and employs simplified hashmaps for tracking blocks and transactions.
11//!
12//! - **Forking**: In fork mode, the node fetches missing storage data from a remote source if not available locally.
13//!
14//! - **Remote Server Interaction**: The node can use the remote server (openchain) to resolve the ABI and topics
15//! to human-readable names.
16//!
17//! - **Local Testing**: Designed for local testing, this node is not intended for production use.
18//!
19//! ## Features
20//!
21//! - Fork the state of mainnet, testnet, or a custom network.
22//! - Replay existing mainnet or testnet transactions.
23//! - Use local bootloader and system contracts.
24//! - Operate deterministically in non-fork mode.
25//! - Start quickly with pre-configured 'rich' accounts.
26//! - Resolve names of ABI functions and Events using openchain.
27//!
28//! ## Limitations
29//!
30//! - No communication between Layer 1 and Layer 2.
31//! - Many APIs are not yet implemented.
32//! - No support for accessing historical data.
33//! - Only one transaction allowed per Layer 1 batch.
34//!
35//! ## Usage
36//!
37//! To start the node, use the command `anvil-zksync run`. For more advanced functionalities like forking or
38//! replaying transactions, refer to the [official documentation](https://era.zksync.io/docs/tools/testing/anvil-zksync.html).
39//!
40//! ## Contributions
41//!
42//! Contributions to improve `anvil-zksync` are welcome. Please refer to the [contribution guidelines](https://github.com/matter-labs/anvil-zksync/blob/main/.github/CONTRIBUTING.md) for more details.
43
44pub mod bootloader_debug;
45pub mod deps;
46pub mod filters;
47pub mod formatter;
48pub mod node;
49pub mod observability;
50pub mod system_contracts;
51pub mod utils;
52
53mod testing;