Skip to main content

call_invariant_function

Function call_invariant_function 

Source
pub(crate) fn call_invariant_function<FEN: FoundryEvmNetwork>(
    executor: &Executor<FEN>,
    address: Address,
    calldata: Bytes,
) -> Result<(RawCallResult<FEN>, bool)>
Expand description

Calls the invariant function and returns call result and if succeeded.

Uses the handler-gate success check (same rationale as call_after_invariant_function): the predicate is broken iff this call’s own changeset writes GLOBAL_FAIL_SLOT (via t() / vm.assert*) or the call reverts; a stale committed slot from a prior handler bug must not poison every later predicate evaluation in the run.