mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat: add functions for env creation (#12928)
This commit is contained in:
@ -12,10 +12,8 @@ use reth_primitives::{Receipt, SealedBlockWithSenders, SealedHeader};
|
||||
use reth_primitives_traits::SignedTransaction;
|
||||
use reth_provider::{BlockExecutionOutput, ChainSpecProvider, StateProviderFactory};
|
||||
use reth_revm::{
|
||||
database::StateProviderDatabase,
|
||||
db::states::bundle_state::BundleRetention,
|
||||
primitives::{BlockEnv, CfgEnvWithHandlerCfg, EnvWithHandlerCfg},
|
||||
DatabaseCommit, StateBuilder,
|
||||
database::StateProviderDatabase, db::states::bundle_state::BundleRetention,
|
||||
primitives::EnvWithHandlerCfg, DatabaseCommit, StateBuilder,
|
||||
};
|
||||
use reth_rpc_api::DebugApiClient;
|
||||
use reth_tracing::tracing::warn;
|
||||
@ -76,9 +74,7 @@ where
|
||||
.build();
|
||||
|
||||
// Setup environment for the execution.
|
||||
let mut cfg = CfgEnvWithHandlerCfg::new(Default::default(), Default::default());
|
||||
let mut block_env = BlockEnv::default();
|
||||
self.evm_config.fill_cfg_and_block_env(&mut cfg, &mut block_env, block.header(), U256::MAX);
|
||||
let (cfg, block_env) = self.evm_config.cfg_and_block_env(block.header(), U256::MAX);
|
||||
|
||||
// Setup EVM
|
||||
let mut evm = self.evm_config.evm_with_env(
|
||||
|
||||
Reference in New Issue
Block a user