Struct evm_adapters::sputnik::Executor [−][src]
pub struct Executor<S, E> {
pub executor: E,
pub gas_limit: u64,
// some fields omitted
}
Expand description
Wrapper around Sputnik Executors which implements the Evm
trait.
Fields
executor: E
gas_limit: u64
Implementations
Instantiates the executor given a Sputnik instance.
impl<'a, 'b, B: Backend, P: PrecompileSet> Executor<MemoryStackState<'a, 'a, B>, StackExecutor<'a, 'b, MemoryStackState<'a, 'a, B>, P>>
impl<'a, 'b, B: Backend, P: PrecompileSet> Executor<MemoryStackState<'a, 'a, B>, StackExecutor<'a, 'b, MemoryStackState<'a, 'a, B>, P>>
impl<'a, 'b, B: Backend, P: PrecompileSet> Executor<CheatcodeStackState<'a, B>, CheatcodeStackExecutor<'a, 'b, B, P>>
impl<'a, 'b, B: Backend, P: PrecompileSet> Executor<CheatcodeStackState<'a, B>, CheatcodeStackExecutor<'a, 'b, B, P>>
Trait Implementations
Grabs debug steps
given an iterator of contract address to contract bytecode, initializes the state with the contract deployed at the specified address
Deploys the provided contract bytecode
Runs the selected function
type ReturnReason = ExitReason
type ReturnReason = ExitReason
The returned reason type from an EVM (Success / Revert/ Stopped etc.)
Gets the revert reason type
Whether a return reason should be considered successful
Whether a return reason should be considered failing
Turns on/off tracing, returning the previously set value
Returns whether tracing is enabled
Sets the balance at the specified address
Performs a call_unchecked
, checks if execution reverted, and
proceeds to return the decoded response to the user. Read more
Executes the specified EVM call against the state
Runs the setUp()
function call to instantiate the contract’s state
Runs the failed()
function call to inspect the test contract’s state and
see whether the failed
state var is set. This is to allow compatibility
with dapptools-style DSTest smart contracts to preserve emiting of logs Read more
fn check_success(
&mut self,
address: Address,
reason: &Self::ReturnReason,
should_fail: bool
) -> bool
fn check_success(
&mut self,
address: Address,
reason: &Self::ReturnReason,
should_fail: bool
) -> bool
Given a smart contract address, the result type and whether it’s expected to fail, it returns the test’s success status Read more
Auto Trait Implementations
impl<S, E> RefUnwindSafe for Executor<S, E> where
E: RefUnwindSafe,
S: RefUnwindSafe,
impl<S, E> UnwindSafe for Executor<S, E> where
E: UnwindSafe,
S: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more