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

Public Member Functions

 OneModuleRepository (std::shared_ptr< CompartmentWrapper > compartment, std::shared_ptr< ModuleParams > module_params, std::shared_ptr< IntrinsicModule > intrinsic_module, std::shared_ptr< const InstanceEnvironmentFactory > instance_env_factory, gsl::span< const uint8_t > code, const common::Hash256 &code_hash, std::shared_ptr< SingleModuleCache > last_compiled_module)
 
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 InstanceEnvironmentFactoryinstance_env_factory_
 
std::shared_ptr< CompartmentWrappercompartment_
 
std::shared_ptr< ModuleParamsmodule_params_
 
std::shared_ptr< IntrinsicModuleintrinsic_module_
 
gsl::span< const uint8_t > code_
 
const common::Hash256 code_hash_
 
std::shared_ptr< SingleModuleCachelast_compiled_module_
 

Detailed Description

Definition at line 26 of file core_api_factory_impl.cpp.

Constructor & Destructor Documentation

kagome::runtime::wavm::OneModuleRepository::OneModuleRepository ( std::shared_ptr< CompartmentWrapper compartment,
std::shared_ptr< ModuleParams module_params,
std::shared_ptr< IntrinsicModule intrinsic_module,
std::shared_ptr< const InstanceEnvironmentFactory instance_env_factory,
gsl::span< const uint8_t >  code,
const common::Hash256 code_hash,
std::shared_ptr< SingleModuleCache last_compiled_module 
)
inline

Definition at line 28 of file core_api_factory_impl.cpp.

Member Function Documentation

outcome::result<std::shared_ptr<ModuleInstance> > kagome::runtime::wavm::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 48 of file core_api_factory_impl.cpp.

Member Data Documentation

gsl::span<const uint8_t> kagome::runtime::wavm::OneModuleRepository::code_
private

Definition at line 72 of file core_api_factory_impl.cpp.

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

Definition at line 73 of file core_api_factory_impl.cpp.

std::shared_ptr<CompartmentWrapper> kagome::runtime::wavm::OneModuleRepository::compartment_
private

Definition at line 69 of file core_api_factory_impl.cpp.

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

Definition at line 67 of file core_api_factory_impl.cpp.

std::shared_ptr<const InstanceEnvironmentFactory> kagome::runtime::wavm::OneModuleRepository::instance_env_factory_
private

Definition at line 68 of file core_api_factory_impl.cpp.

std::shared_ptr<IntrinsicModule> kagome::runtime::wavm::OneModuleRepository::intrinsic_module_
private

Definition at line 71 of file core_api_factory_impl.cpp.

std::shared_ptr<SingleModuleCache> kagome::runtime::wavm::OneModuleRepository::last_compiled_module_
private

Definition at line 74 of file core_api_factory_impl.cpp.

std::shared_ptr<ModuleParams> kagome::runtime::wavm::OneModuleRepository::module_params_
private

Definition at line 70 of file core_api_factory_impl.cpp.


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