Skip to main content

Module result

Module result 

Source

Re-exportsยง

use super::InvariantFailures; ๐Ÿ”’
use super::InvariantFuzzError; ๐Ÿ”’
use super::InvariantMetrics; ๐Ÿ”’
use super::InvariantTest; ๐Ÿ”’
use super::InvariantTestRun; ๐Ÿ”’
use super::call_after_invariant_function; ๐Ÿ”’
use super::call_invariant_function; ๐Ÿ”’
use super::error::InvariantRunCtx; ๐Ÿ”’
use super::error::record_handler_assertion_bug; ๐Ÿ”’
use crate::executors::Executor; ๐Ÿ”’
use crate::executors::RawCallResult; ๐Ÿ”’
use alloy_json_abi::Function; ๐Ÿ”’
use alloy_primitives::Address; ๐Ÿ”’
use alloy_primitives::B256; ๐Ÿ”’
use alloy_primitives::I256; ๐Ÿ”’
use alloy_primitives::Selector; ๐Ÿ”’
use alloy_sol_types::Panic; ๐Ÿ”’
use alloy_sol_types::PanicKind; ๐Ÿ”’
use alloy_sol_types::Revert; ๐Ÿ”’
use alloy_sol_types::SolError; ๐Ÿ”’
use alloy_sol_types::SolInterface; ๐Ÿ”’
use eyre::Result; ๐Ÿ”’
use foundry_config::InvariantConfig; ๐Ÿ”’
use foundry_evm_core::abi::Vm; ๐Ÿ”’
use foundry_evm_core::constants::CHEATCODE_ADDRESS; ๐Ÿ”’
use foundry_evm_core::decode::ASSERTION_FAILED_PREFIX; ๐Ÿ”’
use foundry_evm_core::decode::decode_console_log; ๐Ÿ”’
use foundry_evm_core::evm::FoundryEvmNetwork; ๐Ÿ”’
use foundry_evm_core::utils::StateChangeset; ๐Ÿ”’
use foundry_evm_coverage::HitMaps; ๐Ÿ”’
use foundry_evm_fuzz::BasicTxDetails; ๐Ÿ”’
use foundry_evm_fuzz::invariant::FuzzRunIdentifiedContracts; ๐Ÿ”’
use foundry_evm_fuzz::invariant::InvariantContract; ๐Ÿ”’
use foundry_evm_traces::CallTraceArena; ๐Ÿ”’
use proptest::test_runner::TestError; ๐Ÿ”’
use revm::interpreter::InstructionResult; ๐Ÿ”’
use std::borrow::Cow; ๐Ÿ”’
use std::collections::HashMap; ๐Ÿ”’

Structsยง

ContinueOutcome ๐Ÿ”’
Outcome of a per-call invariant check.
InvariantFuzzTestResult
The outcome of an invariant fuzz test

Functionsยง

assert_after_invariant ๐Ÿ”’
Given the executor state, asserts conditions within afterInvariant function.
assert_invariants ๐Ÿ”’
Given the executor state, asserts that no invariant has been broken. Otherwise, it fills the external invariant_failures.failed_invariant map.
can_continue ๐Ÿ”’
Returns if invariant test can continue and last successful call result of the invariant test function (if it can continue).
did_fail_on_assert
Returns whether the current fuzz call should be treated as an assertion failure.
invariant_inner_sequence ๐Ÿ”’
Helper function to initialize invariant inner sequence.
invariant_preflight_check ๐Ÿ”’
Given the executor state, asserts that no invariant has been broken. Otherwise, it fills the external invariant_failures.failed_invariant map and returns a generic error. Either returns the call result if successful, or nothing if there was an error.
is_assert_panic ๐Ÿ”’
is_assertion_failure ๐Ÿ”’
Returns true if this call failed due to a Solidity assertion:
is_cheatcode_assert_revert ๐Ÿ”’
is_revert_assertion_failure ๐Ÿ”’
logged_assertion_failure ๐Ÿ”’