Re-exportsยง
use super::test;๐use crate::result::SuiteTestResult;๐use crate::result::TestKindReport;๐use crate::result::TestOutcome;๐use alloy_primitives::U256;๐use alloy_primitives::map::HashMap;๐use clap::Parser;๐use clap::ValueHint;๐use clap::builder::RangedU64ValueParser;๐use comfy_table::Cell;๐use comfy_table::Color;๐use comfy_table::Row;๐use comfy_table::Table;๐use comfy_table::presets::ASCII_FULL;๐use comfy_table::presets::ASCII_MARKDOWN;๐use eyre::Context;๐use eyre::Result;๐use foundry_cli::utils::STATIC_FUZZ_SEED;๐use foundry_common::shell;๐use regex::Regex;๐use std::cmp::Ordering;๐use std::fs;๐use std::io;๐use std::io::BufRead;๐use std::path::Path;๐use std::path::PathBuf;๐use std::str::FromStr;๐use std::sync::LazyLock;๐use yansi::Paint;๐
Structsยง
- GasSnapshot
Args - CLI arguments for
forge snapshot. - GasSnapshot
Config ๐ - Additional filters that can be applied on the test results
- GasSnapshot
Diff - A Gas snapshot entry diff.
- GasSnapshot
Entry - A general entry in a gas snapshot file
Enumsยง
- Diff
Sort ๐Order - Sort order for diff output
- Format
Staticsยง
- RE_
BASIC_ SNAPSHOT_ ENTRY - A regex that matches a basic snapshot entry like
Test:testDeposit() (gas: 58804)
Functionsยง
- build_
gas_ ๐snapshot_ table - check ๐
- Compares the set of tests with an existing gas snapshot.
- diff ๐
- Compare the set of tests with an existing gas snapshot.
- expand_
invariant_ ๐snapshot_ entries - Expands merged invariant campaigns into per-predicate gas snapshot rows.
- fmt_
change ๐ - fmt_
pct_ ๐change - parse_
snapshot_ ๐value - read_
gas_ ๐snapshot - Reads a list of gas snapshot entries from a gas snapshot file.
- within_
tolerance ๐ - Returns true of the difference between the gas values exceeds the tolerance
- write_
to_ ๐gas_ snapshot_ file - Writes a series of tests to a gas snapshot file after sorting them.