Skip to content

eth::cli

Classes

Name
struct eth::cli::WatchSpec
One watch subscription specified on the command line.
class eth::cli::EventRegistry
Registry mapping event signatures to their ABI parameter descriptors.

Functions

Name
std::optional< codec::Address > parse_address(std::string_view hex)
Parse a 0x-prefixed or bare 40-hex-char Ethereum address.
EventRegistry & event_registry()
Process-wide singleton registry, pre-populated with well-known events.
std::vector< abi::AbiParam > infer_params(const std::string & sig)
Convenience wrapper: look up sig in the global registry. Replaces the old infer_params() free function.
std::optional< std::vector< EthWatchEventSpec > > build_service_watch_specs(const std::vector< WatchSpec > & watch_specs)
Convert CLI watch flags into service-level watch specs.
EthWatchServiceConfig build_service_config(EthWatchConnectionConfig connection, std::vector< EthWatchEventSpec > watches, std::vector< discv4::ChainPeerConfig > chains, EthWatchDiscoveryMode discovery_mode =EthWatchDiscoveryMode::kDiscoverIfNeeded)
Build the production service config used by cache-backed CLI modes.

Functions Documentation

function parse_address

inline std::optional< codec::Address > parse_address(
    std::string_view hex
)

Parse a 0x-prefixed or bare 40-hex-char Ethereum address.

Return: Parsed address or nullopt if the format is invalid.

function event_registry

inline EventRegistry & event_registry()

Process-wide singleton registry, pre-populated with well-known events.

The registry is initialised on first access. All registrations persist for the lifetime of the process, so call register_event() once at startup before creating any watchers.

function infer_params

inline std::vector< abi::AbiParam > infer_params(
    const std::string & sig
)

Convenience wrapper: look up sig in the global registry. Replaces the old infer_params() free function.

function build_service_watch_specs

inline std::optional< std::vector< EthWatchEventSpec > > build_service_watch_specs(
    const std::vector< WatchSpec > & watch_specs
)

Convert CLI watch flags into service-level watch specs.

function build_service_config

inline EthWatchServiceConfig build_service_config(
    EthWatchConnectionConfig connection,
    std::vector< EthWatchEventSpec > watches,
    std::vector< discv4::ChainPeerConfig > chains,
    EthWatchDiscoveryMode discovery_mode =EthWatchDiscoveryMode::kDiscoverIfNeeded
)

Build the production service config used by cache-backed CLI modes.


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