Trait sc_client_api::call_executor::CallExecutor [−][src]
pub trait CallExecutor<B: BlockT> { type Error: Error; type Backend: Backend<B>; fn call(
&self,
id: &BlockId<B>,
method: &str,
call_data: &[u8],
strategy: ExecutionStrategy,
extensions: Option<Extensions>
) -> Result<Vec<u8>, Error>; fn contextual_call<EM: Fn(Result<NativeOrEncoded<R>, Self::Error>, Result<NativeOrEncoded<R>, Self::Error>) -> Result<NativeOrEncoded<R>, Self::Error>, R: Encode + Decode + PartialEq, NC: FnOnce() -> Result<R, ApiError> + UnwindSafe>(
&self,
at: &BlockId<B>,
method: &str,
call_data: &[u8],
changes: &RefCell<OverlayedChanges>,
storage_transaction_cache: Option<&RefCell<StorageTransactionCache<B, <Self::Backend as Backend<B>>::State>>>,
execution_manager: ExecutionManager<EM>,
native_call: Option<NC>,
proof_recorder: &Option<ProofRecorder<B>>,
extensions: Option<Extensions>
) -> Result<NativeOrEncoded<R>>
where
ExecutionManager<EM>: Clone; fn runtime_version(&self, id: &BlockId<B>) -> Result<RuntimeVersion, Error>; fn prove_execution(
&self,
at: &BlockId<B>,
method: &str,
call_data: &[u8]
) -> Result<(Vec<u8>, StorageProof), Error>; }
Expand description
Method call executor.
Associated Types
Required methods
Execute a call to a contract on top of state in a block of given hash.
No changes are made.
fn contextual_call<EM: Fn(Result<NativeOrEncoded<R>, Self::Error>, Result<NativeOrEncoded<R>, Self::Error>) -> Result<NativeOrEncoded<R>, Self::Error>, R: Encode + Decode + PartialEq, NC: FnOnce() -> Result<R, ApiError> + UnwindSafe>(
&self,
at: &BlockId<B>,
method: &str,
call_data: &[u8],
changes: &RefCell<OverlayedChanges>,
storage_transaction_cache: Option<&RefCell<StorageTransactionCache<B, <Self::Backend as Backend<B>>::State>>>,
execution_manager: ExecutionManager<EM>,
native_call: Option<NC>,
proof_recorder: &Option<ProofRecorder<B>>,
extensions: Option<Extensions>
) -> Result<NativeOrEncoded<R>> where
ExecutionManager<EM>: Clone,
fn contextual_call<EM: Fn(Result<NativeOrEncoded<R>, Self::Error>, Result<NativeOrEncoded<R>, Self::Error>) -> Result<NativeOrEncoded<R>, Self::Error>, R: Encode + Decode + PartialEq, NC: FnOnce() -> Result<R, ApiError> + UnwindSafe>(
&self,
at: &BlockId<B>,
method: &str,
call_data: &[u8],
changes: &RefCell<OverlayedChanges>,
storage_transaction_cache: Option<&RefCell<StorageTransactionCache<B, <Self::Backend as Backend<B>>::State>>>,
execution_manager: ExecutionManager<EM>,
native_call: Option<NC>,
proof_recorder: &Option<ProofRecorder<B>>,
extensions: Option<Extensions>
) -> Result<NativeOrEncoded<R>> where
ExecutionManager<EM>: Clone,
Execute a contextual call on top of state in a block of a given hash.
No changes are made. Before executing the method, passed header is installed as the current header of the execution context.
fn runtime_version(&self, id: &BlockId<B>) -> Result<RuntimeVersion, Error>
fn runtime_version(&self, id: &BlockId<B>) -> Result<RuntimeVersion, Error>
Extract RuntimeVersion of given block
No changes are made.