Add the uniques migration for statemine (#911)

* Add the uniques migration for statemine

* return weight from on_runtime_upgrade (#914)

need to return the weight from on_runtimie_upgrade().

* cargo update -p sp-io

* cargo update -p polkadot-primitives

Co-authored-by: hamidra <hamid.alipour@gmail.com>
This commit is contained in:
Kian Paimani
2022-01-20 10:14:31 +01:00
committed by GitHub
parent 1aa820a483
commit f1474d1d4f
2 changed files with 324 additions and 343 deletions
Generated
+316 -342
View File
File diff suppressed because it is too large Load Diff
+8 -1
View File
@@ -782,7 +782,7 @@ pub type Executive = frame_executive::Executive<
frame_system::ChainContext<Runtime>, frame_system::ChainContext<Runtime>,
Runtime, Runtime,
AllPalletsWithSystem, AllPalletsWithSystem,
RemoveCollectiveFlip, (RemoveCollectiveFlip, UniquesV1Migration),
>; >;
pub struct RemoveCollectiveFlip; pub struct RemoveCollectiveFlip;
@@ -795,6 +795,13 @@ impl frame_support::traits::OnRuntimeUpgrade for RemoveCollectiveFlip {
} }
} }
pub struct UniquesV1Migration;
impl frame_support::traits::OnRuntimeUpgrade for UniquesV1Migration {
fn on_runtime_upgrade() -> Weight {
pallet_uniques::migration::migrate_to_v1::<Runtime, _, Uniques>()
}
}
impl_runtime_apis! { impl_runtime_apis! {
impl sp_consensus_aura::AuraApi<Block, AuraId> for Runtime { impl sp_consensus_aura::AuraApi<Block, AuraId> for Runtime {
fn slot_duration() -> sp_consensus_aura::SlotDuration { fn slot_duration() -> sp_consensus_aura::SlotDuration {