RpcNodeCore

Trait RpcNodeCore 

Source
pub trait RpcNodeCore:
    Clone
    + Send
    + Sync
    + Unpin
    + 'static {
    type Primitives: NodePrimitives;
    type Provider: BlockReaderIdExt<Block = BlockTy<Self::Primitives>, Receipt = ReceiptTy<Self::Primitives>, Header = HeaderTy<Self::Primitives>, Transaction = TxTy<Self::Primitives>> + ChainSpecProvider<ChainSpec: EthChainSpec<Header = HeaderTy<Self::Primitives>> + Hardforks + EthereumHardforks> + StateProviderFactory + CanonStateSubscriptions<Primitives = Self::Primitives> + StageCheckpointReader + Send + Sync + Clone + Unpin + 'static;
    type Pool: TransactionPool<Transaction: PoolTransaction<Consensus = TxTy<Self::Primitives>>>;
    type Evm: ConfigureEvm<Primitives = Self::Primitives> + Send + Sync + 'static;
    type Network: NetworkInfo + Clone;

    // Required methods
    fn pool(&self) -> &Self::Pool;
    fn evm_config(&self) -> &Self::Evm;
    fn network(&self) -> &Self::Network;
    fn provider(&self) -> &Self::Provider;
}
Expand description

Helper trait that provides the same interface as FullNodeComponents but without requiring implementation of trait bounds.

This trait is structurally equivalent to FullNodeComponents, exposing the same associated types and methods. However, it doesn’t enforce the trait bounds required by FullNodeComponents. This makes it useful for RPC types that need access to node components where the full trait bounds of the components are not necessary.

Every type that is a FullNodeComponents also implements this trait.

Required Associated Types§

Source

type Primitives: NodePrimitives

Blockchain data primitives.

Source

type Provider: BlockReaderIdExt<Block = BlockTy<Self::Primitives>, Receipt = ReceiptTy<Self::Primitives>, Header = HeaderTy<Self::Primitives>, Transaction = TxTy<Self::Primitives>> + ChainSpecProvider<ChainSpec: EthChainSpec<Header = HeaderTy<Self::Primitives>> + Hardforks + EthereumHardforks> + StateProviderFactory + CanonStateSubscriptions<Primitives = Self::Primitives> + StageCheckpointReader + Send + Sync + Clone + Unpin + 'static

The provider type used to interact with the node.

Source

type Pool: TransactionPool<Transaction: PoolTransaction<Consensus = TxTy<Self::Primitives>>>

The transaction pool of the node.

Source

type Evm: ConfigureEvm<Primitives = Self::Primitives> + Send + Sync + 'static

The node’s EVM configuration, defining settings for the Ethereum Virtual Machine.

Source

type Network: NetworkInfo + Clone

Network API.

Required Methods§

Source

fn pool(&self) -> &Self::Pool

Returns the transaction pool of the node.

Source

fn evm_config(&self) -> &Self::Evm

Returns the node’s evm config.

Source

fn network(&self) -> &Self::Network

Returns the handle to the network

Source

fn provider(&self) -> &Self::Provider

Returns the provider of the node.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<Provider, Pool, Network, Evm> RpcNodeCore for RpcNodeCoreAdapter<Provider, Pool, Network, Evm>
where Provider: BlockReaderIdExt<Block = BlockTy<Evm::Primitives>, Receipt = ReceiptTy<Evm::Primitives>, Header = HeaderTy<Evm::Primitives>, Transaction = TxTy<Evm::Primitives>> + ChainSpecProvider<ChainSpec: EthChainSpec<Header = HeaderTy<Evm::Primitives>> + Hardforks + EthereumHardforks> + StateProviderFactory + CanonStateSubscriptions<Primitives = Evm::Primitives> + StageCheckpointReader + Send + Sync + Unpin + Clone + 'static, Evm: ConfigureEvm + Clone + 'static, Pool: TransactionPool<Transaction: PoolTransaction<Consensus = TxTy<Evm::Primitives>>> + Unpin + 'static, Network: NetworkInfo + Clone + Unpin + 'static,

Source§

type Primitives = <Evm as ConfigureEvm>::Primitives

Source§

type Provider = Provider

Source§

type Pool = Pool

Source§

type Evm = Evm

Source§

type Network = Network

Source§

impl<T> RpcNodeCore for T
where T: FullNodeComponents<Provider: ChainSpecProvider<ChainSpec: Hardforks + EthereumHardforks>>,