Kagome
Polkadot Runtime Engine in C++17
unwatch_extrinsic.hpp
Go to the documentation of this file.
1 
6 #ifndef KAGOME_UNWATCH_EXTRINSIC_HPP
7 #define KAGOME_UNWATCH_EXTRINSIC_HPP
8 
9 #include <jsonrpc-lean/request.h>
10 
12 #include "primitives/extrinsic.hpp"
13 
15 
16  class UnwatchExtrinsic final
17  : public details::RequestType<bool, primitives::SubscriptionId> {
18  public:
19  explicit UnwatchExtrinsic(std::shared_ptr<AuthorApi> &api) : api_(api) {
20  BOOST_ASSERT(api_);
21  }
22 
23  outcome::result<Return> execute() override {
24  return api_->unwatchExtrinsic(getParam<0>());
25  }
26 
27  private:
28  std::shared_ptr<AuthorApi> api_;
29  };
30 
31 } // namespace kagome::api::author::request
32 
33 #endif // KAGOME_UNWATCH_EXTRINSIC_HPP
outcome::result< Return > execute() override
UnwatchExtrinsic(std::shared_ptr< AuthorApi > &api)