Trait sp_api::Core [−][src]
pub trait Core<Block: BlockT>: 'static + Send + Sync { fn version(
&self,
__runtime_api_at_param__: &BlockId<Block>
) -> Result<RuntimeVersion, ApiError> { ... } fn version_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<RuntimeVersion, ApiError> { ... } fn version_before_version_3(
&self,
__runtime_api_at_param__: &BlockId<Block>
) -> Result<OldRuntimeVersion, ApiError> { ... } fn version_before_version_3_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<OldRuntimeVersion, ApiError> { ... } fn execute_block(
&self,
__runtime_api_at_param__: &BlockId<Block>,
block: Block
) -> Result<(), ApiError> { ... } fn execute_block_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
block: Block
) -> Result<(), ApiError> { ... } fn initialize_block(
&self,
__runtime_api_at_param__: &BlockId<Block>,
header: &<Block as BlockT>::Header
) -> Result<(), ApiError> { ... } fn initialize_block_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
header: &<Block as BlockT>::Header
) -> Result<(), ApiError> { ... } }
Expand description
The Core
runtime api that every Substrate runtime needs to implement.
Provided methods
Returns the version of the runtime.
fn version_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<RuntimeVersion, ApiError>
fn version_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<RuntimeVersion, ApiError>
Returns the version of the runtime.
fn version_before_version_3(
&self,
__runtime_api_at_param__: &BlockId<Block>
) -> Result<OldRuntimeVersion, ApiError>
fn version_before_version_3(
&self,
__runtime_api_at_param__: &BlockId<Block>
) -> Result<OldRuntimeVersion, ApiError>
👎 Deprecated
Returns the version of the runtime.
fn version_before_version_3_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<OldRuntimeVersion, ApiError>
fn version_before_version_3_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<OldRuntimeVersion, ApiError>
👎 Deprecated
Returns the version of the runtime.
Execute the given block.
fn execute_block_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
block: Block
) -> Result<(), ApiError>
fn execute_block_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
block: Block
) -> Result<(), ApiError>
Execute the given block.
Initialize a block with the given header.
fn initialize_block_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
header: &<Block as BlockT>::Header
) -> Result<(), ApiError>
fn initialize_block_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
header: &<Block as BlockT>::Header
) -> Result<(), ApiError>
Initialize a block with the given header.