Struct parables_testing::evm::Evm [−][src]
pub struct Evm { /* fields omitted */ }Methods
impl Evm[src]
impl Evmpub fn new(spec: &Spec, context: ContractContext) -> Result<Self, Error>[src]
pub fn new(spec: &Spec, context: ContractContext) -> Result<Self, Error>Create a new ethereum virtual machine abstraction.
pub fn account(&self) -> Result<Account, Error>[src]
pub fn account(&self) -> Result<Account, Error>Create a new account.
pub fn get_block_number(&self) -> u64[src]
pub fn get_block_number(&self) -> u64Get the current block number.
pub fn set_block_number(&mut self, number: u64)[src]
pub fn set_block_number(&mut self, number: u64)Set the current block number.
pub fn env_info(author: Address) -> EnvInfo[src]
pub fn env_info(author: Address) -> EnvInfoCreate a static info structure of the environment.
pub fn deploy<C>(
&self,
constructor: C,
call: Call
) -> Result<Call<Address>, Error> where
C: ContractFunction<Output = Address> + Constructor, [src]
pub fn deploy<C>(
&self,
constructor: C,
call: Call
) -> Result<Call<Address>, Error> where
C: ContractFunction<Output = Address> + Constructor, Deploy the contract with the given code.
pub fn deploy_code(
&self,
code: Vec<u8>,
call: Call,
entry_source: Option<Arc<Source>>,
linker: &Linker
) -> Result<Call<Address>, Error>[src]
pub fn deploy_code(
&self,
code: Vec<u8>,
call: Call,
entry_source: Option<Arc<Source>>,
linker: &Linker
) -> Result<Call<Address>, Error>Deploy the contract with the given code.
pub fn call_default(
&self,
address: Address,
call: Call
) -> Result<Call<()>, Error>[src]
pub fn call_default(
&self,
address: Address,
call: Call
) -> Result<Call<()>, Error>Perform a call against the given address' fallback function.
This is the same as a straight up transfer.
pub fn logs<'a, P>(&'a self, log: P) -> LogDrainer<'a, P> where
P: ParseLog + LogFilter, [src]
pub fn logs<'a, P>(&'a self, log: P) -> LogDrainer<'a, P> where
P: ParseLog + LogFilter, Setup a log drainer that drains the specified logs.
pub fn raw_logs(&self) -> Result<Ref<HashMap<Hash, Vec<LogEntry>>>, Error>[src]
pub fn raw_logs(&self) -> Result<Ref<HashMap<Hash, Vec<LogEntry>>>, Error>Access raw underlying logs.
Note: it is important that the Ref is released as soon as possible since this would otherwise cause borrowing issues for other operations.
pub fn has_logs(&self) -> Result<bool, Error>[src]
pub fn has_logs(&self) -> Result<bool, Error>Check if we still have unclaimed logs.
pub fn balance(&self, address: Address) -> Result<U256, Error>[src]
pub fn balance(&self, address: Address) -> Result<U256, Error>Query the balance of the given account.
pub fn add_balance<W: Into<U256>>(
&self,
address: Address,
wei: W
) -> Result<(), Error>[src]
pub fn add_balance<W: Into<U256>>(
&self,
address: Address,
wei: W
) -> Result<(), Error>Add the given number of wei to the provided account.
Trait Implementations
impl Clone for Evm[src]
impl Clone for Evmfn clone(&self) -> Evm[src]
fn clone(&self) -> EvmReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl Debug for Evm[src]
impl Debug for Evmfn fmt(&self, fmt: &mut Formatter) -> Result[src]
fn fmt(&self, fmt: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Vm for Evm[src]
impl Vm for Evm