Kagome
Polkadot Runtime Engine in C++17
kagome::runtime::ModuleRepository Class Referenceabstract

#include <module_repository.hpp>

Inheritance diagram for kagome::runtime::ModuleRepository:
Collaboration diagram for kagome::runtime::ModuleRepository:

Public Member Functions

virtual ~ModuleRepository ()=default
 
virtual outcome::result< std::shared_ptr< ModuleInstance > > getInstanceAt (std::shared_ptr< const RuntimeCodeProvider > code_provider, const primitives::BlockInfo &block, const primitives::BlockHeader &header)=0
 Returns a module instance for runtime at the. More...
 

Detailed Description

Repository for runtime modules Allows loading and compiling a module directly from its web assembly byte code and instantiating a runtime module at an arbitrary block

Definition at line 29 of file module_repository.hpp.

Constructor & Destructor Documentation

virtual kagome::runtime::ModuleRepository::~ModuleRepository ( )
virtualdefault

Member Function Documentation

virtual outcome::result<std::shared_ptr<ModuleInstance> > kagome::runtime::ModuleRepository::getInstanceAt ( std::shared_ptr< const RuntimeCodeProvider code_provider,
const primitives::BlockInfo block,
const primitives::BlockHeader header 
)
pure virtual

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

Implemented in kagome::runtime::wavm::OneModuleRepository, kagome::runtime::binaryen::OneModuleRepository, and kagome::runtime::ModuleRepositoryImpl.


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