[−][src]Struct evmc_vm::ExecutionContext
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]
host: &'a evmc_host_interface,
_context: *mut evmc_host_context
) -> Self
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]
&mut self,
address: &Address,
key: &Bytes32,
value: &Bytes32
) -> StorageStatus
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]
&self,
address: &Address,
code_offset: usize,
buffer: &mut [u8]
) -> usize
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,