foundry_evm::executors::invariant::result

Function assert_invariants

Source
pub(crate) fn assert_invariants(
    invariant_contract: &InvariantContract<'_>,
    invariant_config: &InvariantConfig,
    targeted_contracts: &FuzzRunIdentifiedContracts,
    executor: &Executor,
    calldata: &[BasicTxDetails],
    invariant_failures: &mut InvariantFailures,
) -> Result<Option<RawCallResult>>
Expand description

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.