Kagome
Polkadot Runtime Engine in C++17
get_runtime_version.hpp
Go to the documentation of this file.
1 
6 #ifndef KAGOME_API_REQUEST_GET_VERSION
7 #define KAGOME_API_REQUEST_GET_VERSION
8 
9 #include <jsonrpc-lean/request.h>
10 
12 #include "common/buffer.hpp"
13 #include "outcome/outcome.hpp"
14 #include "primitives/block_id.hpp"
15 
17 
18  class GetRuntimeVersion final {
19  public:
20  GetRuntimeVersion(const GetRuntimeVersion &) = delete;
22 
25 
26  explicit GetRuntimeVersion(std::shared_ptr<StateApi> api);
27  ~GetRuntimeVersion() = default;
28 
29  outcome::result<void> init(jsonrpc::Request::Parameters const &params);
30  outcome::result<primitives::Version> execute();
31 
32  private:
33  std::shared_ptr<StateApi> api_;
34  std::optional<primitives::BlockHash> at_;
35  };
36 
37 } // namespace kagome::api::state::request
38 
39 #endif // KAGOME_API_REQUEST_GET_VERSION
outcome::result< primitives::Version > execute()
GetRuntimeVersion(const GetRuntimeVersion &)=delete
GetRuntimeVersion & operator=(const GetRuntimeVersion &)=delete
std::optional< primitives::BlockHash > at_
outcome::result< void > init(jsonrpc::Request::Parameters const &params)