foundry_evm::executors::invariant::shrink

Function check_sequence

Source
pub fn check_sequence(
    executor: Executor,
    calls: &[BasicTxDetails],
    sequence: Vec<usize>,
    test_address: Address,
    calldata: Bytes,
    fail_on_revert: bool,
    call_after_invariant: bool,
) -> Result<(bool, bool)>
Expand description

Checks if the given call sequence breaks the invariant.

Used in shrinking phase for checking candidate sequences and in replay failures phase to test persisted failures. Returns the result of invariant check (and afterInvariant call if needed) and if sequence was entirely applied.