1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
use super::TrapKind;
use cfx_types::U256;

#[derive(Clone)]
pub enum InstructionResult<Gas> {
    Ok,
    UnusedGas(Gas),
    JumpToPosition(U256),
    JumpToSubroutine(U256),
    ReturnFromSubroutine(usize),
    StopExecutionNeedsReturn {
        /// Gas left.
        gas: Gas,
        /// Return data offset.
        init_off: U256,
        /// Return data size.
        init_size: U256,
        /// Apply or revert state changes.
        apply: bool,
    },
    StopExecution,
    Trap(TrapKind),
}