Skip to content

Commit 424b647

Browse files
authored
feat: extend Evm::Spec bounds with Hash and PartialEq (#88)
* feat: extend Evm::Spec bounds with Hash and PartialEq * include bounds in EvmFactory too * Eq * Default
1 parent bd9097f commit 424b647

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

crates/evm/src/evm.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
33
use crate::{EvmEnv, EvmError, IntoTxEnv};
44
use alloy_primitives::{Address, Bytes};
5-
use core::{error::Error, fmt::Debug};
5+
use core::{error::Error, fmt::Debug, hash::Hash};
66
use revm::{
77
context::{result::ExecutionResult, BlockEnv},
88
context_interface::{
@@ -41,7 +41,7 @@ pub trait Evm {
4141
type HaltReason: HaltReasonTr + Send + Sync + 'static;
4242
/// Identifier of the EVM specification. EVM is expected to use this identifier to determine
4343
/// which features are enabled.
44-
type Spec: Debug + Copy + Send + Sync + 'static;
44+
type Spec: Debug + Copy + Hash + Eq + Send + Sync + Default + 'static;
4545
/// Precompiles used by the EVM.
4646
type Precompiles;
4747
/// Evm inspector.
@@ -166,7 +166,7 @@ pub trait EvmFactory {
166166
/// Halt reason. See [`Evm::HaltReason`].
167167
type HaltReason: HaltReasonTr + Send + Sync + 'static;
168168
/// The EVM specification identifier, see [`Evm::Spec`].
169-
type Spec: Debug + Copy + Send + Sync + 'static;
169+
type Spec: Debug + Copy + Hash + Eq + Send + Sync + Default + 'static;
170170
/// Precompiles used by the EVM.
171171
type Precompiles;
172172

0 commit comments

Comments
 (0)