Kagome
Polkadot Runtime Engine in C++17
payment_api_impl.hpp
Go to the documentation of this file.
1 
6 #ifndef KAGOME_PAYMENT_API_IMPL_HPP
7 #define KAGOME_PAYMENT_API_IMPL_HPP
8 
10 
11 namespace kagome::runtime {
12  class TransactionPaymentApi;
13 }
14 
15 namespace kagome::blockchain {
16  class BlockTree;
17 }
18 
19 namespace kagome::api {
20 
21  class PaymentApiImpl : public PaymentApi {
22  public:
23  PaymentApiImpl(std::shared_ptr<runtime::TransactionPaymentApi> api,
24  std::shared_ptr<const blockchain::BlockTree> block_tree);
25  ~PaymentApiImpl() override = default;
26 
27  outcome::result<primitives::RuntimeDispatchInfo> queryInfo(
28  const primitives::Extrinsic &extrinsic,
29  uint32_t len,
30  OptionalHashRef at) const override;
31 
32  private:
33  std::shared_ptr<runtime::TransactionPaymentApi> api_;
34  std::shared_ptr<const blockchain::BlockTree> block_tree_;
35  };
36 
37 } // namespace kagome::api
38 
39 #endif // KAGOME_PAYMENT_API_IMPL_HPP
std::shared_ptr< const blockchain::BlockTree > block_tree_
std::optional< std::reference_wrapper< const common::Hash256 >> OptionalHashRef
Definition: payment_api.hpp:21
std::shared_ptr< runtime::TransactionPaymentApi > api_
Extrinsic class represents extrinsic.
Definition: extrinsic.hpp:24