[−][src]Trait evm::Handler
EVM context handler.
Associated Types
type CreateInterrupt
Type of CREATE
interrupt.
type CreateFeedback
Feedback value for CREATE
interrupt.
type CallInterrupt
Type of CALL
interrupt.
type CallFeedback
Feedback value of CALL
interrupt.
Required methods
fn balance(&self, address: H160) -> U256
Get balance of address.
fn code_size(&self, address: H160) -> U256
Get code size of address.
fn code_hash(&self, address: H160) -> H256
Get code hash of address.
fn code(&self, address: H160) -> Vec<u8>
Get code of address.
fn storage(&self, address: H160, index: H256) -> H256
Get storage value of address at index.
fn original_storage(&self, address: H160, index: H256) -> H256
Get original storage value of address at index.
fn gas_left(&self) -> U256
Get the gas left value.
fn gas_price(&self) -> U256
Get the gas price value.
fn origin(&self) -> H160
Get execution origin.
fn block_hash(&self, number: U256) -> H256
Get environmental block hash.
fn block_number(&self) -> U256
Get environmental block number.
fn block_coinbase(&self) -> H160
Get environmental coinbase.
fn block_timestamp(&self) -> U256
Get environmental block timestamp.
fn block_difficulty(&self) -> U256
Get environmental block difficulty.
fn block_gas_limit(&self) -> U256
Get environmental gas limit.
fn chain_id(&self) -> U256
Get environmental chain ID.
fn exists(&self, address: H160) -> bool
Check whether an address exists.
fn deleted(&self, address: H160) -> bool
Check whether an address has already been deleted.
fn set_storage(
&mut self,
address: H160,
index: H256,
value: H256
) -> Result<(), ExitError>
&mut self,
address: H160,
index: H256,
value: H256
) -> Result<(), ExitError>
Set storage value of address at index.
fn log(
&mut self,
address: H160,
topcis: Vec<H256>,
data: Vec<u8>
) -> Result<(), ExitError>
&mut self,
address: H160,
topcis: Vec<H256>,
data: Vec<u8>
) -> Result<(), ExitError>
Create a log owned by address with given topics and data.
fn mark_delete(&mut self, address: H160, target: H160) -> Result<(), ExitError>
Mark an address to be deleted, with funds transferred to target.
fn create(
&mut self,
caller: H160,
scheme: CreateScheme,
value: U256,
init_code: Vec<u8>,
target_gas: Option<usize>
) -> Capture<(ExitReason, Option<H160>, Vec<u8>), Self::CreateInterrupt>
&mut self,
caller: H160,
scheme: CreateScheme,
value: U256,
init_code: Vec<u8>,
target_gas: Option<usize>
) -> Capture<(ExitReason, Option<H160>, Vec<u8>), Self::CreateInterrupt>
Invoke a create operation.
fn call(
&mut self,
code_address: H160,
transfer: Option<Transfer>,
input: Vec<u8>,
target_gas: Option<usize>,
is_static: bool,
context: Context
) -> Capture<(ExitReason, Vec<u8>), Self::CallInterrupt>
&mut self,
code_address: H160,
transfer: Option<Transfer>,
input: Vec<u8>,
target_gas: Option<usize>,
is_static: bool,
context: Context
) -> Capture<(ExitReason, Vec<u8>), Self::CallInterrupt>
Invoke a call operation.
fn pre_validate(
&mut self,
context: &Context,
opcode: Result<Opcode, ExternalOpcode>,
stack: &Stack
) -> Result<(), ExitError>
&mut self,
context: &Context,
opcode: Result<Opcode, ExternalOpcode>,
stack: &Stack
) -> Result<(), ExitError>
Pre-validation step for the runtime.
Provided methods
fn create_feedback(
&mut self,
_feedback: Self::CreateFeedback
) -> Result<(), ExitError>
&mut self,
_feedback: Self::CreateFeedback
) -> Result<(), ExitError>
Feed in create feedback.
fn call_feedback(
&mut self,
_feedback: Self::CallFeedback
) -> Result<(), ExitError>
&mut self,
_feedback: Self::CallFeedback
) -> Result<(), ExitError>
Feed in call feedback.
fn other(&mut self, _opcode: u8, _stack: &mut Machine) -> Result<(), ExitError>
Handle other unknown external opcodes.
Implementors
impl<'backend, 'config, B: Backend> Handler for StackExecutor<'backend, 'config, B>
[src]
type CreateInterrupt = Infallible
type CreateFeedback = Infallible
type CallInterrupt = Infallible
type CallFeedback = Infallible
fn balance(&self, address: H160) -> U256
[src]
fn code_size(&self, address: H160) -> U256
[src]
fn code_hash(&self, address: H160) -> H256
[src]
fn code(&self, address: H160) -> Vec<u8>
[src]
fn storage(&self, address: H160, index: H256) -> H256
[src]
fn original_storage(&self, address: H160, index: H256) -> H256
[src]
fn exists(&self, address: H160) -> bool
[src]
fn gas_left(&self) -> U256
[src]
fn gas_price(&self) -> U256
[src]
fn origin(&self) -> H160
[src]
fn block_hash(&self, number: U256) -> H256
[src]
fn block_number(&self) -> U256
[src]
fn block_coinbase(&self) -> H160
[src]
fn block_timestamp(&self) -> U256
[src]
fn block_difficulty(&self) -> U256
[src]
fn block_gas_limit(&self) -> U256
[src]
fn chain_id(&self) -> U256
[src]
fn deleted(&self, address: H160) -> bool
[src]
fn set_storage(
&mut self,
address: H160,
index: H256,
value: H256
) -> Result<(), ExitError>
[src]
&mut self,
address: H160,
index: H256,
value: H256
) -> Result<(), ExitError>
fn log(
&mut self,
address: H160,
topics: Vec<H256>,
data: Vec<u8>
) -> Result<(), ExitError>
[src]
&mut self,
address: H160,
topics: Vec<H256>,
data: Vec<u8>
) -> Result<(), ExitError>
fn mark_delete(&mut self, address: H160, target: H160) -> Result<(), ExitError>
[src]
fn create(
&mut self,
caller: H160,
scheme: CreateScheme,
value: U256,
init_code: Vec<u8>,
target_gas: Option<usize>
) -> Capture<(ExitReason, Option<H160>, Vec<u8>), Self::CreateInterrupt>
[src]
&mut self,
caller: H160,
scheme: CreateScheme,
value: U256,
init_code: Vec<u8>,
target_gas: Option<usize>
) -> Capture<(ExitReason, Option<H160>, Vec<u8>), Self::CreateInterrupt>
fn call(
&mut self,
code_address: H160,
transfer: Option<Transfer>,
input: Vec<u8>,
target_gas: Option<usize>,
is_static: bool,
context: Context
) -> Capture<(ExitReason, Vec<u8>), Self::CallInterrupt>
[src]
&mut self,
code_address: H160,
transfer: Option<Transfer>,
input: Vec<u8>,
target_gas: Option<usize>,
is_static: bool,
context: Context
) -> Capture<(ExitReason, Vec<u8>), Self::CallInterrupt>
fn pre_validate(
&mut self,
context: &Context,
opcode: Result<Opcode, ExternalOpcode>,
stack: &Stack
) -> Result<(), ExitError>
[src]
&mut self,
context: &Context,
opcode: Result<Opcode, ExternalOpcode>,
stack: &Stack
) -> Result<(), ExitError>