Trait drink_next::runtime::Runtime
source · pub trait Runtime {
type Config: Config;
// Required methods
fn default_actor() -> AccountIdFor<Self::Config>;
fn get_metadata() -> RuntimeMetadataPrefixed;
fn convert_account_to_origin(
account: AccountIdFor<Self::Config>
) -> <<Self::Config as Config>::RuntimeCall as Dispatchable>::RuntimeOrigin;
// Provided methods
fn initialize_storage(_storage: &mut Storage) -> Result<(), String> { ... }
fn initialize_block(
_height: BlockNumberFor<Self::Config>,
_parent_hash: <Self::Config as Config>::Hash
) -> Result<(), String> { ... }
fn finalize_block(
_height: BlockNumberFor<Self::Config>
) -> Result<<Self::Config as Config>::Hash, String> { ... }
}
Expand description
A runtime to use.
Required Associated Types§
Required Methods§
sourcefn default_actor() -> AccountIdFor<Self::Config>
fn default_actor() -> AccountIdFor<Self::Config>
Default actor for the runtime.
sourcefn get_metadata() -> RuntimeMetadataPrefixed
fn get_metadata() -> RuntimeMetadataPrefixed
Metadata of the runtime.
sourcefn convert_account_to_origin(
account: AccountIdFor<Self::Config>
) -> <<Self::Config as Config>::RuntimeCall as Dispatchable>::RuntimeOrigin
fn convert_account_to_origin( account: AccountIdFor<Self::Config> ) -> <<Self::Config as Config>::RuntimeCall as Dispatchable>::RuntimeOrigin
Convert an account to an call origin.
Provided Methods§
sourcefn initialize_storage(_storage: &mut Storage) -> Result<(), String>
fn initialize_storage(_storage: &mut Storage) -> Result<(), String>
Initialize the storage at the genesis block.
sourcefn initialize_block(
_height: BlockNumberFor<Self::Config>,
_parent_hash: <Self::Config as Config>::Hash
) -> Result<(), String>
fn initialize_block( _height: BlockNumberFor<Self::Config>, _parent_hash: <Self::Config as Config>::Hash ) -> Result<(), String>
Initialize a new block at particular height.
sourcefn finalize_block(
_height: BlockNumberFor<Self::Config>
) -> Result<<Self::Config as Config>::Hash, String>
fn finalize_block( _height: BlockNumberFor<Self::Config> ) -> Result<<Self::Config as Config>::Hash, String>
Finalize a block at particular height.
Object Safety§
This trait is not object safe.