chore: EvmStateProvider doc improvements (#10735)

This commit is contained in:
Dan Cline
2024-09-05 19:34:54 -04:00
committed by GitHub
parent 0c2b496503
commit 399c27082f

View File

@ -8,26 +8,26 @@ use revm::{
Database,
};
/// A helper trait responsible for providing that necessary state for the EVM execution.
/// A helper trait responsible for providing state necessary for EVM execution.
///
/// This servers as the data layer for [Database].
/// This serves as the data layer for [`Database`].
pub trait EvmStateProvider: Send + Sync {
/// Get basic account information.
///
/// Returns `None` if the account doesn't exist.
/// Returns [`None`] if the account doesn't exist.
fn basic_account(&self, address: Address) -> ProviderResult<Option<Account>>;
/// Get the hash of the block with the given number. Returns `None` if no block with this number
/// exists.
/// Get the hash of the block with the given number. Returns [`None`] if no block with this
/// number exists.
fn block_hash(&self, number: BlockNumber) -> ProviderResult<Option<B256>>;
/// Get account code by its hash
/// Get account code by hash.
fn bytecode_by_hash(
&self,
code_hash: B256,
) -> ProviderResult<Option<reth_primitives::Bytecode>>;
/// Get storage of given account.
/// Get storage of the given account.
fn storage(
&self,
account: Address,