mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: EvmStateProvider doc improvements (#10735)
This commit is contained in:
@ -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,
|
||||
|
||||
Reference in New Issue
Block a user