pub struct EvmOverrides {
pub state: Option<HashMap<Address, AccountOverride, FbBuildHasher<20>>>,
pub block: Option<Box<BlockOverrides>>,
}
Available on crate feature
eth
only.Expand description
Helper type that bundles various overrides for EVM Execution.
By Default
, no overrides are included.
Fields§
§state: Option<HashMap<Address, AccountOverride, FbBuildHasher<20>>>
Applies overrides to the state before execution.
block: Option<Box<BlockOverrides>>
Applies overrides to the block before execution.
This is a Box
because less common and only available in debug trace endpoints.
Implementations§
Source§impl EvmOverrides
impl EvmOverrides
Sourcepub const fn new(
state: Option<HashMap<Address, AccountOverride, FbBuildHasher<20>>>,
block: Option<Box<BlockOverrides>>,
) -> EvmOverrides
pub const fn new( state: Option<HashMap<Address, AccountOverride, FbBuildHasher<20>>>, block: Option<Box<BlockOverrides>>, ) -> EvmOverrides
Creates a new instance with the given overrides
Sourcepub const fn state(
state: Option<HashMap<Address, AccountOverride, FbBuildHasher<20>>>,
) -> EvmOverrides
pub const fn state( state: Option<HashMap<Address, AccountOverride, FbBuildHasher<20>>>, ) -> EvmOverrides
Creates a new instance with the given state overrides.
Sourcepub const fn block(block: Option<Box<BlockOverrides>>) -> EvmOverrides
pub const fn block(block: Option<Box<BlockOverrides>>) -> EvmOverrides
Creates a new instance with the given block overrides.
Sourcepub fn with_state(
self,
state: HashMap<Address, AccountOverride, FbBuildHasher<20>>,
) -> EvmOverrides
pub fn with_state( self, state: HashMap<Address, AccountOverride, FbBuildHasher<20>>, ) -> EvmOverrides
Adds state overrides to an existing instance.
Sourcepub fn with_block(self, block: Box<BlockOverrides>) -> EvmOverrides
pub fn with_block(self, block: Box<BlockOverrides>) -> EvmOverrides
Adds block overrides to an existing instance.
Trait Implementations§
Source§impl Clone for EvmOverrides
impl Clone for EvmOverrides
Source§fn clone(&self) -> EvmOverrides
fn clone(&self) -> EvmOverrides
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for EvmOverrides
impl Debug for EvmOverrides
Source§impl Default for EvmOverrides
impl Default for EvmOverrides
Source§fn default() -> EvmOverrides
fn default() -> EvmOverrides
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for EvmOverrides
impl RefUnwindSafe for EvmOverrides
impl Send for EvmOverrides
impl Sync for EvmOverrides
impl Unpin for EvmOverrides
impl UnwindSafe for EvmOverrides
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more