mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat(sdk): introduce PrimitivesTy helper type (#13933)
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
use crate::{ExExContextDyn, ExExEvent, ExExNotifications, ExExNotificationsStream};
|
||||
use reth_exex_types::ExExHead;
|
||||
use reth_node_api::{FullNodeComponents, NodePrimitives, NodeTypes};
|
||||
use reth_node_api::{FullNodeComponents, NodePrimitives, NodeTypes, PrimitivesTy};
|
||||
use reth_node_core::node_config::NodeConfig;
|
||||
use reth_primitives::Head;
|
||||
use reth_provider::BlockReader;
|
||||
@ -62,7 +62,7 @@ where
|
||||
Node::Types: NodeTypes<Primitives: NodePrimitives>,
|
||||
{
|
||||
/// Returns dynamic version of the context
|
||||
pub fn into_dyn(self) -> ExExContextDyn<<Node::Types as NodeTypes>::Primitives> {
|
||||
pub fn into_dyn(self) -> ExExContextDyn<PrimitivesTy<Node::Types>> {
|
||||
ExExContextDyn::from(self)
|
||||
}
|
||||
}
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
use std::fmt::Debug;
|
||||
|
||||
use reth_chainspec::{EthChainSpec, Head};
|
||||
use reth_node_api::{FullNodeComponents, HeaderTy, NodePrimitives, NodeTypes};
|
||||
use reth_node_api::{FullNodeComponents, HeaderTy, NodePrimitives, NodeTypes, PrimitivesTy};
|
||||
use reth_node_core::node_config::NodeConfig;
|
||||
use reth_primitives::EthPrimitives;
|
||||
use reth_provider::BlockReader;
|
||||
@ -50,7 +50,7 @@ impl<N: NodePrimitives> Debug for ExExContextDyn<N> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<Node> From<ExExContext<Node>> for ExExContextDyn<<Node::Types as NodeTypes>::Primitives>
|
||||
impl<Node> From<ExExContext<Node>> for ExExContextDyn<PrimitivesTy<Node::Types>>
|
||||
where
|
||||
Node: FullNodeComponents<Types: NodeTypes<Primitives: NodePrimitives>>,
|
||||
Node::Provider: Debug + BlockReader,
|
||||
|
||||
Reference in New Issue
Block a user