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
Auto Trait Implementations
impl RefUnwindSafe for Context
impl !Send for Context
impl !Sync for Context
impl Unpin for Context
impl UnwindSafe for Context
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more