Skip to content

eth::EthWatchRunner

Per-session ETH watch runner layered above RLPx and EthWatchService.

#include <eth_watch_runner.hpp>

Public Functions

Name
EthWatchRunner(std::shared_ptr< IEthSessionChannel > channel, std::string chain_name, uint64_t network_id, Hash256 genesis_hash, ForkId fork_id, std::vector< EthMessageSchema > eth_message_schemas ={})
Construct a runner for one RLPx session.
EthWatchRunner(std::shared_ptr< rlpx::RlpxSession > session, std::string chain_name, uint64_t network_id, Hash256 genesis_hash, ForkId fork_id, std::vector< EthMessageSchema > eth_message_schemas ={})
void set_event_callback(WatchEventNotificationCallback callback)
Set the top-level callback for enriched filtered events.
EthWatchService & service()
Access the underlying watch service for subscription setup.
bool send_local_status()
Send local ETH Status for the negotiated protocol version.
void install_session_bridge()
Install the session ETH message bridge into the underlying RLPx session.
EventWatchId watch_event(const codec::Address & contract_address, const std::string & event_signature, const std::vector< abi::AbiParam > & params, std::optional< uint64_t > from_block =std::nullopt, std::optional< uint64_t > to_block =std::nullopt)
Register a watch and emit enriched notifications through the runner callback.
const WatchEventContext & context() const
Access the enriched event context.

Public Functions Documentation

function EthWatchRunner

EthWatchRunner(
    std::shared_ptr< IEthSessionChannel > channel,
    std::string chain_name,
    uint64_t network_id,
    Hash256 genesis_hash,
    ForkId fork_id,
    std::vector< EthMessageSchema > eth_message_schemas ={}
)

Construct a runner for one RLPx session.

function EthWatchRunner

EthWatchRunner(
    std::shared_ptr< rlpx::RlpxSession > session,
    std::string chain_name,
    uint64_t network_id,
    Hash256 genesis_hash,
    ForkId fork_id,
    std::vector< EthMessageSchema > eth_message_schemas ={}
)

function set_event_callback

void set_event_callback(
    WatchEventNotificationCallback callback
)

Set the top-level callback for enriched filtered events.

function service

EthWatchService & service()

Access the underlying watch service for subscription setup.

function send_local_status

bool send_local_status()

Send local ETH Status for the negotiated protocol version.

function install_session_bridge

void install_session_bridge()

Install the session ETH message bridge into the underlying RLPx session.

function watch_event

EventWatchId watch_event(
    const codec::Address & contract_address,
    const std::string & event_signature,
    const std::vector< abi::AbiParam > & params,
    std::optional< uint64_t > from_block =std::nullopt,
    std::optional< uint64_t > to_block =std::nullopt
)

Register a watch and emit enriched notifications through the runner callback.

function context

const WatchEventContext & context() const

Access the enriched event context.


Updated on 2026-06-05 at 17:22:18 -0700