Kagome
Polkadot Runtime Engine in C++17
kagome::runtime::binaryen::OneModuleRepository Class Referencefinal
Inheritance diagram for kagome::runtime::binaryen::OneModuleRepository:
Collaboration diagram for kagome::runtime::binaryen::OneModuleRepository:

Public Member Functions

 OneModuleRepository (const std::vector< uint8_t > &code, std::shared_ptr< const InstanceEnvironmentFactory > env_factory, const common::Hash256 &code_hash)
 
outcome::result< std::shared_ptr< ModuleInstance > > getInstanceAt (std::shared_ptr< const RuntimeCodeProvider >, const primitives::BlockInfo &, const primitives::BlockHeader &) override
 Returns a module instance for runtime at the. More...
 
- Public Member Functions inherited from kagome::runtime::ModuleRepository
virtual ~ModuleRepository ()=default
 

Private Attributes

std::shared_ptr< ModuleInstanceinstance_
 
std::shared_ptr< const InstanceEnvironmentFactoryenv_factory_
 
const std::vector< uint8_t > & code_
 
const common::Hash256 code_hash_
 

Detailed Description

Definition at line 19 of file core_api_factory_impl.cpp.

Constructor & Destructor Documentation

kagome::runtime::binaryen::OneModuleRepository::OneModuleRepository ( const std::vector< uint8_t > &  code,
std::shared_ptr< const InstanceEnvironmentFactory env_factory,
const common::Hash256 code_hash 
)
inline

Definition at line 21 of file core_api_factory_impl.cpp.

Member Function Documentation

outcome::result<std::shared_ptr<ModuleInstance> > kagome::runtime::binaryen::OneModuleRepository::getInstanceAt ( std::shared_ptr< const RuntimeCodeProvider code_provider,
const primitives::BlockInfo block,
const primitives::BlockHeader header 
)
inlineoverridevirtual

Returns a module instance for runtime at the.

  • block state, loading its code using the provided
  • code_provider
    Parameters
    code_providerthe code provider used to extract the runtime code from the given block
    blockinfo of the block at which the runtime code should be extracted
    headerof the block at which the runtime code should be extracted

Implements kagome::runtime::ModuleRepository.

Definition at line 31 of file core_api_factory_impl.cpp.

Member Data Documentation

const std::vector<uint8_t>& kagome::runtime::binaryen::OneModuleRepository::code_
private

Definition at line 48 of file core_api_factory_impl.cpp.

const common::Hash256 kagome::runtime::binaryen::OneModuleRepository::code_hash_
private

Definition at line 49 of file core_api_factory_impl.cpp.

std::shared_ptr<const InstanceEnvironmentFactory> kagome::runtime::binaryen::OneModuleRepository::env_factory_
private

Definition at line 47 of file core_api_factory_impl.cpp.

std::shared_ptr<ModuleInstance> kagome::runtime::binaryen::OneModuleRepository::instance_
private

Definition at line 46 of file core_api_factory_impl.cpp.


The documentation for this class was generated from the following file: