Struct sputnikvm::Context

source ·
pub struct Context {
    pub address: Address,
    pub caller: Address,
    pub code: Rc<Vec<u8>>,
    pub data: Rc<Vec<u8>>,
    pub gas_limit: Gas,
    pub gas_price: Gas,
    pub origin: Address,
    pub value: U256,
    pub apprent_value: U256,
    pub is_system: bool,
    pub is_static: bool,
}
Expand description

A VM context. See the Yellow Paper for more information.

Fields

address: Address

Address that is executing this runtime.

caller: Address

Caller of the runtime.

code: Rc<Vec<u8>>

Code to be executed.

data: Rc<Vec<u8>>

Data associated with this execution.

gas_limit: Gas

Gas limit.

gas_price: Gas

Gas price.

origin: Address

The origin of the context. The same as caller when it is from a transaction.

value: U256

Value passed for this runtime.

apprent_value: U256

Apprent value in the execution context.

is_system: bool

Whether this represents a system call.

is_static: bool

Whether this call is static.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more

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 resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
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.