Trait sc_client_api::call_executor::CallExecutor [−][src]
Method call executor.
Associated Types
type Error: Error
[src]
Externalities error type.
type Backend: Backend<B>
[src]
The backend used by the node.
Required methods
fn call(
&self,
id: &BlockId<B>,
method: &str,
call_data: &[u8],
strategy: ExecutionStrategy,
extensions: Option<Extensions>
) -> Result<Vec<u8>, Error>
[src]
&self,
id: &BlockId<B>,
method: &str,
call_data: &[u8],
strategy: ExecutionStrategy,
extensions: Option<Extensions>
) -> Result<Vec<u8>, Error>
Execute a call to a contract on top of state in a block of given hash.
No changes are made.
fn contextual_call<'a, IB: Fn() -> Result<()>, 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, String> + UnwindSafe>(
&self,
initialize_block_fn: IB,
at: &BlockId<B>,
method: &str,
call_data: &[u8],
changes: &RefCell<OverlayedChanges>,
offchain_changes: &RefCell<OffchainOverlayedChanges>,
storage_transaction_cache: Option<&RefCell<StorageTransactionCache<B, <Self::Backend as Backend<B>>::State>>>,
initialize_block: InitializeBlock<'a, B>,
execution_manager: ExecutionManager<EM>,
native_call: Option<NC>,
proof_recorder: &Option<ProofRecorder<B>>,
extensions: Option<Extensions>
) -> Result<NativeOrEncoded<R>> where
ExecutionManager<EM>: Clone,
[src]
&self,
initialize_block_fn: IB,
at: &BlockId<B>,
method: &str,
call_data: &[u8],
changes: &RefCell<OverlayedChanges>,
offchain_changes: &RefCell<OffchainOverlayedChanges>,
storage_transaction_cache: Option<&RefCell<StorageTransactionCache<B, <Self::Backend as Backend<B>>::State>>>,
initialize_block: InitializeBlock<'a, B>,
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>
[src]
Extract RuntimeVersion of given block
No changes are made.
fn prove_at_trie_state<S: TrieBackendStorage<HashFor<B>>>(
&self,
trie_state: &TrieBackend<S, HashFor<B>>,
overlay: &mut OverlayedChanges,
method: &str,
call_data: &[u8]
) -> Result<(Vec<u8>, StorageProof), Error>
[src]
&self,
trie_state: &TrieBackend<S, HashFor<B>>,
overlay: &mut OverlayedChanges,
method: &str,
call_data: &[u8]
) -> Result<(Vec<u8>, StorageProof), Error>
Execute a call to a contract on top of given trie state, gathering execution proof.
No changes are made.
fn native_runtime_version(&self) -> Option<&NativeVersion>
[src]
Get runtime version if supported.
Provided methods
fn prove_at_state<S: Backend<HashFor<B>>>(
&self,
state: S,
overlay: &mut OverlayedChanges,
method: &str,
call_data: &[u8]
) -> Result<(Vec<u8>, StorageProof), Error>
[src]
&self,
state: S,
overlay: &mut OverlayedChanges,
method: &str,
call_data: &[u8]
) -> Result<(Vec<u8>, StorageProof), Error>
Execute a call to a contract on top of given state, gathering execution proof.
No changes are made.