[][src]Trait sp_api::CallApiAt

pub trait CallApiAt<Block: BlockT> {
    type Error: Debug + From<ApiError>;
    type StateBackend: StateBackend<HashFor<Block>>;
    pub fn call_api_at<'a, R: Encode + Decode + PartialEq, NC: FnOnce() -> Result<R, String> + UnwindSafe, C: Core<Block, Error = Self::Error>>(
        &self,
        params: CallApiAtParams<'a, Block, C, NC, Self::StateBackend>
    ) -> Result<NativeOrEncoded<R>, Self::Error>;
pub fn runtime_version_at(
        &self,
        at: &BlockId<Block>
    ) -> Result<RuntimeVersion, Self::Error>; }

Something that can call into the an api at a given block.

Associated Types

type Error: Debug + From<ApiError>[src]

Error type used by the implementation.

type StateBackend: StateBackend<HashFor<Block>>[src]

The state backend that is used to store the block states.

Loading content...

Required methods

pub fn call_api_at<'a, R: Encode + Decode + PartialEq, NC: FnOnce() -> Result<R, String> + UnwindSafe, C: Core<Block, Error = Self::Error>>(
    &self,
    params: CallApiAtParams<'a, Block, C, NC, Self::StateBackend>
) -> Result<NativeOrEncoded<R>, Self::Error>
[src]

Calls the given api function with the given encoded arguments at the given block and returns the encoded result.

pub fn runtime_version_at(
    &self,
    at: &BlockId<Block>
) -> Result<RuntimeVersion, Self::Error>
[src]

Returns the runtime version at the given block.

Loading content...

Implementors

Loading content...