Skip to content

sgns::evmwatcher::EvmMessagingWatcher

#include <evm_messaging_watcher.hpp>

Inherits from sgns::watcher::MessagingWatcher

Public Classes

Name
struct ChainConfig

Public Types

Name
using api::WsClientImpl::Context Context
using struct TopicFilter

Public Functions

Name
EvmMessagingWatcher(const rapidjson::Document & config, MessageCallback callback, const std::string & contract_address, const std::vector< TopicFilter > & topic_filters)
std::string getContractAddress() const
void setContractAddress(const std::string & contract_address)
std::vector< TopicFilter > getTopicFilters() const
void setTopicFilters(const std::vector< TopicFilter > & topic_filters)
void setupWebSocketListener(const ChainConfig & chainConfig)
ChainConfig getChain() const
virtual void startWatching() override
virtual void stopWatching() override

Additional inherited members

Public Types inherited from sgns::watcher::MessagingWatcher

Name
using std::function< void(const std::string &)> MessageCallback

Public Functions inherited from sgns::watcher::MessagingWatcher

Name
virtual ~MessagingWatcher() =default
bool isRunning() const
void addWatcher(const std::shared_ptr< MessagingWatcher > & newWatcher)
void startAll()
void stopAll()

Protected Functions inherited from sgns::watcher::MessagingWatcher

Name
MessagingWatcher(MessageCallback callback)
virtual void watch()

Protected Attributes inherited from sgns::watcher::MessagingWatcher

Name
MessageCallback messageCallback
bool running
std::mutex running_mutex
boost::thread watcherThread

Public Types Documentation

using Context

using sgns::evmwatcher::EvmMessagingWatcher::Context = api::WsClientImpl::Context;

using TopicFilter

using sgns::evmwatcher::EvmMessagingWatcher::TopicFilter = struct {
           std::string topic_hash;
       };

Public Functions Documentation

function EvmMessagingWatcher

EvmMessagingWatcher(
    const rapidjson::Document & config,
    MessageCallback callback,
    const std::string & contract_address,
    const std::vector< TopicFilter > & topic_filters
)

function getContractAddress

std::string getContractAddress() const

function setContractAddress

void setContractAddress(
    const std::string & contract_address
)

function getTopicFilters

std::vector< TopicFilter > getTopicFilters() const

function setTopicFilters

void setTopicFilters(
    const std::vector< TopicFilter > & topic_filters
)

function setupWebSocketListener

void setupWebSocketListener(
    const ChainConfig & chainConfig
)

function getChain

ChainConfig getChain() const

function startWatching

virtual void startWatching() override

Reimplements: sgns::watcher::MessagingWatcher::startWatching

function stopWatching

virtual void stopWatching() override

Reimplements: sgns::watcher::MessagingWatcher::stopWatching


Updated on 2026-03-04 at 13:10:44 -0800