8000 Improve exex example to use ethapi on both ethereum and optimism · Issue #17077 · paradigmxyz/reth · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Improve exex example to use ethapi on both ethereum and optimism #17077
Open
@0xalex88

Description

@0xalex88

Describe the feature

The exex-hello-world example is simple and compiles just fine, however as soon as you try to use the ethapi to do an eth_call, fetch logs or run traces (all common operations that could be very useful to easily use in an exex for quick indexing) it's quite complex to figure out what types you need (especially to support ethereum and optimism at the same time).

So far I managed to get the ethereum one running by using

async fn ethapi_exex<Node>(
    mut ctx: ExExContext<Node>,
    ethapi_rx: oneshot::Receiver<EthApiFor<Node>>,
) -> eyre::Result<()>
where
    Node: FullNodeComponents,
    Node::Types: NodeTypes<Primitives = EthPrimitives>,
    Node::Provider: FullRpcProvider + ReceiptProvider,
    EthApiFor<Node>: FullEthApiServer,
{

but that breaks the optimism one.

So in general an example that also uses the ethapi (ethfilter, ethtrace etc...) could be very useful to allow all kind of chain interactions

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0