foundry_evm_core/lib.rs
1//! # foundry-evm-core
2//!
3//! Generic execution, environment, fork, backend, and state abstractions shared by Foundry tools.
4//!
5//! [`evm::FoundryEvmNetwork`] binds an Alloy network to an [`evm::FoundryEvmFactory`]. The factory
6//! owns the concrete execution types and constructs a Foundry-compatible EVM context, while
7//! `foundry-evm-networks` owns runtime family selection. Keeping those responsibilities separate
8//! allows one compiled binary to dispatch to different execution families at runtime.
9
10#![cfg_attr(not(test), warn(unused_crate_dependencies))]
11#![cfg_attr(docsrs, feature(doc_cfg))]
12
13use alloy_primitives::{Address, map::HashMap};
14
15#[cfg(feature = "optimism")]
16use op_alloy_rpc_types as _;
17
18/// Map keyed by breakpoints char to their location (contract address, pc)
19pub type Breakpoints = HashMap<char, (Address, usize)>;
20
21#[macro_use]
22extern crate tracing;
23
24pub mod abi {
25 pub use foundry_cheatcodes_spec::Vm;
26 pub use foundry_evm_abi::*;
27}
28
29pub mod backend;
30pub mod buffer;
31pub mod bytecode;
32pub mod constants;
33pub mod decode;
34pub mod edgecov;
35pub mod eip2935;
36pub mod evm;
37pub mod fork;
38pub mod hardfork;
39pub mod ic;
40pub mod opts;
41pub mod precompiles;
42pub mod state_snapshot;
43pub mod tempo;
44pub mod utils;