repo stringlengths 6 65 | file_url stringlengths 81 311 | file_path stringlengths 6 227 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:31:58 2026-01-04 20:25:31 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
GyulyVGC/sniffnet | https://github.com/GyulyVGC/sniffnet/blob/a748d0a04dfc6f6c3be206d79c5df4f6beeeab85/src/gui/types/conf.rs | src/gui/types/conf.rs | use crate::gui::pages::types::running_page::RunningPage;
use crate::gui::pages::types::settings_page::SettingsPage;
use crate::gui::types::config_window::ConfigWindow;
use crate::gui::types::export_pcap::ExportPcap;
use crate::gui::types::filters::Filters;
use crate::gui::types::settings::Settings;
use crate::networkin... | rust | Apache-2.0 | a748d0a04dfc6f6c3be206d79c5df4f6beeeab85 | 2026-01-04T15:32:49.059067Z | false |
GyulyVGC/sniffnet | https://github.com/GyulyVGC/sniffnet/blob/a748d0a04dfc6f6c3be206d79c5df4f6beeeab85/src/gui/types/timing_events.rs | src/gui/types/timing_events.rs | use std::net::{IpAddr, Ipv4Addr};
use std::ops::Sub;
use std::time::Duration;
use crate::notifications::types::notifications::DataNotification;
pub struct TimingEvents {
/// Instant of the last window focus
focus: std::time::Instant,
/// Instant of the last press on Copy IP button, with the related IP add... | rust | Apache-2.0 | a748d0a04dfc6f6c3be206d79c5df4f6beeeab85 | 2026-01-04T15:32:49.059067Z | false |
GyulyVGC/sniffnet | https://github.com/GyulyVGC/sniffnet/blob/a748d0a04dfc6f6c3be206d79c5df4f6beeeab85/src/gui/types/mod.rs | src/gui/types/mod.rs | pub mod conf;
pub mod config_window;
pub mod export_pcap;
pub mod filters;
pub mod message;
pub mod settings;
pub mod timing_events;
| rust | Apache-2.0 | a748d0a04dfc6f6c3be206d79c5df4f6beeeab85 | 2026-01-04T15:32:49.059067Z | false |
GyulyVGC/sniffnet | https://github.com/GyulyVGC/sniffnet/blob/a748d0a04dfc6f6c3be206d79c5df4f6beeeab85/src/gui/types/message.rs | src/gui/types/message.rs | use iced::window;
use std::net::IpAddr;
use crate::gui::components::types::my_modal::MyModal;
use crate::gui::pages::types::running_page::RunningPage;
use crate::gui::pages::types::settings_page::SettingsPage;
use crate::gui::styles::types::gradient_type::GradientType;
use crate::networking::traffic_preview::TrafficPr... | rust | Apache-2.0 | a748d0a04dfc6f6c3be206d79c5df4f6beeeab85 | 2026-01-04T15:32:49.059067Z | false |
GyulyVGC/sniffnet | https://github.com/GyulyVGC/sniffnet/blob/a748d0a04dfc6f6c3be206d79c5df4f6beeeab85/src/gui/types/config_window.rs | src/gui/types/config_window.rs | use crate::gui::types::conf::deserialize_or_default;
use iced::{Point, Size};
use serde::{Deserialize, Serialize};
#[derive(Serialize, Deserialize, Copy, Clone, PartialEq, Debug, Default)]
#[serde(default)]
pub struct ConfigWindow {
#[serde(deserialize_with = "deserialize_or_default")]
size: SizeTuple,
#[s... | rust | Apache-2.0 | a748d0a04dfc6f6c3be206d79c5df4f6beeeab85 | 2026-01-04T15:32:49.059067Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/benches/src/lib.rs | benches/src/lib.rs | //! Foundry benchmark runner.
use crate::results::{HyperfineOutput, HyperfineResult};
use eyre::{Result, WrapErr};
use foundry_common::{sh_eprintln, sh_println};
use foundry_compilers::project_util::TempProject;
use foundry_test_utils::util::clone_remote;
use once_cell::sync::Lazy;
use rayon::iter::{IntoParallelRefIte... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/benches/src/results.rs | benches/src/results.rs | use crate::RepoConfig;
use eyre::Result;
use serde::{Deserialize, Serialize};
use std::{collections::HashMap, process::Command, thread};
/// Hyperfine benchmark result
#[derive(Debug, Deserialize, Serialize)]
pub struct HyperfineResult {
pub command: String,
pub mean: f64,
pub stddev: Option<f64>,
pub ... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/benches/src/main.rs | benches/src/main.rs | use clap::Parser;
use eyre::{Result, WrapErr};
use foundry_bench::{
BENCHMARK_REPOS, BenchmarkProject, FOUNDRY_VERSIONS, RUNS, RepoConfig, get_forge_version,
get_forge_version_details,
results::{BenchmarkResults, HyperfineResult},
switch_foundry_version,
};
use foundry_common::sh_println;
use rayon::pre... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/verify/src/sourcify.rs | crates/verify/src/sourcify.rs | use crate::{
provider::{VerificationContext, VerificationProvider},
retry::RETRY_CHECK_ON_VERIFY,
utils::ensure_solc_build_metadata,
verify::{ContractLanguage, VerifyArgs, VerifyCheckArgs},
};
use alloy_primitives::Address;
use async_trait::async_trait;
use eyre::{Context, Result, eyre};
use foundry_com... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/verify/src/lib.rs | crates/verify/src/lib.rs | //! Smart contract verification.
#![cfg_attr(not(test), warn(unused_crate_dependencies))]
#![cfg_attr(docsrs, feature(doc_cfg))]
#[macro_use]
extern crate foundry_common;
#[macro_use]
extern crate tracing;
mod etherscan;
pub mod provider;
pub mod bytecode;
pub use bytecode::VerifyBytecodeArgs;
pub mod retry;
pub... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/verify/src/types.rs | crates/verify/src/types.rs | use eyre::Result;
use serde::{Deserialize, Serialize};
use std::{fmt, str::FromStr};
/// Enum to represent the type of verification: `full` or `partial`.
/// Ref: <https://docs.sourcify.dev/docs/full-vs-partial-match/>
#[derive(Debug, Clone, clap::ValueEnum, Default, PartialEq, Eq, Serialize, Deserialize, Copy)]
pub e... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/verify/src/verify.rs | crates/verify/src/verify.rs | //! The `forge verify-bytecode` command.
use crate::{
RetryArgs,
etherscan::EtherscanVerificationProvider,
provider::{VerificationContext, VerificationProvider, VerificationProviderType},
utils::is_host_only,
};
use alloy_primitives::{Address, TxHash, map::HashSet};
use alloy_provider::Provider;
use cl... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/verify/src/bytecode.rs | crates/verify/src/bytecode.rs | //! The `forge verify-bytecode` command.
use crate::{
etherscan::EtherscanVerificationProvider,
utils::{
BytecodeType, JsonResult, check_and_encode_args, check_explorer_args, configure_env_block,
maybe_predeploy_contract,
},
verify::VerifierArgs,
};
use alloy_primitives::{Address, Bytes,... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/verify/src/utils.rs | crates/verify/src/utils.rs | use crate::{bytecode::VerifyBytecodeArgs, types::VerificationType};
use alloy_dyn_abi::DynSolValue;
use alloy_primitives::{Address, Bytes, TxKind, U256};
use alloy_provider::{
Provider,
network::{AnyNetwork, AnyRpcBlock},
};
use alloy_rpc_types::BlockId;
use clap::ValueEnum;
use eyre::{OptionExt, Result};
use f... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/verify/src/retry.rs | crates/verify/src/retry.rs | use clap::{Parser, builder::RangedU64ValueParser};
use foundry_common::retry::Retry;
use std::time::Duration;
/// Retry config used when waiting for verification
pub const RETRY_CHECK_ON_VERIFY: RetryArgs = RetryArgs { retries: 8, delay: 15 };
/// Retry config used when waiting for a created contract
pub const RETRY_... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/verify/src/provider.rs | crates/verify/src/provider.rs | use crate::{
etherscan::EtherscanVerificationProvider,
sourcify::SourcifyVerificationProvider,
verify::{VerifyArgs, VerifyCheckArgs},
};
use alloy_json_abi::JsonAbi;
use async_trait::async_trait;
use eyre::{OptionExt, Result};
use foundry_common::compile::ProjectCompiler;
use foundry_compilers::{
Graph,... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/verify/src/etherscan/standard_json.rs | crates/verify/src/etherscan/standard_json.rs | use super::{EtherscanSourceProvider, VerifyArgs};
use crate::{provider::VerificationContext, verify::ContractLanguage};
use eyre::{Context, Result};
use foundry_block_explorers::verify::CodeFormat;
use foundry_compilers::{
artifacts::{Source, StandardJsonCompilerInput, vyper::VyperInput},
solc::SolcLanguage,
};... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/verify/src/etherscan/flatten.rs | crates/verify/src/etherscan/flatten.rs | use super::{EtherscanSourceProvider, VerifyArgs};
use crate::provider::VerificationContext;
use eyre::Result;
use foundry_block_explorers::verify::CodeFormat;
use foundry_common::flatten;
use foundry_compilers::{
AggregatedCompilerOutput,
artifacts::{BytecodeHash, Source, Sources},
buildinfo::RawBuildInfo,
... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/verify/src/etherscan/mod.rs | crates/verify/src/etherscan/mod.rs | use crate::{
VerifierArgs,
provider::{VerificationContext, VerificationProvider},
retry::RETRY_CHECK_ON_VERIFY,
utils::ensure_solc_build_metadata,
verify::{ContractLanguage, VerifyArgs, VerifyCheckArgs},
};
use alloy_json_abi::Function;
use alloy_primitives::hex;
use alloy_provider::Provider;
use al... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/evm/src/lib.rs | crates/evm/evm/src/lib.rs | //! # foundry-evm
//!
//! Main Foundry EVM backend abstractions.
#![cfg_attr(not(test), warn(unused_crate_dependencies))]
#![cfg_attr(docsrs, feature(doc_cfg))]
#[macro_use]
extern crate tracing;
pub mod executors;
pub mod inspectors;
pub use foundry_evm_core as core;
pub use foundry_evm_core::{
Env, EnvMut, Ev... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/evm/src/inspectors/custom_printer.rs | crates/evm/evm/src/inspectors/custom_printer.rs | //! Custom print inspector, it has step level information of execution.
//! It is a great tool if some debugging is needed.
use foundry_common::sh_println;
use foundry_evm_core::backend::DatabaseError;
use revm::{
Database, Inspector,
bytecode::opcode::OpCode,
context::{ContextTr, JournalTr},
inspector... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/evm/src/inspectors/mod.rs | crates/evm/evm/src/inspectors/mod.rs | //! EVM inspectors.
pub use foundry_cheatcodes::{self as cheatcodes, Cheatcodes, CheatsConfig};
pub use foundry_evm_coverage::LineCoverageCollector;
pub use foundry_evm_fuzz::Fuzzer;
pub use foundry_evm_traces::{StackSnapshotType, TracingInspector, TracingInspectorConfig};
pub use revm_inspectors::access_list::Access... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/evm/src/inspectors/stack.rs | crates/evm/evm/src/inspectors/stack.rs | use super::{
Cheatcodes, CheatsConfig, ChiselState, CustomPrintTracer, Fuzzer, LineCoverageCollector,
LogCollector, RevertDiagnostic, ScriptExecutionInspector, TracingInspector,
};
use alloy_evm::{Evm, eth::EthEvmContext};
use alloy_primitives::{
Address, Bytes, Log, TxKind, U256,
map::{AddressHashMap, ... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | true |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/evm/src/inspectors/revert_diagnostic.rs | crates/evm/evm/src/inspectors/revert_diagnostic.rs | use alloy_primitives::{Address, U256};
use alloy_sol_types::SolValue;
use foundry_evm_core::{
backend::DatabaseError,
constants::{CHEATCODE_ADDRESS, HARDHAT_CONSOLE_ADDRESS},
};
use revm::{
Database, Inspector,
bytecode::opcode,
context::{ContextTr, JournalTr},
inspector::JournalExt,
interpr... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/evm/src/inspectors/script.rs | crates/evm/evm/src/inspectors/script.rs | use alloy_evm::Database;
use alloy_primitives::{Address, Bytes};
use foundry_evm_core::backend::DatabaseError;
use revm::{
Inspector,
bytecode::opcode::ADDRESS,
context::ContextTr,
inspector::JournalExt,
interpreter::{
InstructionResult, Interpreter, InterpreterAction,
interpreter::E... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/evm/src/inspectors/chisel_state.rs | crates/evm/evm/src/inspectors/chisel_state.rs | use alloy_primitives::U256;
use foundry_evm_core::backend::DatabaseError;
use revm::{
Database, Inspector,
context::ContextTr,
inspector::JournalExt,
interpreter::{Interpreter, interpreter::EthInterpreter, interpreter_types::Jumps},
};
/// An inspector for Chisel
#[derive(Clone, Debug, Default)]
pub st... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/evm/src/inspectors/logs.rs | crates/evm/evm/src/inspectors/logs.rs | use alloy_primitives::Log;
use alloy_sol_types::{SolEvent, SolInterface, SolValue};
use foundry_common::{ErrorExt, fmt::ConsoleFmt};
use foundry_evm_core::{InspectorExt, abi::console, constants::HARDHAT_CONSOLE_ADDRESS};
use revm::{
Inspector,
context::ContextTr,
interpreter::{
CallInputs, CallOutco... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/evm/src/executors/builder.rs | crates/evm/evm/src/executors/builder.rs | use crate::{executors::Executor, inspectors::InspectorStackBuilder};
use foundry_evm_core::{Env, backend::Backend};
use revm::primitives::hardfork::SpecId;
/// The builder that allows to configure an evm [`Executor`] which a stack of optional
/// [`revm::Inspector`]s, such as [`Cheatcodes`].
///
/// By default, the [`... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/evm/src/executors/trace.rs | crates/evm/evm/src/executors/trace.rs | use crate::{
Env,
executors::{Executor, ExecutorBuilder},
};
use alloy_primitives::{Address, U256, map::HashMap};
use alloy_rpc_types::state::StateOverride;
use eyre::Context;
use foundry_compilers::artifacts::EvmVersion;
use foundry_config::{Chain, Config, utils::evm_spec_id};
use foundry_evm_core::{backend::B... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/evm/src/executors/mod.rs | crates/evm/evm/src/executors/mod.rs | //! EVM executor abstractions, which can execute calls.
//!
//! Used for running tests, scripts, and interacting with the inner backend which holds the state.
// TODO: The individual executors in this module should be moved into the respective crates, and the
// `Executor` struct should be accessed using a trait defin... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | true |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/evm/src/executors/corpus.rs | crates/evm/evm/src/executors/corpus.rs | use crate::executors::{Executor, RawCallResult, invariant::execute_tx};
use alloy_dyn_abi::JsonAbiExt;
use alloy_json_abi::Function;
use alloy_primitives::Bytes;
use eyre::eyre;
use foundry_config::FuzzCorpusConfig;
use foundry_evm_fuzz::{
BasicTxDetails,
invariant::FuzzRunIdentifiedContracts,
strategies::{... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/evm/src/executors/invariant/error.rs | crates/evm/evm/src/executors/invariant/error.rs | use super::InvariantContract;
use crate::executors::RawCallResult;
use alloy_primitives::{Address, Bytes};
use foundry_config::InvariantConfig;
use foundry_evm_core::decode::RevertDecoder;
use foundry_evm_fuzz::{BasicTxDetails, Reason, invariant::FuzzRunIdentifiedContracts};
use proptest::test_runner::TestError;
/// S... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/evm/src/executors/invariant/result.rs | crates/evm/evm/src/executors/invariant/result.rs | use super::{
InvariantFailures, InvariantFuzzError, InvariantMetrics, InvariantTest, InvariantTestRun,
call_after_invariant_function, call_invariant_function, error::FailedInvariantCaseData,
};
use crate::executors::{Executor, RawCallResult};
use alloy_dyn_abi::JsonAbiExt;
use eyre::Result;
use foundry_config::... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/evm/src/executors/invariant/mod.rs | crates/evm/evm/src/executors/invariant/mod.rs | use crate::{
executors::{Executor, RawCallResult},
inspectors::Fuzzer,
};
use alloy_primitives::{
Address, Bytes, FixedBytes, Selector, U256,
map::{AddressMap, HashMap},
};
use alloy_sol_types::{SolCall, sol};
use eyre::{ContextCompat, Result, eyre};
use foundry_common::contracts::{ContractsByAddress, C... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | true |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/evm/src/executors/invariant/replay.rs | crates/evm/evm/src/executors/invariant/replay.rs | use super::{call_after_invariant_function, call_invariant_function, execute_tx};
use crate::executors::{EarlyExit, Executor, invariant::shrink::shrink_sequence};
use alloy_dyn_abi::JsonAbiExt;
use alloy_primitives::{Log, map::HashMap};
use eyre::Result;
use foundry_common::{ContractsByAddress, ContractsByArtifact};
use... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/evm/src/executors/invariant/shrink.rs | crates/evm/evm/src/executors/invariant/shrink.rs | use crate::executors::{
EarlyExit, Executor,
invariant::{call_after_invariant_function, call_invariant_function, execute_tx},
};
use alloy_primitives::{Address, Bytes};
use foundry_config::InvariantConfig;
use foundry_evm_core::constants::MAGIC_ASSUME;
use foundry_evm_fuzz::{BasicTxDetails, invariant::Invariant... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/evm/src/executors/fuzz/types.rs | crates/evm/evm/src/executors/fuzz/types.rs | use crate::executors::RawCallResult;
use alloy_primitives::{Bytes, Log, map::HashMap};
use foundry_evm_core::Breakpoints;
use foundry_evm_coverage::HitMaps;
use foundry_evm_fuzz::FuzzCase;
use foundry_evm_traces::SparsedTraceArena;
use revm::interpreter::InstructionResult;
/// Returned by a single fuzz in the case of ... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/evm/src/executors/fuzz/mod.rs | crates/evm/evm/src/executors/fuzz/mod.rs | use crate::executors::{
DURATION_BETWEEN_METRICS_REPORT, EarlyExit, Executor, FuzzTestTimer, RawCallResult,
};
use alloy_dyn_abi::JsonAbiExt;
use alloy_json_abi::Function;
use alloy_primitives::{Address, Bytes, Log, U256, map::HashMap};
use eyre::Result;
use foundry_common::sh_println;
use foundry_config::FuzzConfi... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/coverage/src/lib.rs | crates/evm/coverage/src/lib.rs | //! # foundry-evm-coverage
//!
//! EVM bytecode coverage analysis.
#![cfg_attr(not(test), warn(unused_crate_dependencies))]
#![cfg_attr(docsrs, feature(doc_cfg))]
#[macro_use]
extern crate tracing;
use alloy_primitives::{
Bytes,
map::{B256HashMap, HashMap, rustc_hash::FxHashMap},
};
use analysis::SourceAnaly... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/coverage/src/anchors.rs | crates/evm/coverage/src/anchors.rs | use super::{CoverageItemKind, ItemAnchor, SourceLocation};
use crate::analysis::SourceAnalysis;
use alloy_primitives::map::rustc_hash::FxHashSet;
use eyre::ensure;
use foundry_compilers::artifacts::sourcemap::{SourceElement, SourceMap};
use foundry_evm_core::{bytecode::InstIter, ic::IcPcMap};
use revm::bytecode::opcode... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/coverage/src/analysis.rs | crates/evm/coverage/src/analysis.rs | use super::{CoverageItem, CoverageItemKind, SourceLocation};
use alloy_primitives::map::HashMap;
use foundry_common::TestFunctionExt;
use foundry_compilers::ProjectCompileOutput;
use rayon::prelude::*;
use solar::{
ast::{self, ExprKind, ItemKind, StmtKind, yul},
data_structures::{Never, map::FxHashSet},
int... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/coverage/src/inspector.rs | crates/evm/coverage/src/inspector.rs | use crate::{HitMap, HitMaps};
use alloy_primitives::B256;
use revm::{
Inspector,
context::ContextTr,
inspector::JournalExt,
interpreter::{Interpreter, interpreter_types::Jumps},
};
use std::ptr::NonNull;
/// Inspector implementation for collecting coverage information.
#[derive(Clone, Debug)]
pub struc... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/fuzz/src/lib.rs | crates/evm/fuzz/src/lib.rs | //! # foundry-evm-fuzz
//!
//! EVM fuzzing implementation using [`proptest`].
#![cfg_attr(not(test), warn(unused_crate_dependencies))]
#![cfg_attr(docsrs, feature(doc_cfg))]
#[macro_use]
extern crate tracing;
use alloy_dyn_abi::{DynSolValue, JsonAbiExt};
use alloy_primitives::{
Address, Bytes, Log, U256,
map... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/fuzz/src/error.rs | crates/evm/fuzz/src/error.rs | //! Errors related to fuzz tests.
use proptest::test_runner::Reason;
/// Possible errors when running fuzz tests
#[derive(Debug, thiserror::Error)]
pub enum FuzzError {
#[error("`vm.assume` reject")]
AssumeReject,
#[error("`vm.assume` rejected too many inputs ({0} allowed)")]
TooManyRejects(u32),
}
i... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/fuzz/src/inspector.rs | crates/evm/fuzz/src/inspector.rs | use crate::{invariant::RandomCallGenerator, strategies::EvmFuzzState};
use foundry_common::mapping_slots::step as mapping_step;
use revm::{
Inspector,
context::{ContextTr, Transaction},
inspector::JournalExt,
interpreter::{CallInput, CallInputs, CallOutcome, CallScheme, Interpreter},
};
/// An inspecto... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/fuzz/src/invariant/filters.rs | crates/evm/fuzz/src/invariant/filters.rs | use alloy_json_abi::{Function, JsonAbi};
use alloy_primitives::{Address, Selector};
use foundry_compilers::ArtifactId;
use foundry_evm_core::utils::get_function;
use std::collections::BTreeMap;
/// Contains which contracts are to be targeted or excluded on an invariant test through their
/// artifact identifiers.
#[de... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/fuzz/src/invariant/mod.rs | crates/evm/fuzz/src/invariant/mod.rs | use alloy_json_abi::{Function, JsonAbi};
use alloy_primitives::{Address, Selector, map::HashMap};
use foundry_compilers::artifacts::StorageLayout;
use itertools::Either;
use parking_lot::Mutex;
use std::{collections::BTreeMap, sync::Arc};
mod call_override;
pub use call_override::RandomCallGenerator;
mod filters;
use... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/fuzz/src/invariant/call_override.rs | crates/evm/fuzz/src/invariant/call_override.rs | use crate::{BasicTxDetails, CallDetails};
use alloy_primitives::Address;
use parking_lot::{Mutex, RwLock};
use proptest::{
option::weighted,
strategy::{SBoxedStrategy, Strategy, ValueTree},
test_runner::TestRunner,
};
use std::sync::Arc;
/// Given a TestRunner and a strategy, it generates calls. Used insid... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/fuzz/src/strategies/mutators.rs | crates/evm/fuzz/src/strategies/mutators.rs | use alloy_dyn_abi::Word;
use alloy_primitives::{Address, I256, Sign, U256};
use proptest::{prelude::*, test_runner::TestRunner};
use rand::seq::IndexedRandom;
use std::fmt::Debug;
// Interesting 8-bit values to inject.
static INTERESTING_8: &[i8] = &[-128, -1, 0, 1, 16, 32, 64, 100, 127];
/// Interesting 16-bit value... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/fuzz/src/strategies/invariants.rs | crates/evm/fuzz/src/strategies/invariants.rs | use super::{fuzz_calldata, fuzz_param_from_state};
use crate::{
BasicTxDetails, CallDetails, FuzzFixtures,
invariant::{FuzzRunIdentifiedContracts, SenderFilters},
strategies::{EvmFuzzState, fuzz_calldata_from_state, fuzz_param},
};
use alloy_json_abi::Function;
use alloy_primitives::{Address, U256};
use fou... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/fuzz/src/strategies/calldata.rs | crates/evm/fuzz/src/strategies/calldata.rs | use crate::{
FuzzFixtures,
strategies::{EvmFuzzState, fuzz_param_from_state, fuzz_param_with_fixtures},
};
use alloy_dyn_abi::JsonAbiExt;
use alloy_json_abi::Function;
use alloy_primitives::Bytes;
use proptest::prelude::Strategy;
/// Given a function, it returns a strategy which generates valid calldata
/// fo... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/fuzz/src/strategies/state.rs | crates/evm/fuzz/src/strategies/state.rs | use crate::{
BasicTxDetails, invariant::FuzzRunIdentifiedContracts, strategies::literals::LiteralsDictionary,
};
use alloy_dyn_abi::{DynSolType, DynSolValue, EventExt, FunctionExt};
use alloy_json_abi::{Function, JsonAbi};
use alloy_primitives::{
Address, B256, Bytes, Log, U256,
map::{AddressIndexSet, Addre... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/fuzz/src/strategies/uint.rs | crates/evm/fuzz/src/strategies/uint.rs | use alloy_dyn_abi::{DynSolType, DynSolValue};
use alloy_primitives::U256;
use proptest::{
prelude::Rng,
strategy::{NewTree, Strategy, ValueTree},
test_runner::TestRunner,
};
/// Value tree for unsigned ints (up to uint256).
pub struct UintValueTree {
/// Lower base
lo: U256,
/// Current value
... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/fuzz/src/strategies/mod.rs | crates/evm/fuzz/src/strategies/mod.rs | mod int;
pub use int::IntStrategy;
mod uint;
pub use uint::UintStrategy;
mod param;
pub use param::{fuzz_param, fuzz_param_from_state, fuzz_param_with_fixtures, mutate_param_value};
mod calldata;
pub use calldata::{fuzz_calldata, fuzz_calldata_from_state};
mod state;
pub use state::EvmFuzzState;
mod invariants;
pu... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/fuzz/src/strategies/param.rs | crates/evm/fuzz/src/strategies/param.rs | use super::state::EvmFuzzState;
use crate::strategies::mutators::{
BitMutator, GaussianNoiseMutator, IncrementDecrementMutator, InterestingWordMutator,
};
use alloy_dyn_abi::{DynSolType, DynSolValue, Word};
use alloy_primitives::{Address, B256, I256, U256};
use proptest::{prelude::*, test_runner::TestRunner};
use r... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/fuzz/src/strategies/int.rs | crates/evm/fuzz/src/strategies/int.rs | use alloy_dyn_abi::{DynSolType, DynSolValue};
use alloy_primitives::{I256, Sign, U256};
use proptest::{
prelude::Rng,
strategy::{NewTree, Strategy, ValueTree},
test_runner::TestRunner,
};
/// Value tree for signed ints (up to int256).
pub struct IntValueTree {
/// Lower base (by absolute value)
lo:... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/fuzz/src/strategies/literals.rs | crates/evm/fuzz/src/strategies/literals.rs | use alloy_dyn_abi::DynSolType;
use alloy_primitives::{
B256, Bytes, I256, U256, keccak256,
map::{B256IndexSet, HashMap, IndexSet},
};
use foundry_common::Analysis;
use foundry_compilers::ProjectPathsConfig;
use solar::{
ast::{self, Visit},
interface::source_map::FileName,
};
use std::{
ops::ControlF... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/abi/src/lib.rs | crates/evm/abi/src/lib.rs | //! Solidity ABI-related utilities and [`sol!`](alloy_sol_types::sol) definitions.
#![cfg_attr(not(test), warn(unused_crate_dependencies))]
#![cfg_attr(docsrs, feature(doc_cfg))]
pub mod console;
| rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/abi/src/console/hh.rs | crates/evm/abi/src/console/hh.rs | //! Hardhat `console.sol` interface.
use alloy_sol_types::sol;
use foundry_common_fmt::*;
use foundry_macros::ConsoleFmt;
sol!(
#[sol(abi)]
#[derive(ConsoleFmt)]
Console,
"src/Console.json"
);
pub use Console::*;
| rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/abi/src/console/mod.rs | crates/evm/abi/src/console/mod.rs | use alloy_primitives::{I256, U256};
pub mod ds;
pub mod hh;
pub fn format_units_int(x: &I256, decimals: &U256) -> String {
let (sign, x) = x.into_sign_and_abs();
format!("{sign}{}", format_units_uint(&x, decimals))
}
pub fn format_units_uint(x: &U256, decimals: &U256) -> String {
match alloy_primitives::... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/abi/src/console/ds.rs | crates/evm/abi/src/console/ds.rs | //! DSTest log interface.
use super::{format_units_int, format_units_uint};
use alloy_primitives::hex;
use alloy_sol_types::sol;
use derive_more::Display;
use foundry_common_fmt::UIfmt;
use itertools::Itertools;
// Using UIfmt for consistent and user-friendly formatting
sol! {
#[sol(abi)]
#[derive(Display)]
interfac... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/core/src/evm.rs | crates/evm/core/src/evm.rs | use std::{
marker::PhantomData,
ops::{Deref, DerefMut},
};
use crate::{
Env, InspectorExt, backend::DatabaseExt, constants::DEFAULT_CREATE2_DEPLOYER_CODEHASH,
};
use alloy_consensus::constants::KECCAK_EMPTY;
use alloy_evm::{Evm, EvmEnv, eth::EthEvmContext, precompiles::PrecompilesMap};
use alloy_primitives... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/core/src/lib.rs | crates/evm/core/src/lib.rs | //! # foundry-evm-core
//!
//! Core EVM abstractions.
#![cfg_attr(not(test), warn(unused_crate_dependencies))]
#![cfg_attr(docsrs, feature(doc_cfg))]
use crate::constants::DEFAULT_CREATE2_DEPLOYER;
use alloy_evm::eth::EthEvmContext;
use alloy_primitives::{Address, map::HashMap};
use auto_impl::auto_impl;
use backend:... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/core/src/decode.rs | crates/evm/core/src/decode.rs | //! Various utilities to decode test results.
use crate::abi::{Vm, console};
use alloy_dyn_abi::JsonAbiExt;
use alloy_json_abi::{Error, JsonAbi};
use alloy_primitives::{Log, Selector, hex, map::HashMap};
use alloy_sol_types::{
ContractError::Revert, RevertReason, RevertReason::ContractError, SolEventInterface,
... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/core/src/env.rs | crates/evm/core/src/env.rs | pub use alloy_evm::EvmEnv;
use revm::{
Context, Database, Journal, JournalEntry,
context::{BlockEnv, CfgEnv, JournalInner, JournalTr, TxEnv},
primitives::hardfork::SpecId,
};
/// Helper container type for [`EvmEnv`] and [`TxEnv`].
#[derive(Clone, Debug, Default)]
pub struct Env {
pub evm_env: EvmEnv,
... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/core/src/bytecode.rs | crates/evm/core/src/bytecode.rs | use revm::bytecode::{OpCode, opcode};
use std::{fmt, slice};
/// An iterator that yields opcodes and their immediate data.
///
/// If the bytecode is not well-formed, the iterator will still yield opcodes, but the immediate
/// data may be incorrect. For example, if the bytecode is `PUSH2 0x69`, the iterator will yiel... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/core/src/utils.rs | crates/evm/core/src/utils.rs | use crate::EnvMut;
use alloy_chains::Chain;
use alloy_consensus::{BlockHeader, private::alloy_eips::eip7840::BlobParams};
use alloy_hardforks::EthereumHardfork;
use alloy_json_abi::{Function, JsonAbi};
use alloy_network::{AnyTxEnvelope, TransactionResponse};
use alloy_primitives::{Address, B256, ChainId, Selector, TxKi... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/core/src/hardfork.rs | crates/evm/core/src/hardfork.rs | use alloy_rpc_types::BlockNumberOrTag;
use op_revm::OpSpecId;
use revm::primitives::hardfork::SpecId;
pub use alloy_hardforks::EthereumHardfork;
pub use alloy_op_hardforks::OpHardfork;
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub enum FoundryHardfork {
Ethereum(EthereumHardfork),
Op... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/core/src/either_evm.rs | crates/evm/core/src/either_evm.rs | use alloy_evm::{Database, EthEvm, Evm, EvmEnv, eth::EthEvmContext};
use alloy_op_evm::OpEvm;
use alloy_primitives::{Address, Bytes};
use op_revm::{OpContext, OpHaltReason, OpSpecId, OpTransaction, OpTransactionError};
use revm::{
DatabaseCommit, Inspector,
context::{
BlockEnv, TxEnv,
result::{EV... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/core/src/ic.rs | crates/evm/core/src/ic.rs | use crate::bytecode::InstIter;
use alloy_primitives::map::rustc_hash::FxHashMap;
use serde::Serialize;
/// Maps from program counter to instruction counter.
///
/// Inverse of [`IcPcMap`].
#[derive(Debug, Clone, Serialize)]
#[serde(transparent)]
pub struct PcIcMap {
inner: FxHashMap<u32, u32>,
}
impl PcIcMap {
... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/core/src/constants.rs | crates/evm/core/src/constants.rs | use alloy_primitives::{Address, B256, address, b256, hex};
/// The cheatcode handler address.
///
/// This is the same address as the one used in DappTools's HEVM.
///
/// This is calculated as:
/// `address(bytes20(uint160(uint256(keccak256('hevm cheat code')))))`
pub const CHEATCODE_ADDRESS: Address = address!("0x71... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/core/src/buffer.rs | crates/evm/core/src/buffer.rs | use alloy_primitives::U256;
use revm::bytecode::opcode;
/// Used to keep track of which buffer is currently active to be drawn by the debugger.
#[derive(Debug, PartialEq)]
pub enum BufferKind {
Memory,
Calldata,
Returndata,
}
impl BufferKind {
/// Helper to cycle through the active buffers.
pub fn... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/core/src/opts.rs | crates/evm/core/src/opts.rs | use super::fork::environment;
use crate::{
EvmEnv,
constants::DEFAULT_CREATE2_DEPLOYER,
fork::{CreateFork, configure_env},
};
use alloy_network::Network;
use alloy_primitives::{Address, B256, U256};
use alloy_provider::{Provider, network::AnyRpcBlock};
use eyre::WrapErr;
use foundry_common::{
ALCHEMY_FR... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/core/src/state_snapshot.rs | crates/evm/core/src/state_snapshot.rs | //! Support for snapshotting different states
use alloy_primitives::{U256, map::HashMap};
/// Represents all state snapshots
#[derive(Clone, Debug)]
pub struct StateSnapshots<T> {
id: U256,
state_snapshots: HashMap<U256, T>,
}
impl<T> StateSnapshots<T> {
fn next_id(&mut self) -> U256 {
let id = s... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/core/src/precompiles.rs | crates/evm/core/src/precompiles.rs | use alloy_primitives::{Address, address};
/// The ECRecover precompile address.
pub const EC_RECOVER: Address = address!("0x0000000000000000000000000000000000000001");
/// The SHA-256 precompile address.
pub const SHA_256: Address = address!("0x0000000000000000000000000000000000000002");
/// The RIPEMD-160 precompil... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/core/src/fork/database.rs | crates/evm/core/src/fork/database.rs | //! A revm database that forks off a remote client
use crate::{
backend::{RevertStateSnapshotAction, StateSnapshot},
state_snapshot::StateSnapshots,
};
use alloy_primitives::{Address, B256, U256, map::HashMap};
use alloy_rpc_types::BlockId;
use foundry_fork_db::{BlockchainDb, DatabaseError, SharedBackend};
use... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/core/src/fork/mod.rs | crates/evm/core/src/fork/mod.rs | use super::opts::EvmOpts;
use crate::Env;
mod init;
pub use init::{configure_env, environment};
pub mod database;
mod multi;
pub use multi::{ForkId, MultiFork, MultiForkHandler};
/// Represents a _fork_ of a remote chain whose data is available only via the `url` endpoint.
#[derive(Clone, Debug)]
pub struct CreateF... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/core/src/fork/init.rs | crates/evm/core/src/fork/init.rs | use crate::{AsEnvMut, Env, EvmEnv, utils::apply_chain_and_block_specific_env_changes};
use alloy_consensus::BlockHeader;
use alloy_primitives::{Address, U256};
use alloy_provider::{Network, Provider, network::BlockResponse};
use alloy_rpc_types::BlockNumberOrTag;
use foundry_common::NON_ARCHIVE_NODE_WARNING;
use foundr... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/core/src/fork/multi.rs | crates/evm/core/src/fork/multi.rs | //! Support for running multiple fork backends.
//!
//! The design is similar to the single `SharedBackend`, `BackendHandler` but supports multiple
//! concurrently active pairs at once.
use super::CreateFork;
use crate::Env;
use alloy_consensus::BlockHeader;
use alloy_primitives::{U256, map::HashMap};
use alloy_provi... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/core/src/backend/error.rs | crates/evm/core/src/backend/error.rs | use alloy_primitives::Address;
pub use foundry_fork_db::{DatabaseError, DatabaseResult};
use revm::context_interface::result::EVMError;
use std::convert::Infallible;
pub type BackendResult<T> = Result<T, BackendError>;
/// Errors that can happen when working with [`revm::Database`]
#[derive(Debug, thiserror::Error)]
... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/core/src/backend/mod.rs | crates/evm/core/src/backend/mod.rs | //! Foundry's main executor backend abstraction and implementation.
use crate::{
AsEnvMut, Env, EnvMut, InspectorExt,
constants::{CALLER, CHEATCODE_ADDRESS, DEFAULT_CREATE2_DEPLOYER, TEST_CONTRACT_ADDRESS},
evm::new_evm_with_inspector,
fork::{CreateFork, ForkId, MultiFork},
state_snapshot::StateSna... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | true |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/core/src/backend/in_memory_db.rs | crates/evm/core/src/backend/in_memory_db.rs | //! In-memory database.
use crate::state_snapshot::StateSnapshots;
use alloy_primitives::{Address, B256, U256};
use foundry_fork_db::DatabaseError;
use revm::{
Database, DatabaseCommit,
bytecode::Bytecode,
database::{CacheDB, DatabaseRef, EmptyDB},
primitives::HashMap as Map,
state::{Account, Accou... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/core/src/backend/cow.rs | crates/evm/core/src/backend/cow.rs | //! A wrapper around `Backend` that is clone-on-write used for fuzzing.
use super::BackendError;
use crate::{
AsEnvMut, Env, EnvMut, InspectorExt,
backend::{
Backend, DatabaseExt, JournaledState, LocalForkId, RevertStateSnapshotAction,
diagnostic::RevertDiagnostic,
},
fork::{CreateFork,... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/core/src/backend/snapshot.rs | crates/evm/core/src/backend/snapshot.rs | use super::JournaledState;
use crate::Env;
use alloy_primitives::{
B256, U256,
map::{AddressHashMap, HashMap},
};
use revm::state::AccountInfo;
use serde::{Deserialize, Serialize};
/// A minimal abstraction of a state at a certain point in time
#[derive(Clone, Debug, Default, Serialize, Deserialize)]
pub struc... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/core/src/backend/diagnostic.rs | crates/evm/core/src/backend/diagnostic.rs | use crate::backend::LocalForkId;
use alloy_primitives::{Address, map::AddressHashMap};
use itertools::Itertools;
/// Represents possible diagnostic cases on revert
#[derive(Clone, Debug)]
pub enum RevertDiagnostic {
/// The `contract` does not exist on the `active` fork but exist on other fork(s)
ContractExist... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/networks/src/lib.rs | crates/evm/networks/src/lib.rs | //! # foundry-evm-networks
//!
//! Foundry EVM network configuration.
use crate::celo::transfer::{
CELO_TRANSFER_ADDRESS, CELO_TRANSFER_LABEL, PRECOMPILE_ID_CELO_TRANSFER,
};
use alloy_chains::{
NamedChain,
NamedChain::{Chiado, Gnosis, Moonbase, Moonbeam, MoonbeamDev, Moonriver, Rsk, RskTestnet},
};
use al... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/networks/src/celo/transfer.rs | crates/evm/networks/src/celo/transfer.rs | //! Celo precompile implementation for token transfers.
//!
//! This module implements the Celo transfer precompile that enables native token transfers from an
//! EVM contract. The precompile is part of Celo's token duality system, allowing transfer of
//! native tokens via ERC20.
//!
//! For more details, see: <https... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/networks/src/celo/mod.rs | crates/evm/networks/src/celo/mod.rs | pub mod transfer;
| rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/traces/src/lib.rs | crates/evm/traces/src/lib.rs | //! # foundry-evm-traces
//!
//! EVM trace identifying and decoding.
#![cfg_attr(not(test), warn(unused_crate_dependencies))]
#![cfg_attr(docsrs, feature(doc_cfg))]
#[macro_use]
extern crate foundry_common;
#[macro_use]
extern crate tracing;
use foundry_common::{
contracts::{ContractsByAddress, ContractsByArtif... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/traces/src/folded_stack_trace.rs | crates/evm/traces/src/folded_stack_trace.rs | use alloy_primitives::hex::ToHexExt;
use revm_inspectors::tracing::{
CallTraceArena,
types::{CallTraceNode, CallTraceStep, DecodedTraceStep, TraceMemberOrder},
};
/// Builds a folded stack trace from a call trace arena.
pub fn build(arena: &CallTraceArena) -> Vec<String> {
let mut fst = EvmFoldedStackTrace... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/traces/src/identifier/external.rs | crates/evm/traces/src/identifier/external.rs | use super::{IdentifiedAddress, TraceIdentifier};
use crate::debug::ContractSources;
use alloy_primitives::{
Address,
map::{Entry, HashMap},
};
use eyre::WrapErr;
use foundry_block_explorers::{contract::Metadata, errors::EtherscanError};
use foundry_common::compile::etherscan_project;
use foundry_config::{Chain,... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/traces/src/identifier/local.rs | crates/evm/traces/src/identifier/local.rs | use super::{IdentifiedAddress, TraceIdentifier};
use alloy_dyn_abi::JsonAbiExt;
use alloy_json_abi::JsonAbi;
use alloy_primitives::{Address, Bytes, map::HashMap};
use foundry_common::contracts::{ContractsByArtifact, bytecode_diff_score};
use foundry_compilers::ArtifactId;
use revm_inspectors::tracing::types::CallTraceN... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/traces/src/identifier/signatures.rs | crates/evm/traces/src/identifier/signatures.rs | use alloy_json_abi::{Error, Event, Function, JsonAbi};
use alloy_primitives::{B256, Selector, map::HashMap};
use eyre::Result;
use foundry_common::{
abi::{get_error, get_event, get_func},
fs,
selectors::{OpenChainClient, SelectorKind},
};
use foundry_config::Config;
use serde::{Deserialize, Serialize};
use ... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/traces/src/identifier/mod.rs | crates/evm/traces/src/identifier/mod.rs | use alloy_json_abi::JsonAbi;
use alloy_primitives::{Address, Bytes, map::HashMap};
use foundry_common::ContractsByArtifact;
use foundry_compilers::ArtifactId;
use foundry_config::{Chain, Config};
use revm_inspectors::tracing::types::CallTraceNode;
use std::borrow::Cow;
mod local;
pub use local::LocalTraceIdentifier;
... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/traces/src/decoder/mod.rs | crates/evm/traces/src/decoder/mod.rs | use crate::{
CallTrace, CallTraceArena, CallTraceNode, DecodedCallData,
debug::DebugTraceIdentifier,
identifier::{IdentifiedAddress, LocalTraceIdentifier, SignaturesIdentifier, TraceIdentifier},
};
use alloy_dyn_abi::{DecodedEvent, DynSolValue, EventExt, FunctionExt, JsonAbiExt};
use alloy_json_abi::{Error,... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | true |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/traces/src/decoder/precompiles.rs | crates/evm/traces/src/decoder/precompiles.rs | use crate::{CallTrace, DecodedCallData};
use alloy_primitives::{Address, B256, U256, hex};
use alloy_sol_types::{SolCall, abi, sol};
use foundry_evm_core::precompiles::{
BLAKE_2F, EC_ADD, EC_MUL, EC_PAIRING, EC_RECOVER, IDENTITY, MOD_EXP, POINT_EVALUATION,
RIPEMD_160, SHA_256,
};
use itertools::Itertools;
use r... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/traces/src/backtrace/source_map.rs | crates/evm/traces/src/backtrace/source_map.rs | //! Source map decoding and PC mapping utilities.
use alloy_primitives::Bytes;
use foundry_compilers::{ProjectCompileOutput, artifacts::sourcemap::SourceMap};
use foundry_evm_core::ic::IcPcMap;
use std::path::{Path, PathBuf};
/// Source data for a single contract.
#[derive(Debug, Clone)]
pub struct SourceData {
/... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/traces/src/backtrace/mod.rs | crates/evm/traces/src/backtrace/mod.rs | //! Solidity stack trace support for test failures.
use crate::{CallTrace, SparsedTraceArena};
use alloy_primitives::{Address, Bytes, map::HashMap};
use foundry_compilers::{
Artifact, ArtifactId, ProjectCompileOutput,
artifacts::{ConfigurableContractArtifact, Libraries, sourcemap::SourceMap},
};
use std::{fmt,... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/traces/src/debug/mod.rs | crates/evm/traces/src/debug/mod.rs | mod sources;
use crate::CallTraceNode;
use alloy_dyn_abi::{
DynSolType, DynSolValue, Specifier,
parser::{Parameters, Storage},
};
use alloy_primitives::U256;
use foundry_common::fmt::format_token;
use foundry_compilers::artifacts::sourcemap::{Jump, SourceElement};
use revm::bytecode::opcode::OpCode;
use revm_in... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
foundry-rs/foundry | https://github.com/foundry-rs/foundry/blob/271c34d2550474a8ded7fbeedff398b920a96689/crates/evm/traces/src/debug/sources.rs | crates/evm/traces/src/debug/sources.rs | use eyre::{Context, Result};
use foundry_common::{compact_to_contract, strip_bytecode_placeholders};
use foundry_compilers::{
Artifact, ProjectCompileOutput,
artifacts::{
Bytecode, ContractBytecodeSome, Libraries, Source,
sourcemap::{SourceElement, SourceMap},
},
multi::MultiCompilerLang... | rust | Apache-2.0 | 271c34d2550474a8ded7fbeedff398b920a96689 | 2026-01-04T15:43:23.630446Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.