6 #ifndef KAGOME_HOST_API_STORAGE_EXTENSION_HPP 7 #define KAGOME_HOST_API_STORAGE_EXTENSION_HPP 17 class TrieStorageProvider;
27 std::shared_ptr<runtime::TrieStorageProvider> storage_provider,
28 std::shared_ptr<const runtime::MemoryProvider> memory_provider);
108 void ext_storage_start_transaction_version_1();
113 void ext_storage_commit_transaction_version_1();
118 void ext_storage_rollback_transaction_version_1();
146 outcome::result<std::optional<common::BufferConstRef>>
get(
161 outcome::result<std::optional<common::Buffer>> getStorageNextKey(
165 std::optional<uint32_t> limit);
171 void removeEmptyChildStorages();
178 constexpr
static auto kDefaultLoggerTag =
"WASM Runtime [StorageExtension]";
183 #endif // KAGOME_HOST_API_STORAGE_EXTENSION_HPP Class represents arbitrary (including empty) byte buffer.
uint32_t WasmSize
Size type is uint32_t because we are working in 32 bit address space.
std::shared_ptr< runtime::TrieStorageProvider > storage_provider_
uint32_t WasmOffset
Offset type is uint32_t because we are working in 32 bit address space.
storage::trie::PolkadotCodec codec_
std::shared_ptr< const runtime::MemoryProvider > memory_provider_
std::shared_ptr< soralog::Logger > Logger
uint64_t WasmSpan
combination of pointer and size, where less significant part represents wasm pointer, and most significant represents size
uint32_t WasmPointer
type of wasm memory is 32 bit integer