chore: move nodetypes to node-api (#7268)

This commit is contained in:
Matthias Seitz
2024-03-21 14:35:37 +01:00
committed by GitHub
parent 0da7b7c314
commit 31b94581f9
6 changed files with 30 additions and 20 deletions

View File

@@ -0,0 +1,19 @@
//! Traits for configuring a node
use crate::{primitives::NodePrimitives, ConfigureEvm, EngineTypes};
/// The type that configures the essential types of an ethereum like node.
///
/// This includes the primitive types of a node, the engine API types for communication with the
/// consensus layer, and the EVM configuration type for setting up the Ethereum Virtual Machine.
pub trait NodeTypes: Send + Sync + 'static {
/// The node's primitive types, defining basic operations and structures.
type Primitives: NodePrimitives;
/// The node's engine types, defining the interaction with the consensus engine.
type Engine: EngineTypes;
/// The node's EVM configuration, defining settings for the Ethereum Virtual Machine.
type Evm: ConfigureEvm;
/// Returns the node's evm config.
fn evm_config(&self) -> Self::Evm;
}