[][src]Struct evmc_vm::ExecutionContext

pub struct ExecutionContext<'a> { /* fields omitted */ }

EVMC context structure. Exposes the EVMC host functions, message data, and transaction context to the executing VM.

Implementations

impl<'a> ExecutionContext<'a>[src]

pub fn new(
    host: &'a evmc_host_interface,
    _context: *mut evmc_host_context
) -> Self
[src]

pub fn get_tx_context(&self) -> &ExecutionTxContext[src]

Retrieve the transaction context.

pub fn account_exists(&self, address: &Address) -> bool[src]

Check if an account exists.

pub fn get_storage(&self, address: &Address, key: &Bytes32) -> Bytes32[src]

Read from a storage key.

pub fn set_storage(
    &mut self,
    address: &Address,
    key: &Bytes32,
    value: &Bytes32
) -> StorageStatus
[src]

Set value of a storage key.

pub fn get_balance(&self, address: &Address) -> Uint256[src]

Get balance of an account.

pub fn get_code_size(&self, address: &Address) -> usize[src]

Get code size of an account.

pub fn get_code_hash(&self, address: &Address) -> Bytes32[src]

Get code hash of an account.

pub fn copy_code(
    &self,
    address: &Address,
    code_offset: usize,
    buffer: &mut [u8]
) -> usize
[src]

Copy code of an account.

pub fn selfdestruct(&mut self, address: &Address, beneficiary: &Address)[src]

Self-destruct the current account.

pub fn call(&mut self, message: &ExecutionMessage) -> ExecutionResult[src]

Call to another account.

pub fn get_block_hash(&self, num: i64) -> Bytes32[src]

Get block hash of an account.

pub fn emit_log(&mut self, address: &Address, data: &[u8], topics: &[Bytes32])[src]

Emit a log.

Auto Trait Implementations

impl<'a> RefUnwindSafe for ExecutionContext<'a>

impl<'a> !Send for ExecutionContext<'a>

impl<'a> !Sync for ExecutionContext<'a>

impl<'a> Unpin for ExecutionContext<'a>

impl<'a> UnwindSafe for ExecutionContext<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.