Skip to main content

shrink_sequence_value

Function shrink_sequence_value 

Source
pub(crate) fn shrink_sequence_value<FEN: FoundryEvmNetwork>(
    config: &InvariantConfig,
    invariant_contract: &InvariantContract<'_>,
    target_invariant: &Function,
    calls: &[BasicTxDetails],
    executor: &Executor<FEN>,
    target_value: I256,
    targets: &[Address],
    progress: &ShrinkProgress<'_>,
    early_exit: &EarlyExit,
) -> Result<(Vec<BasicTxDetails>, I256)>
Expand description

Shrinks an optimization witness while preserving the best value seen during replay. Warp and roll of removed calls move to the next kept call. Returns the shrunk sequence and its value, which can exceed target_value.