Kagome
Polkadot Runtime Engine in C++17
kagome::host_api::ChildStorageExtension Class Reference

#include <child_storage_extension.hpp>

Collaboration diagram for kagome::host_api::ChildStorageExtension:

Public Member Functions

 ChildStorageExtension (std::shared_ptr< runtime::TrieStorageProvider > storage_provider, std::shared_ptr< const runtime::MemoryProvider > memory_provider)
 
void ext_default_child_storage_set_version_1 (runtime::WasmSpan child_storage_key, runtime::WasmSpan key, runtime::WasmSpan value)
 
runtime::WasmSpan ext_default_child_storage_get_version_1 (runtime::WasmSpan child_storage_key, runtime::WasmSpan key) const
 
void ext_default_child_storage_clear_version_1 (runtime::WasmSpan child_storage_key, runtime::WasmSpan key)
 
runtime::WasmSpan ext_default_child_storage_next_key_version_1 (runtime::WasmSpan child_storage_key, runtime::WasmSpan key) const
 
runtime::WasmSpan ext_default_child_storage_root_version_1 (runtime::WasmSpan child_storage_key) const
 
void ext_default_child_storage_clear_prefix_version_1 (runtime::WasmSpan child_storage_key, runtime::WasmSpan prefix)
 
runtime::WasmSpan ext_default_child_storage_read_version_1 (runtime::WasmSpan child_storage_key, runtime::WasmSpan key, runtime::WasmSpan value_out, runtime::WasmOffset offset) const
 
uint32_t ext_default_child_storage_exists_version_1 (runtime::WasmSpan child_storage_key, runtime::WasmSpan key) const
 
void ext_default_child_storage_storage_kill_version_1 (runtime::WasmSpan child_storage_key)
 
template<typename R , typename F , typename... Args>
outcome::result< R > executeOnChildStorage (const Buffer &child_storage_key, F func, Args &&...args) const
 

Private Member Functions

template<typename R , typename F , typename... Args>
outcome::result< R > executeOnChildStorage (const common::Buffer &child_storage_key, F func, Args &&...args) const
 

Private Attributes

std::shared_ptr< runtime::TrieStorageProviderstorage_provider_
 
std::shared_ptr< const runtime::MemoryProvidermemory_provider_
 
log::Logger logger_
 

Static Private Attributes

static constexpr auto kDefaultLoggerTag
 

Detailed Description

Implements HostApi functions related to storage

Definition at line 25 of file child_storage_extension.hpp.

Constructor & Destructor Documentation

kagome::host_api::ChildStorageExtension::ChildStorageExtension ( std::shared_ptr< runtime::TrieStorageProvider storage_provider,
std::shared_ptr< const runtime::MemoryProvider memory_provider 
)

Definition at line 25 of file child_storage_extension.cpp.

Member Function Documentation

template<typename R , typename F , typename... Args>
outcome::result<R> kagome::host_api::ChildStorageExtension::executeOnChildStorage ( const Buffer &  child_storage_key,
func,
Args &&...  args 
) const

Definition at line 42 of file child_storage_extension.cpp.

template<typename R , typename F , typename... Args>
outcome::result<R> kagome::host_api::ChildStorageExtension::executeOnChildStorage ( const common::Buffer child_storage_key,
func,
Args &&...  args 
) const
private
void kagome::host_api::ChildStorageExtension::ext_default_child_storage_clear_prefix_version_1 ( runtime::WasmSpan  child_storage_key,
runtime::WasmSpan  prefix 
)
void kagome::host_api::ChildStorageExtension::ext_default_child_storage_clear_version_1 ( runtime::WasmSpan  child_storage_key,
runtime::WasmSpan  key 
)
uint32_t kagome::host_api::ChildStorageExtension::ext_default_child_storage_exists_version_1 ( runtime::WasmSpan  child_storage_key,
runtime::WasmSpan  key 
) const
runtime::WasmSpan kagome::host_api::ChildStorageExtension::ext_default_child_storage_get_version_1 ( runtime::WasmSpan  child_storage_key,
runtime::WasmSpan  key 
) const
runtime::WasmSpan kagome::host_api::ChildStorageExtension::ext_default_child_storage_next_key_version_1 ( runtime::WasmSpan  child_storage_key,
runtime::WasmSpan  key 
) const
runtime::WasmSpan kagome::host_api::ChildStorageExtension::ext_default_child_storage_read_version_1 ( runtime::WasmSpan  child_storage_key,
runtime::WasmSpan  key,
runtime::WasmSpan  value_out,
runtime::WasmOffset  offset 
) const
runtime::WasmSpan kagome::host_api::ChildStorageExtension::ext_default_child_storage_root_version_1 ( runtime::WasmSpan  child_storage_key) const
void kagome::host_api::ChildStorageExtension::ext_default_child_storage_set_version_1 ( runtime::WasmSpan  child_storage_key,
runtime::WasmSpan  key,
runtime::WasmSpan  value 
)
void kagome::host_api::ChildStorageExtension::ext_default_child_storage_storage_kill_version_1 ( runtime::WasmSpan  child_storage_key)

Member Data Documentation

constexpr auto kagome::host_api::ChildStorageExtension::kDefaultLoggerTag
staticprivate
Initial value:
=
"WASM Runtime [ChildStorageExtension]"

Definition at line 97 of file child_storage_extension.hpp.

log::Logger kagome::host_api::ChildStorageExtension::logger_
private

Definition at line 95 of file child_storage_extension.hpp.

std::shared_ptr<const runtime::MemoryProvider> kagome::host_api::ChildStorageExtension::memory_provider_
private

Definition at line 94 of file child_storage_extension.hpp.

std::shared_ptr<runtime::TrieStorageProvider> kagome::host_api::ChildStorageExtension::storage_provider_
private

Definition at line 93 of file child_storage_extension.hpp.


The documentation for this class was generated from the following files: