pub trait BackingDb:
FoundryDatabase
+ Send
+ Sync
+ 'static {
// Required method
fn clone_backing(&self) -> Box<dyn BackingDb>;
}Expand description
A shareable backing database: every fork and every nested transaction reads through its own handle to the same source.
Required Methods§
Sourcefn clone_backing(&self) -> Box<dyn BackingDb>
fn clone_backing(&self) -> Box<dyn BackingDb>
Returns another handle to the same source.
Trait Implementations§
Source§impl FoundryDatabase for Box<dyn BackingDb>
impl FoundryDatabase for Box<dyn BackingDb>
Source§fn is_forked_mode(&self) -> bool
fn is_forked_mode(&self) -> bool
Whether the database is currently in forked mode.
Source§fn active_fork_source_chain_id(&self) -> Option<u64>
fn active_fork_source_chain_id(&self) -> Option<u64>
Returns the source chain ID of the active fork, independent of execution overrides.
Source§fn evict_account(&self, address: &Address)
fn evict_account(&self, address: &Address)
Drops remotely cached state of
address, so the next read refetches it.Source§fn evict_storage(&self, address: &Address, slot: &U256)
fn evict_storage(&self, address: &Address, slot: &U256)
Drops a remotely cached storage slot, so the next read refetches it.
Source§fn set_eip161(&self, eip161: bool)
fn set_eip161(&self, eip161: bool)
Sets whether the execution reading this database applies EIP-161, under which empty
accounts do not exist.
Source§fn prefetch_call(
&self,
caller: Address,
target: Address,
value: U256,
input: Bytes,
local: Option<&Cache>,
overrides: bool,
)
fn prefetch_call( &self, caller: Address, target: Address, value: U256, input: Bytes, local: Option<&Cache>, overrides: bool, )
Prefetches the remote state a call is about to read, if this database reads a remote
fork. With
overrides, the local state over this database goes along as overrides.
A call sent without overrides is skipped when the fork loaded its target without code. It
is also skipped when local holds its target but the fork never loaded it.Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".