pub struct Machine {
pub contract: Contract,
pub program_counter: *const u8,
pub memory: Memory,
pub stack: Stack,
pub gas: Gas,
pub return_data_buffer: Bytes,
pub return_range: Range<usize>,
pub call_depth: u64,
}
Fields
contract: Contract
Contract information and invoking data
program_counter: *const u8
Program counter.
memory: Memory
Memory.
stack: Stack
Stack.
gas: Gas
left gas. Memory gas can be found in Memory field.
return_data_buffer: Bytes
After call returns, its return data is saved here.
return_range: Range<usize>
Return value.
call_depth: u64
used only for inspector.
Implementations
Return a reference of the program counter.
loop steps until we are finished with execution
Copy and get the return value of the machine, if any.