Trait polkadot_sdk_frame::runtime::apis::CallApiAt
pub trait CallApiAt<Block>where
Block: Block,{
type StateBackend: Backend<<<Block as Block>::Header as Header>::Hashing> + AsTrieBackend<<<Block as Block>::Header as Header>::Hashing>;
// Required methods
fn call_api_at(
&self,
params: CallApiAtParams<'_, Block>,
) -> Result<Vec<u8>, ApiError>;
fn runtime_version_at(
&self,
at_hash: <Block as Block>::Hash,
) -> Result<RuntimeVersion, ApiError>;
fn state_at(
&self,
at: <Block as Block>::Hash,
) -> Result<Self::StateBackend, ApiError>;
fn initialize_extensions(
&self,
at: <Block as Block>::Hash,
extensions: &mut Extensions,
) -> Result<(), ApiError>;
}
Expand description
Something that can call into the an api at a given block.
Required Associated Types§
Required Methods§
fn call_api_at(
&self,
params: CallApiAtParams<'_, Block>,
) -> Result<Vec<u8>, ApiError>
fn call_api_at( &self, params: CallApiAtParams<'_, Block>, ) -> Result<Vec<u8>, ApiError>
Calls the given api function with the given encoded arguments at the given block and returns the encoded result.
fn runtime_version_at(
&self,
at_hash: <Block as Block>::Hash,
) -> Result<RuntimeVersion, ApiError>
fn runtime_version_at( &self, at_hash: <Block as Block>::Hash, ) -> Result<RuntimeVersion, ApiError>
Returns the runtime version at the given block.