mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
Add Alias and update usage for emvenv (#14547)
This commit is contained in:
@ -47,6 +47,9 @@ pub mod test_utils;
|
|||||||
|
|
||||||
pub use alloy_evm::{Database, Evm, EvmEnv, EvmError, InvalidTxError};
|
pub use alloy_evm::{Database, Evm, EvmEnv, EvmError, InvalidTxError};
|
||||||
|
|
||||||
|
/// Alias for `EvmEnv<<Evm as ConfigureEvmEnv>::Spec>`
|
||||||
|
pub type EvmEnvFor<Evm> = EvmEnv<<Evm as ConfigureEvmEnv>::Spec>;
|
||||||
|
|
||||||
/// Helper trait to bound [`Inspector`] for a [`ConfigureEvm`].
|
/// Helper trait to bound [`Inspector`] for a [`ConfigureEvm`].
|
||||||
pub trait InspectorFor<DB: Database, Evm: ConfigureEvm>:
|
pub trait InspectorFor<DB: Database, Evm: ConfigureEvm>:
|
||||||
Inspector<<Evm::EvmFactory as EvmFactory<EvmEnv<Evm::Spec>>>::Context<DB>>
|
Inspector<<Evm::EvmFactory as EvmFactory<EvmEnv<Evm::Spec>>>::Context<DB>>
|
||||||
|
|||||||
@ -10,7 +10,7 @@ use alloy_serde::JsonStorageKey;
|
|||||||
use futures::Future;
|
use futures::Future;
|
||||||
use reth_chainspec::{EthChainSpec, EthereumHardforks};
|
use reth_chainspec::{EthChainSpec, EthereumHardforks};
|
||||||
use reth_errors::RethError;
|
use reth_errors::RethError;
|
||||||
use reth_evm::{ConfigureEvmEnv, EvmEnv};
|
use reth_evm::{ConfigureEvmEnv, EvmEnvFor};
|
||||||
use reth_provider::{
|
use reth_provider::{
|
||||||
BlockIdReader, BlockNumReader, ChainSpecProvider, StateProvider, StateProviderBox,
|
BlockIdReader, BlockNumReader, ChainSpecProvider, StateProvider, StateProviderBox,
|
||||||
StateProviderFactory,
|
StateProviderFactory,
|
||||||
@ -210,13 +210,10 @@ pub trait LoadState:
|
|||||||
/// for.
|
/// for.
|
||||||
/// If the [`BlockId`] is pending, this will return the "Pending" tag, otherwise this returns
|
/// If the [`BlockId`] is pending, this will return the "Pending" tag, otherwise this returns
|
||||||
/// the hash of the exact block.
|
/// the hash of the exact block.
|
||||||
#[expect(clippy::type_complexity)]
|
|
||||||
fn evm_env_at(
|
fn evm_env_at(
|
||||||
&self,
|
&self,
|
||||||
at: BlockId,
|
at: BlockId,
|
||||||
) -> impl Future<
|
) -> impl Future<Output = Result<(EvmEnvFor<Self::Evm>, BlockId), Self::Error>> + Send
|
||||||
Output = Result<(EvmEnv<<Self::Evm as ConfigureEvmEnv>::Spec>, BlockId), Self::Error>,
|
|
||||||
> + Send
|
|
||||||
where
|
where
|
||||||
Self: LoadPendingBlock + SpawnBlocking,
|
Self: LoadPendingBlock + SpawnBlocking,
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user