Skip to content

sgns::runtime::binaryen::OffchainWorkerImpl

#include <offchain_worker_impl.hpp>

Inherits from sgns::runtime::binaryen::RuntimeApi, sgns::runtime::OffchainWorker

Public Functions

Name
OffchainWorkerImpl(const std::shared_ptr< WasmProvider > & wasm_provider, const std::shared_ptr< RuntimeManager > & runtime_manager)
~OffchainWorkerImpl() override =default
virtual outcome::result< void > offchain_worker(BlockNumber bn) override
calls offchain_worker method of OffchainWorker runtime api

Additional inherited members

Public Types inherited from sgns::runtime::binaryen::RuntimeApi

Name
enum class CallPersistency

Public Functions inherited from sgns::runtime::binaryen::RuntimeApi

Name
RuntimeApi(std::shared_ptr< WasmProvider > wasm_provider, std::shared_ptr< RuntimeManager > runtime_manager)

Protected Functions inherited from sgns::runtime::binaryen::RuntimeApi

Name
template <typename R ,typename... Args>
outcome::result< R >
executeAt(std::string_view name, const base::Hash256 & state_root, CallPersistency persistency, Args &&... args)
executes wasm export method returning non-void result
template <typename R ,typename... Args>
outcome::result< R >
execute(std::string_view name, CallPersistency persistency, Args &&... args)
executes wasm export method returning non-void result

Protected Types inherited from sgns::runtime::OffchainWorker

Name
using sgns::primitives::BlockNumber BlockNumber

Public Functions inherited from sgns::runtime::OffchainWorker

Name
virtual ~OffchainWorker() =default

Public Functions Documentation

function OffchainWorkerImpl

explicit OffchainWorkerImpl(
    const std::shared_ptr< WasmProvider > & wasm_provider,
    const std::shared_ptr< RuntimeManager > & runtime_manager
)

function ~OffchainWorkerImpl

~OffchainWorkerImpl() override =default

function offchain_worker

virtual outcome::result< void > offchain_worker(
    BlockNumber bn
) override

calls offchain_worker method of OffchainWorker runtime api

Parameters:

  • bn block number

Return: success or error

Reimplements: sgns::runtime::OffchainWorker::offchain_worker


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