Kagome
Polkadot Runtime Engine in C++17
subscribe_new_heads.hpp
Go to the documentation of this file.
1 
6 #ifndef KAGOME_CHAIN_SUBSCRIBE_NEW_HEADS_HPP
7 #define KAGOME_CHAIN_SUBSCRIBE_NEW_HEADS_HPP
8 
10 
12 #include "primitives/extrinsic.hpp"
13 
15 
16  struct SubscribeNewHeads final : details::RequestType<uint32_t> {
17  explicit SubscribeNewHeads(std::shared_ptr<ChainApi> &api) : api_(api) {
18  BOOST_ASSERT(api_);
19  }
20 
21  outcome::result<Return> execute() override {
22  return api_->subscribeNewHeads();
23  }
24 
25  private:
26  std::shared_ptr<ChainApi> api_;
27  };
28 
29 } // namespace kagome::api::chain::request
30 
31 #endif // KAGOME_CHAIN_SUBSCRIBE_NEW_HEADS_HPP
outcome::result< Return > execute() override
SubscribeNewHeads(std::shared_ptr< ChainApi > &api)