pub trait FoundryDatabase: DynDatabase {
// Provided methods
fn is_forked_mode(&self) -> bool { ... }
fn active_fork_source_chain_id(&self) -> Option<u64> { ... }
fn evict_account(&self, _address: &Address) { ... }
fn evict_storage(&self, _address: &Address, _slot: &U256) { ... }
fn set_eip161(&self, _eip161: bool) { ... }
fn prefetch_call(
&self,
_caller: Address,
_target: Address,
_value: U256,
_input: Bytes,
_local: Option<&Cache>,
_overrides: bool,
) { ... }
}Expand description
Database view the factory needs at construction time.
Provided Methods§
Sourcefn is_forked_mode(&self) -> bool
fn is_forked_mode(&self) -> bool
Whether the database is currently in forked mode.
Sourcefn 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.
Sourcefn evict_account(&self, _address: &Address)
fn evict_account(&self, _address: &Address)
Drops remotely cached state of address, so the next read refetches it.
Sourcefn 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.
Sourcefn 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.
Sourcefn 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".