Struct sputnikvm::State

source ·
pub struct State<M, P: Patch> {
Show 14 fields pub memory: M, pub stack: Stack, pub context: Context, pub out: Rc<Vec<u8>>, pub ret: Rc<Vec<u8>>, pub memory_cost: Gas, pub used_gas: GasUsage, pub refunded_gas: Gas, pub account_state: AccountState<P::Account>, pub logs: Vec<Log>, pub removed: Vec<Address>, pub depth: usize, pub valids: Valids, pub position: usize,
}
Expand description

A VM state without PC.

Fields

memory: M

Memory of this runtime.

stack: Stack

Stack of this runtime.

context: Context

Context.

out: Rc<Vec<u8>>

The current out value.

ret: Rc<Vec<u8>>

Return data buffer.

memory_cost: Gas

The current memory cost. Note that this is different from memory gas.

used_gas: GasUsage

Used gas excluding memory gas.

refunded_gas: Gas

Refunded gas.

account_state: AccountState<P::Account>

The current account commitment states.

logs: Vec<Log>

Logs appended.

removed: Vec<Address>

All removed accounts using the SUICIDE opcode.

depth: usize

Depth of this runtime.

valids: Valids

Code valid maps.

position: usize

PC position.

Implementations

Memory gas, part of total used gas.

Available gas at this moment.

Total used gas including the memory gas.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.