pub trait HostContext {
fn account_exists(&mut self, addr: &Address) -> bool;
fn get_storage(&mut self, addr: &Address, key: &Bytes32) -> Bytes32;
fn set_storage(
&mut self,
addr: &Address,
key: &Bytes32,
value: &Bytes32
) -> StorageStatus;
fn get_balance(&mut self, addr: &Address) -> Bytes32;
fn get_code_size(&mut self, addr: &Address) -> usize;
fn get_code_hash(&mut self, addr: &Address) -> Bytes32;
fn copy_code(
&mut self,
addr: &Address,
offset: &usize,
buffer_data: &*mut u8,
buffer_size: &usize
) -> usize;
fn selfdestruct(&mut self, addr: &Address, beneficiary: &Address);
fn get_tx_context(
&mut self
) -> (Bytes32, Address, Address, i64, i64, i64, Bytes32);
fn get_block_hash(&mut self, number: i64) -> Bytes32;
fn emit_log(&mut self, addr: &Address, topics: &Vec<Bytes32>, data: &Bytes);
fn call(
&mut self,
kind: CallKind,
destination: &Address,
sender: &Address,
value: &Bytes32,
input: &Bytes,
gas: i64,
depth: i32,
is_static: bool,
salt: &Bytes32
) -> (Vec<u8>, i64, Address, StatusCode);
}