Trait polkadot_sdk_frame::runtime::apis::Metadata
pub trait Metadata<Block>: Core<Block>where
Block: Block,{
// Provided methods
fn metadata(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
) -> Result<OpaqueMetadata, ApiError> { ... }
fn metadata_at_version(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
version: u32,
) -> Result<Option<OpaqueMetadata>, ApiError> { ... }
fn metadata_versions(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
) -> Result<Vec<u32>, ApiError> { ... }
}
Expand description
The Metadata
api trait that returns metadata for the runtime.
Provided Methods§
fn metadata(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
) -> Result<OpaqueMetadata, ApiError>
fn metadata( &self, __runtime_api_at_param__: <Block as Block>::Hash, ) -> Result<OpaqueMetadata, ApiError>
Returns the metadata of a runtime.
fn metadata_at_version(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
version: u32,
) -> Result<Option<OpaqueMetadata>, ApiError>
fn metadata_at_version( &self, __runtime_api_at_param__: <Block as Block>::Hash, version: u32, ) -> Result<Option<OpaqueMetadata>, ApiError>
Returns the metadata at a given version.
If the given version
isn’t supported, this will return None
.
Use Self::metadata_versions
to find out about supported metadata version of the runtime.