Kagome
Polkadot Runtime Engine in C++17
account_next_index.hpp
Go to the documentation of this file.
1 
6 #ifndef KAGOME_ACCOUNT_NEXT_INDEX_HPP
7 #define KAGOME_ACCOUNT_NEXT_INDEX_HPP
8 
11 
13 
14  class AccountNextIndex final
15  : public details::RequestType<primitives::AccountNonce, std::string> {
16  public:
17  explicit AccountNextIndex(std::shared_ptr<SystemApi> api)
18  : api_(std::move(api)) {
19  BOOST_ASSERT(api_);
20  };
21 
22  outcome::result<primitives::AccountNonce> execute() override {
23  return api_->getNonceFor(getParam<0>());
24  }
25 
26  private:
27  std::shared_ptr<SystemApi> api_;
28  };
29 
30 } // namespace kagome::api::system::request
31 
32 #endif // KAGOME_ACCOUNT_NEXT_INDEX_HPP
outcome::result< primitives::AccountNonce > execute() override
STL namespace.
AccountNextIndex(std::shared_ptr< SystemApi > api)