Kagome
Polkadot Runtime Engine in C++17
metadata.cpp
Go to the documentation of this file.
1 
7 
9 
10 namespace kagome::runtime {
11 
13  std::shared_ptr<blockchain::BlockHeaderRepository> block_header_repo,
14  std::shared_ptr<Executor> executor)
15  : executor_{std::move(executor)},
16  block_header_repo_{std::move(block_header_repo)} {
17  BOOST_ASSERT(executor_);
18  BOOST_ASSERT(block_header_repo_);
19  }
20 
21  outcome::result<Metadata::OpaqueMetadata> MetadataImpl::metadata(
22  const primitives::BlockHash &block_hash) {
23  return executor_->callAt<OpaqueMetadata>(block_hash, "Metadata_metadata");
24  }
25 
26 } // namespace kagome::runtime
std::shared_ptr< Executor > executor_
Definition: metadata.hpp:27
primitives::OpaqueMetadata OpaqueMetadata
Definition: metadata.hpp:18
MetadataImpl(std::shared_ptr< blockchain::BlockHeaderRepository > block_header_repo, std::shared_ptr< Executor > executor)
Definition: metadata.cpp:12
std::shared_ptr< blockchain::BlockHeaderRepository > block_header_repo_
Definition: metadata.hpp:28
outcome::result< OpaqueMetadata > metadata(const primitives::BlockHash &block_hash) override
calls metadata method of Metadata runtime api
Definition: metadata.cpp:21