|
| Executor (std::shared_ptr< RuntimeEnvironmentFactory > env_factory, std::shared_ptr< RuntimePropertiesCache > cache) |
|
template<typename Result , typename... Args> |
outcome::result< PersistentResult< Result > > | persistentCallAt (primitives::BlockInfo const &block_info, storage::trie::RootHash const &storage_state, std::string_view name, Args &&...args) |
|
template<typename Result , typename... Args> |
outcome::result< PersistentResult< Result > > | persistentCallAtGenesis (std::string_view name, Args &&...args) |
|
template<typename Result , typename... Args> |
outcome::result< PersistentResult< Result > > | persistentCallAt (primitives::BlockHash const &block_hash, std::string_view name, Args &&...args) |
|
template<typename Result , typename... Args> |
outcome::result< Result > | callAt (primitives::BlockInfo const &block_info, storage::trie::RootHash const &storage_state, std::string_view name, Args &&...args) |
|
template<typename Result , typename... Args> |
outcome::result< Result > | callAt (primitives::BlockHash const &block_hash, std::string_view name, Args &&...args) |
|
template<typename Result , typename... Args> |
outcome::result< Result > | callAtGenesis (std::string_view name, Args &&...args) |
|
outcome::result< common::Buffer > | callAtRaw (const primitives::BlockHash &block_hash, std::string_view name, const common::Buffer &encoded_args) override |
|
virtual | ~RawExecutor ()=default |
|
The Runtime executor Provides access to the Runtime API methods, which can be called by their names with the required environment
Definition at line 47 of file executor.hpp.
template<typename Result , typename... Args>
Call a runtime method in an ephemeral environment, e. g. the storage changes, made by this call, will NOT persist in the node's Trie storage The call will be done with the runtime code from
- Parameters
-
block_info | state on |
storage_state | storage state |
Definition at line 142 of file executor.hpp.
template<typename Result , typename... Args>
outcome::result<Result> kagome::runtime::Executor::callAt |
( |
primitives::BlockHash const & |
block_hash, |
|
|
std::string_view |
name, |
|
|
Args &&... |
args |
|
) |
| |
|
inline |
Call a runtime method in an ephemeral environment, e. g. the storage changes, made by this call, will NOT persist in the node's Trie storage The call will be done on the
- Parameters
-
Definition at line 157 of file executor.hpp.
template<typename Result , typename... Args>
outcome::result<Result> kagome::runtime::Executor::callAtGenesis |
( |
std::string_view |
name, |
|
|
Args &&... |
args |
|
) |
| |
|
inline |
Call a runtime method in an ephemeral environment, e. g. the storage changes, made by this call, will NOT persist in the node's Trie storage The call will be done on the genesis state
Definition at line 172 of file executor.hpp.
template<typename Result , typename... Args>
outcome::result<Result> kagome::runtime::Executor::callInternal |
( |
RuntimeEnvironment & |
env, |
|
|
std::string_view |
name, |
|
|
Args &&... |
args |
|
) |
| |
|
inlineprivate |
Internal method for calling a Runtime API method Resets the runtime memory with the module's heap base, encodes the arguments with SCALE codec, calls the method from the provided module instance and returns a result, decoded from SCALE. Changes, made to the Host API state, are reset after the call.
Definition at line 242 of file executor.hpp.
template<typename Result , typename... Args>
outcome::result<Result> kagome::runtime::Executor::callMediateInternal |
( |
RuntimeEnvironment & |
env, |
|
|
std::string_view |
name, |
|
|
Args &&... |
args |
|
) |
| |
|
inlineprivate |
Internal method for calling a Runtime API method Resets the runtime memory with the module's heap base, encodes the arguments with SCALE codec, calls the method from the provided module instance and returns a result, decoded from SCALE. Changes, made to the Host API state, are reset after the call.
Definition at line 212 of file executor.hpp.
template<typename Result , typename... Args>
outcome::result<PersistentResult<Result> > kagome::runtime::Executor::persistentCallAtGenesis |
( |
std::string_view |
name, |
|
|
Args &&... |
args |
|
) |
| |
|
inline |
Call a runtime method in a persistent environment, e. g. the storage changes, made by this call, will persist in the node's Trie storage The call will be done on the genesis block state
Definition at line 93 of file executor.hpp.