pub trait Host {
Show 14 methods fn step(
        &mut self,
        interpreter: &mut Interpreter,
        is_static: bool
    ) -> InstructionResult; fn step_end(
        &mut self,
        interpreter: &mut Interpreter,
        is_static: bool,
        ret: InstructionResult
    ) -> InstructionResult; fn env(&mut self) -> &mut Env; fn load_account(&mut self, address: B160) -> Option<(bool, bool)>; fn block_hash(&mut self, number: U256) -> Option<B256>; fn balance(&mut self, address: B160) -> Option<(U256, bool)>; fn code(&mut self, address: B160) -> Option<(Bytecode, bool)>; fn code_hash(&mut self, address: B160) -> Option<(B256, bool)>; fn sload(&mut self, address: B160, index: U256) -> Option<(U256, bool)>; fn sstore(
        &mut self,
        address: B160,
        index: U256,
        value: U256
    ) -> Option<(U256, U256, U256, bool)>; fn log(&mut self, address: B160, topics: Vec<B256>, data: Bytes); fn selfdestruct(
        &mut self,
        address: B160,
        target: B160
    ) -> Option<SelfDestructResult>; fn create(
        &mut self,
        inputs: &mut CreateInputs
    ) -> (InstructionResult, Option<B160>, Gas, Bytes); fn call(&mut self, input: &mut CallInputs) -> (InstructionResult, Gas, Bytes);
}
Expand description

EVM context host.

Required Methods§

load account. Returns (is_cold,is_new_account)

Get environmental block hash.

Get balance of address and if account is cold loaded.

Get code of address and if account is cold loaded.

Get code hash of address and if account is cold loaded.

Get storage value of address at index and if account is cold loaded.

Set storage value of account address at index. Returns (original, present, new, sis_cold)

Create a log owned by address with given topics and data.

Mark an address to be deleted, with funds transferred to target.

Invoke a create operation.

Invoke a call operation.

Implementors§