EthApiBuilder

Trait EthApiBuilder 

Source
pub trait EthApiBuilder<N>:
    Default
    + Send
    + 'static{
    type EthApi: EthApiTypes + FullEthApiServer<Provider = <N as FullNodeTypes>::Provider, Pool = <N as FullNodeComponents>::Pool> + AddDevSigners + Unpin + 'static;

    // Required method
    fn build_eth_api(
        self,
        ctx: EthApiCtx<'_, N>,
    ) -> impl Future<Output = Result<Self::EthApi, Report>> + Send;
}
Expand description

A EthApi that knows how to build eth namespace API from FullNodeComponents.

Required Associated Types§

Source

type EthApi: EthApiTypes + FullEthApiServer<Provider = <N as FullNodeTypes>::Provider, Pool = <N as FullNodeComponents>::Pool> + AddDevSigners + Unpin + 'static

The Ethapi implementation this builder will build.

Required Methods§

Source

fn build_eth_api( self, ctx: EthApiCtx<'_, N>, ) -> impl Future<Output = Result<Self::EthApi, Report>> + Send

Builds the EthApiServer from the given context.

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.

Implementations on Foreign Types§

§

impl<N, NetworkT> EthApiBuilder<N> for EthereumEthApiBuilder<NetworkT>
where <<N as FullNodeTypes>::Types as NodeTypes>::ChainSpec: EthereumHardforks + Hardforks, <N as FullNodeComponents>::Evm: ConfigureEvm, <<N as FullNodeComponents>::Evm as ConfigureEvm>::NextBlockEnvCtx: BuildPendingEnv<<<<N as FullNodeTypes>::Types as NodeTypes>::Primitives as NodePrimitives>::BlockHeader>, NetworkT: RpcTypes, <NetworkT as RpcTypes>::TransactionRequest: SignableTxRequest<<<<N as FullNodeTypes>::Types as NodeTypes>::Primitives as NodePrimitives>::SignedTx>, RpcConverter<NetworkT, <N as FullNodeComponents>::Evm, EthReceiptConverter<<<N as FullNodeTypes>::Provider as ChainSpecProvider>::ChainSpec>>: RpcConvert<Primitives = <<N as FullNodeTypes>::Types as NodeTypes>::Primitives, TxEnv = <<<<N as FullNodeComponents>::Evm as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Tx, Error = EthApiError, Network = NetworkT, Spec = <<<<N as FullNodeComponents>::Evm as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Spec>, N: FullNodeComponents, <N as FullNodeTypes>::Types: NodeTypes, EthApiError: FromEvmError<<N as FullNodeComponents>::Evm>,

§

type EthApi = EthApi<N, RpcConverter<NetworkT, <N as FullNodeComponents>::Evm, EthReceiptConverter<<<N as FullNodeTypes>::Provider as ChainSpecProvider>::ChainSpec>>>

§

async fn build_eth_api( self, ctx: EthApiCtx<'_, N>, ) -> Result<<EthereumEthApiBuilder<NetworkT> as EthApiBuilder<N>>::EthApi, Report>

Implementors§