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