Skip to main content

assert_after_invariant

Function assert_after_invariant 

Source
pub(crate) fn assert_after_invariant<'a, FEN: FoundryEvmNetwork>(
    invariant_contract: &InvariantContract<'a>,
    invariant_test: &mut InvariantTest,
    invariant_run: &InvariantTestRun<FEN>,
    invariant_config: &InvariantConfig,
) -> Result<Option<&'a Function>>
Expand description

Given the executor state, asserts conditions within afterInvariant function.

Returns Some(anchor) if the hook failed (so the caller can record the failure event without re-scanning the failures map), or None if the hook succeeded.