Skip to main content

foundry_evm_symbolic/runtime/
control.rs

1use super::*;
2
3#[derive(Clone, Copy, Debug)]
4pub(crate) enum CallKind {
5    Call,
6    CallCode,
7    DelegateCall,
8    StaticCall,
9}
10
11#[derive(Clone, Copy, Debug, PartialEq, Eq)]
12pub(crate) enum CreateKind {
13    Create,
14    Create2,
15}
16
17#[derive(Clone, Copy, Debug)]
18pub(crate) enum StepOutcome {
19    Continue,
20    Forked,
21    Halt,
22    Revert,
23    ExceptionalHalt,
24    Failure,
25    AssumeRejected,
26}
27
28pub(crate) enum CheatcodeOutcome {
29    Continue(Vec<SymExpr>),
30    ContinueData(SymReturnData),
31    Revert(SymReturnData),
32    /// A failed assertion that may also pass: `passing` continues as a successful call, and the
33    /// current path fails the assertion, reverting with `revert` or setting the fail slot.
34    Fork {
35        passing: Box<PathState>,
36        revert: Option<SymReturnData>,
37    },
38    /// A call that returns one of several values: each choice continues on its own path with its
39    /// constraints. The list is never empty.
40    Choices(Vec<(Vec<SymBoolExpr>, SymReturnData)>),
41    Failure,
42}