Kagome
Polkadot Runtime Engine in C++17
|
#include <state_api_impl.hpp>
Public Types | |
enum | Error { Error::MAX_BLOCK_RANGE_EXCEEDED = 1, Error::MAX_KEY_SET_SIZE_EXCEEDED, Error::END_BLOCK_LOWER_THAN_BEGIN_BLOCK } |
Public Member Functions | |
StateApiImpl (std::shared_ptr< blockchain::BlockHeaderRepository > block_repo, std::shared_ptr< const storage::trie::TrieStorage > trie_storage, std::shared_ptr< blockchain::BlockTree > block_tree, std::shared_ptr< runtime::Core > runtime_core, std::shared_ptr< runtime::Metadata > metadata, std::shared_ptr< runtime::RawExecutor > executor) | |
void | setApiService (std::shared_ptr< api::ApiService > const &api_service) override |
outcome::result< common::Buffer > | call (std::string_view method, common::Buffer data, const std::optional< primitives::BlockHash > &opt_at) const override |
outcome::result< std::vector< common::Buffer > > | getKeysPaged (const std::optional< common::BufferView > &prefix, uint32_t keys_amount, const std::optional< common::BufferView > &prev_key, const std::optional< primitives::BlockHash > &block_hash_opt) const override |
outcome::result< std::optional< common::Buffer > > | getStorage (const common::BufferView &key) const override |
outcome::result< std::optional< common::Buffer > > | getStorageAt (const common::BufferView &key, const primitives::BlockHash &at) const override |
outcome::result< std::vector< StorageChangeSet > > | queryStorage (gsl::span< const common::Buffer > keys, const primitives::BlockHash &from, std::optional< primitives::BlockHash > to) const override |
outcome::result< std::vector< StorageChangeSet > > | queryStorageAt (gsl::span< const common::Buffer > keys, std::optional< primitives::BlockHash > at) const override |
outcome::result< uint32_t > | subscribeStorage (const std::vector< common::Buffer > &keys) override |
outcome::result< bool > | unsubscribeStorage (const std::vector< uint32_t > &subscription_id) override |
outcome::result< primitives::Version > | getRuntimeVersion (const std::optional< primitives::BlockHash > &at) const override |
outcome::result< uint32_t > | subscribeRuntimeVersion () override |
outcome::result< void > | unsubscribeRuntimeVersion (uint32_t subscription_id) override |
outcome::result< std::string > | getMetadata () override |
outcome::result< std::string > | getMetadata (std::string_view hex_block_hash) override |
Public Member Functions inherited from kagome::api::StateApi | |
virtual | ~StateApi ()=default |
Static Public Attributes | |
static constexpr size_t | kMaxBlockRange = 256 |
static constexpr size_t | kMaxKeySetSize = 64 |
Private Attributes | |
std::shared_ptr< blockchain::BlockHeaderRepository > | header_repo_ |
std::shared_ptr< const storage::trie::TrieStorage > | storage_ |
std::shared_ptr< blockchain::BlockTree > | block_tree_ |
std::shared_ptr< runtime::Core > | runtime_core_ |
std::weak_ptr< api::ApiService > | api_service_ |
std::shared_ptr< runtime::Metadata > | metadata_ |
std::shared_ptr< runtime::RawExecutor > | executor_ |
Definition at line 22 of file state_api_impl.hpp.
|
strong |
Enumerator | |
---|---|
MAX_BLOCK_RANGE_EXCEEDED | |
MAX_KEY_SET_SIZE_EXCEEDED | |
END_BLOCK_LOWER_THAN_BEGIN_BLOCK |
Definition at line 24 of file state_api_impl.hpp.
kagome::api::StateApiImpl::StateApiImpl | ( | std::shared_ptr< blockchain::BlockHeaderRepository > | block_repo, |
std::shared_ptr< const storage::trie::TrieStorage > | trie_storage, | ||
std::shared_ptr< blockchain::BlockTree > | block_tree, | ||
std::shared_ptr< runtime::Core > | runtime_core, | ||
std::shared_ptr< runtime::Metadata > | metadata, | ||
std::shared_ptr< runtime::RawExecutor > | executor | ||
) |
Definition at line 38 of file state_api_impl.cpp.
|
overridevirtual |
Implements kagome::api::StateApi.
Definition at line 65 of file state_api_impl.cpp.
|
overridevirtual |
Implements kagome::api::StateApi.
Definition at line 74 of file state_api_impl.cpp.
|
overridevirtual |
Implements kagome::api::StateApi.
Definition at line 241 of file state_api_impl.cpp.
|
overridevirtual |
Implements kagome::api::StateApi.
Definition at line 246 of file state_api_impl.cpp.
|
overridevirtual |
Implements kagome::api::StateApi.
Definition at line 194 of file state_api_impl.cpp.
|
overridevirtual |
Implements kagome::api::StateApi.
Definition at line 116 of file state_api_impl.cpp.
|
overridevirtual |
Implements kagome::api::StateApi.
Definition at line 122 of file state_api_impl.cpp.
|
overridevirtual |
Implements kagome::api::StateApi.
Definition at line 132 of file state_api_impl.cpp.
|
overridevirtual |
Implements kagome::api::StateApi.
Definition at line 186 of file state_api_impl.cpp.
|
overridevirtual |
Implements kagome::api::StateApi.
Definition at line 59 of file state_api_impl.cpp.
|
overridevirtual |
Implements kagome::api::StateApi.
Definition at line 221 of file state_api_impl.cpp.
|
overridevirtual |
Implements kagome::api::StateApi.
Definition at line 202 of file state_api_impl.cpp.
|
overridevirtual |
Implements kagome::api::StateApi.
Definition at line 230 of file state_api_impl.cpp.
|
overridevirtual |
Implements kagome::api::StateApi.
Definition at line 212 of file state_api_impl.cpp.
|
private |
Definition at line 94 of file state_api_impl.hpp.
|
private |
Definition at line 91 of file state_api_impl.hpp.
|
private |
Definition at line 96 of file state_api_impl.hpp.
|
private |
Definition at line 89 of file state_api_impl.hpp.
|
static |
Definition at line 30 of file state_api_impl.hpp.
|
static |
Definition at line 31 of file state_api_impl.hpp.
|
private |
Definition at line 95 of file state_api_impl.hpp.
|
private |
Definition at line 92 of file state_api_impl.hpp.
|
private |
Definition at line 90 of file state_api_impl.hpp.