dharitri_vm_executor/new_traits/
compilation_options_new.rs

1use crate::CompilationOptionsLegacy;
2
3pub struct CompilationOptions {
4    pub unmetered_locals: usize,
5    pub max_memory_grow: usize,
6    pub max_memory_grow_delta: usize,
7    pub opcode_trace: bool,
8}
9
10impl CompilationOptions {
11    pub fn to_legacy(&self) -> CompilationOptionsLegacy {
12        CompilationOptionsLegacy {
13            gas_limit: 0,
14            unmetered_locals: self.unmetered_locals,
15            max_memory_grow: self.max_memory_grow,
16            max_memory_grow_delta: self.max_memory_grow_delta,
17            opcode_trace: self.opcode_trace,
18            metering: true,
19            runtime_breakpoints: true,
20        }
21    }
22}