abstract_std::objects::module_version

Function migrate_module_data

Source
pub fn migrate_module_data(
    store: &mut dyn Storage,
    name: &str,
    version: &str,
    metadata: Option<String>,
) -> StdResult<()>
Expand description

Migrate the module data to the new state. If there was no moduleData stored, it will be set to the given values with an empty dependency array. If the metadata is None, the old metadata will be kept. If the metadata is Some, the old metadata will be overwritten.