Trait frame_support::traits::OnRuntimeUpgradeHelpersExt[][src]

pub trait OnRuntimeUpgradeHelpersExt {
    fn storage_key(ident: &str) -> [u8; 32] { ... }
fn get_temp_storage<T: Decode>(at: &str) -> Option<T> { ... }
fn set_temp_storage<T: Encode>(data: T, at: &str) { ... } }
Expand description

Some helper functions for OnRuntimeUpgrade during try-runtime testing.

Provided methods

Generate a storage key unique to this runtime upgrade.

This can be used to communicate data from pre-upgrade to post-upgrade state and check them. See Self::set_temp_storage and Self::get_temp_storage.

Get temporary storage data written by Self::set_temp_storage.

Returns None if either the data is unavailable or un-decodable.

A at storage identifier must be provided to indicate where the storage is being read from.

Write some temporary data to a specific storage that can be read (potentially in post-upgrade hook) via Self::get_temp_storage.

A at storage identifier must be provided to indicate where the storage is being written to.

Implementors