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< uint8_t > hex_nibble(char c)
Parse a hex nibble character. Returns nullopt for invalid chars.
template <size_t N>
bool
parse_hex_array(std::string_view hex, std::array< uint8_t, N > & out)
Parse a hex string into a fixed-size byte array.
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.

Functions Documentation

function hex_nibble

inline std::optional< uint8_t > hex_nibble(
    char c
)

Parse a hex nibble character. Returns nullopt for invalid chars.

function parse_hex_array

template <size_t N>
bool parse_hex_array(
    std::string_view hex,
    std::array< uint8_t, N > & out
)

Parse a hex string into a fixed-size byte array.

Parameters:

  • hex Must be exactly N*2 hex characters (no 0x prefix).

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.


Updated on 2026-04-13 at 23:22:46 -0700