Struct sc_light::call_executor::GenesisCallExecutor [−][src]
pub struct GenesisCallExecutor<B, L> { /* fields omitted */ }
Expand description
Call executor that is able to execute calls only on genesis state.
Trying to execute call on non-genesis state leads to error.
Implementations
Trait Implementations
impl<Block, B, Local> CallExecutor<Block> for GenesisCallExecutor<B, Local> where
Block: BlockT,
B: RemoteBackend<Block>,
Local: CallExecutor<Block>,
impl<Block, B, Local> CallExecutor<Block> for GenesisCallExecutor<B, Local> where
Block: BlockT,
B: RemoteBackend<Block>,
Local: CallExecutor<Block>,
type Error = ClientError
type Error = ClientError
Externalities error type.
type Backend = B
type Backend = B
The backend used by the node.
fn call(
&self,
id: &BlockId<Block>,
method: &str,
call_data: &[u8],
strategy: ExecutionStrategy,
extensions: Option<Extensions>
) -> ClientResult<Vec<u8>>
fn call(
&self,
id: &BlockId<Block>,
method: &str,
call_data: &[u8],
strategy: ExecutionStrategy,
extensions: Option<Extensions>
) -> ClientResult<Vec<u8>>
Execute a call to a contract on top of state in a block of given hash. Read more
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<Block>,
method: &str,
call_data: &[u8],
changes: &RefCell<OverlayedChanges>,
_: Option<&RefCell<StorageTransactionCache<Block, B::State>>>,
_manager: ExecutionManager<EM>,
native_call: Option<NC>,
recorder: &Option<ProofRecorder<Block>>,
extensions: Option<Extensions>
) -> ClientResult<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<Block>,
method: &str,
call_data: &[u8],
changes: &RefCell<OverlayedChanges>,
_: Option<&RefCell<StorageTransactionCache<Block, B::State>>>,
_manager: ExecutionManager<EM>,
native_call: Option<NC>,
recorder: &Option<ProofRecorder<Block>>,
extensions: Option<Extensions>
) -> ClientResult<NativeOrEncoded<R>> where
ExecutionManager<EM>: Clone,
Execute a contextual call on top of state in a block of a given hash. Read more
fn prove_execution(
&self,
at: &BlockId<Block>,
method: &str,
call_data: &[u8]
) -> ClientResult<(Vec<u8>, StorageProof)>
fn prove_execution(
&self,
at: &BlockId<Block>,
method: &str,
call_data: &[u8]
) -> ClientResult<(Vec<u8>, StorageProof)>
Prove the execution of the given method
. Read more
Extract RuntimeVersion of given block Read more
Auto Trait Implementations
impl<B, L> RefUnwindSafe for GenesisCallExecutor<B, L> where
B: RefUnwindSafe,
L: RefUnwindSafe,
impl<B, L> Send for GenesisCallExecutor<B, L> where
B: Send + Sync,
L: Send,
impl<B, L> Sync for GenesisCallExecutor<B, L> where
B: Send + Sync,
L: Sync,
impl<B, L> Unpin for GenesisCallExecutor<B, L> where
L: Unpin,
impl<B, L> UnwindSafe for GenesisCallExecutor<B, L> where
B: RefUnwindSafe,
L: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read more
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
type Output = T
type Output = T
Should always be Self
The counterpart to unchecked_from
.
Consume self to return an equivalent value of T
.
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more