Skip to main content

invariant_preflight_check

Function invariant_preflight_check 

Source
pub(crate) fn invariant_preflight_check<FEN: FoundryEvmNetwork>(
    invariant_contract: &InvariantContract<'_>,
    invariant_config: &InvariantConfig,
    targeted_contracts: &FuzzRunIdentifiedContracts,
    executor: &Executor<FEN>,
    calldata: &[BasicTxDetails],
    invariant_failures: &mut InvariantFailures,
) -> Result<()>
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.