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