cairo_lang_sierra/simulation/
value.rs

1use std::collections::HashMap;
2
3use starknet_types_core::felt::Felt as Felt252;
4
5/// The logical value of a variable for Sierra simulation.
6#[derive(Clone, Debug, Eq, PartialEq)]
7pub enum CoreValue {
8    EcPoint(Felt252, Felt252),
9    Felt252(Felt252),
10    GasBuiltin(i64),
11    Uint8(u8),
12    Uint16(u16),
13    Uint32(u32),
14    Uint64(u64),
15    Uint128(u128),
16    Array(Vec<CoreValue>),
17    Dict(HashMap<Felt252, CoreValue>),
18    Enum {
19        value: Box<CoreValue>,
20        /// The index of the relevant variant.
21        index: usize,
22    },
23    Struct(Vec<CoreValue>),
24    // The untracked types - do not carry any value.
25    Uninitialized,
26    RangeCheck,
27    Bitwise,
28    U128MulGuarantee,
29}