pub trait EvmStateProvider {
// Required methods
fn basic_account(
&self,
address: &Address,
) -> ProviderResult<Option<Account>>;
fn block_hash(&self, number: BlockNumber) -> ProviderResult<Option<B256>>;
fn bytecode_by_hash(
&self,
code_hash: &B256,
) -> ProviderResult<Option<Bytecode>>;
fn storage(
&self,
account: Address,
storage_key: StorageKey,
) -> ProviderResult<Option<StorageValue>>;
}Expand description
Provides the state necessary for EVM execution.
Required Methods§
Sourcefn basic_account(&self, address: &Address) -> ProviderResult<Option<Account>>
fn basic_account(&self, address: &Address) -> ProviderResult<Option<Account>>
Returns the account, or None if it does not exist.
Sourcefn block_hash(&self, number: BlockNumber) -> ProviderResult<Option<B256>>
fn block_hash(&self, number: BlockNumber) -> ProviderResult<Option<B256>>
Returns the block hash, or None if the block does not exist.
Sourcefn bytecode_by_hash(&self, code_hash: &B256) -> ProviderResult<Option<Bytecode>>
fn bytecode_by_hash(&self, code_hash: &B256) -> ProviderResult<Option<Bytecode>>
Returns bytecode by its hash.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".