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