cfx_vm_types/interpreter_info.rs
1use cfx_types::{Address, U256};
2
3pub trait InterpreterInfo {
4 fn gas_remainning(&self) -> U256;
5
6 fn program_counter(&self) -> u64;
7
8 fn current_opcode(&self) -> u8;
9
10 fn opcode(&self, pc: u64) -> Option<u8>;
11
12 fn mem(&self) -> &Vec<u8>;
13
14 fn stack(&self) -> &Vec<U256>;
15
16 fn return_stack(&self) -> &Vec<usize>;
17
18 fn contract_address(&self) -> Address;
19}