mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
remove: Remove HlPrecompiles (not used)
This commit is contained in:
@ -5,11 +5,9 @@ use crate::{
|
||||
builder::HlBuilder,
|
||||
ctx::{DefaultHl, HlContext},
|
||||
},
|
||||
precompiles::HlPrecompiles,
|
||||
spec::HlSpecId,
|
||||
transaction::HlTxEnv,
|
||||
},
|
||||
node::types::ReadPrecompileMap,
|
||||
};
|
||||
use reth_evm::{precompiles::PrecompilesMap, EvmEnv, EvmFactory};
|
||||
use reth_revm::{Context, Database};
|
||||
@ -18,6 +16,7 @@ use revm::{
|
||||
result::{EVMError, HaltReason},
|
||||
TxEnv,
|
||||
},
|
||||
handler::EthPrecompiles,
|
||||
inspector::NoOpInspector,
|
||||
Inspector,
|
||||
};
|
||||
@ -42,15 +41,15 @@ impl EvmFactory for HlEvmFactory {
|
||||
db: DB,
|
||||
input: EvmEnv<HlSpecId>,
|
||||
) -> Self::Evm<DB, NoOpInspector> {
|
||||
let precompiles =
|
||||
HlPrecompiles::new(input.cfg_env.spec, ReadPrecompileMap::default()).precompiles();
|
||||
HlEvm {
|
||||
inner: Context::hl()
|
||||
.with_block(input.block_env)
|
||||
.with_cfg(input.cfg_env)
|
||||
.with_db(db)
|
||||
.build_hl_with_inspector(NoOpInspector {})
|
||||
.with_precompiles(PrecompilesMap::from_static(precompiles)),
|
||||
.with_precompiles(PrecompilesMap::from_static(
|
||||
EthPrecompiles::default().precompiles,
|
||||
)),
|
||||
inspect: false,
|
||||
}
|
||||
}
|
||||
@ -64,15 +63,15 @@ impl EvmFactory for HlEvmFactory {
|
||||
input: EvmEnv<HlSpecId>,
|
||||
inspector: I,
|
||||
) -> Self::Evm<DB, I> {
|
||||
let precompiles =
|
||||
HlPrecompiles::new(input.cfg_env.spec, ReadPrecompileMap::default()).precompiles();
|
||||
HlEvm {
|
||||
inner: Context::hl()
|
||||
.with_block(input.block_env)
|
||||
.with_cfg(input.cfg_env)
|
||||
.with_db(db)
|
||||
.build_hl_with_inspector(inspector)
|
||||
.with_precompiles(PrecompilesMap::from_static(precompiles)),
|
||||
.with_precompiles(PrecompilesMap::from_static(
|
||||
EthPrecompiles::default().precompiles,
|
||||
)),
|
||||
inspect: true,
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
use crate::{
|
||||
evm::{
|
||||
api::{ctx::HlContext, HlEvmInner},
|
||||
precompiles::HlPrecompiles,
|
||||
spec::HlSpecId,
|
||||
transaction::{HlTxEnv, HlTxTr},
|
||||
},
|
||||
@ -19,7 +18,7 @@ use revm::{
|
||||
result::{EVMError, HaltReason, ResultAndState},
|
||||
BlockEnv, TxEnv,
|
||||
},
|
||||
handler::{instructions::EthInstructions, PrecompileProvider},
|
||||
handler::{instructions::EthInstructions, EthPrecompiles, PrecompileProvider},
|
||||
interpreter::{interpreter::EthInterpreter, InterpreterResult},
|
||||
Context, Database, ExecuteEvm, InspectEvm, Inspector,
|
||||
};
|
||||
@ -36,7 +35,7 @@ mod patch;
|
||||
/// This is a wrapper type around the `revm` evm with optional [`Inspector`] (tracing)
|
||||
/// support. [`Inspector`] support is configurable at runtime because it's part of the underlying
|
||||
#[allow(missing_debug_implementations)]
|
||||
pub struct HlEvm<DB: Database, I, P = HlPrecompiles> {
|
||||
pub struct HlEvm<DB: Database, I, P = EthPrecompiles> {
|
||||
pub inner: HlEvmInner<HlContext<DB>, I, EthInstructions<EthInterpreter, HlContext<DB>>, P>,
|
||||
pub inspect: bool,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user