Kagome
Polkadot Runtime Engine in C++17
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
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
9
#include "
api/service/base_request.hpp
"
10
11
#include "
api/service/chain/chain_api.hpp
"
12
#include "
primitives/extrinsic.hpp
"
13
14
namespace
kagome::api::chain::request
{
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
kagome::api::chain::request
Definition:
get_block.hpp:11
extrinsic.hpp
kagome::api::chain::request::SubscribeNewHeads::api_
std::shared_ptr< ChainApi > api_
Definition:
subscribe_new_heads.hpp:26
kagome::api::details::RequestType
Definition:
base_request.hpp:32
base_request.hpp
chain_api.hpp
kagome::api::chain::request::SubscribeNewHeads::execute
outcome::result< Return > execute() override
Definition:
subscribe_new_heads.hpp:21
kagome::api::chain::request::SubscribeNewHeads::SubscribeNewHeads
SubscribeNewHeads(std::shared_ptr< ChainApi > &api)
Definition:
subscribe_new_heads.hpp:17
kagome::api::chain::request::SubscribeNewHeads
Definition:
subscribe_new_heads.hpp:16
core
api
service
chain
requests
subscribe_new_heads.hpp
Generated by
1.8.11