I have one storagemap which stores u32 values, now I need to migrate this to Vec<T::AccountId> How to do this?

2 Answers 2


You can check how Substrate migrates the account references.


The link shows you how to migrate.

And for your case:

YourMap::<T>::translate(|_key, old_u32_value|
    // This is just an example, put your `u32 -> Vec<AccountId>` logic here

You can check Substrate tutorial on storage migrations

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.