pub type Executor = LocalCallExecutor<Block, Backend, WasmExecutor<(SubstrateHostFunctions, HostFunctions)>>;
Expand description
Test client executor.
Aliased Type§
struct Executor { /* private fields */ }
Implementations
Source§impl<Block, B, E> LocalCallExecutor<Block, B, E>
impl<Block, B, E> LocalCallExecutor<Block, B, E>
Sourcepub fn new(
backend: Arc<B>,
executor: E,
client_config: ClientConfig<Block>,
execution_extensions: ExecutionExtensions<Block>,
) -> Result<LocalCallExecutor<Block, B, E>, Error>
pub fn new( backend: Arc<B>, executor: E, client_config: ClientConfig<Block>, execution_extensions: ExecutionExtensions<Block>, ) -> Result<LocalCallExecutor<Block, B, E>, Error>
Creates new instance of local call executor.
Trait Implementations
Source§impl<B, E, Block> CallExecutor<Block> for LocalCallExecutor<Block, B, E>
impl<B, E, Block> CallExecutor<Block> for LocalCallExecutor<Block, B, E>
Source§type Error = <E as CodeExecutor>::Error
type Error = <E as CodeExecutor>::Error
Externalities error type.
Source§fn execution_extensions(&self) -> &ExecutionExtensions<Block>
fn execution_extensions(&self) -> &ExecutionExtensions<Block>
Returns the
ExecutionExtensions
.Source§fn call(
&self,
at_hash: <Block as Block>::Hash,
method: &str,
call_data: &[u8],
context: CallContext,
) -> Result<Vec<u8>, Error>
fn call( &self, at_hash: <Block as Block>::Hash, method: &str, call_data: &[u8], context: CallContext, ) -> Result<Vec<u8>, Error>
Execute a call to a contract on top of state in a block of given hash. Read more
Source§fn contextual_call(
&self,
at_hash: <Block as Block>::Hash,
method: &str,
call_data: &[u8],
changes: &RefCell<OverlayedChanges<<<Block as Block>::Header as Header>::Hashing>>,
recorder: &Option<Recorder<<<Block as Block>::Header as Header>::Hashing>>,
call_context: CallContext,
extensions: &RefCell<Extensions>,
) -> Result<Vec<u8>, Error>
fn contextual_call( &self, at_hash: <Block as Block>::Hash, method: &str, call_data: &[u8], changes: &RefCell<OverlayedChanges<<<Block as Block>::Header as Header>::Hashing>>, recorder: &Option<Recorder<<<Block as Block>::Header as Header>::Hashing>>, call_context: CallContext, extensions: &RefCell<Extensions>, ) -> Result<Vec<u8>, Error>
Execute a contextual call on top of state in a block of a given hash. Read more
Source§fn runtime_version(
&self,
at_hash: <Block as Block>::Hash,
) -> Result<RuntimeVersion, Error>
fn runtime_version( &self, at_hash: <Block as Block>::Hash, ) -> Result<RuntimeVersion, Error>
Extract RuntimeVersion of given block Read more
Source§impl<Block, B, E> Clone for LocalCallExecutor<Block, B, E>
impl<Block, B, E> Clone for LocalCallExecutor<Block, B, E>
Source§fn clone(&self) -> LocalCallExecutor<Block, B, E>
fn clone(&self) -> LocalCallExecutor<Block, B, E>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<Block, B, E> GetNativeVersion for LocalCallExecutor<Block, B, E>
impl<Block, B, E> GetNativeVersion for LocalCallExecutor<Block, B, E>
Source§fn native_version(&self) -> &NativeVersion
fn native_version(&self) -> &NativeVersion
Returns the version of the native runtime.
Source§impl<Block, B, E> GetRuntimeVersionAt<Block> for LocalCallExecutor<Block, B, E>
impl<Block, B, E> GetRuntimeVersionAt<Block> for LocalCallExecutor<Block, B, E>
Source§fn runtime_version(
&self,
at: <Block as Block>::Hash,
) -> Result<RuntimeVersion, String>
fn runtime_version( &self, at: <Block as Block>::Hash, ) -> Result<RuntimeVersion, String>
Returns the version of runtime at the given block.
Source§impl<B, E, Block> RuntimeVersionOf for LocalCallExecutor<Block, B, E>where
E: RuntimeVersionOf,
Block: Block,
impl<B, E, Block> RuntimeVersionOf for LocalCallExecutor<Block, B, E>where
E: RuntimeVersionOf,
Block: Block,
Source§fn runtime_version(
&self,
ext: &mut dyn Externalities,
runtime_code: &RuntimeCode<'_>,
) -> Result<RuntimeVersion, Error>
fn runtime_version( &self, ext: &mut dyn Externalities, runtime_code: &RuntimeCode<'_>, ) -> Result<RuntimeVersion, Error>
Extract
RuntimeVersion
of the given runtime_code
.