Skip to content

Commit 3a11e05

Browse files
Added pallet_balances migration to the runtime upgrades. Added pallet_society migration to the runtime upgrades. Added pallet_multisig migration to the runtime upgrades. Added pallet_preimage migration to the runtime upgrades. Developed migration for the uniques pallet. Added pallet_uniques migration to the runtime upgrades.
1 parent 34cd602 commit 3a11e05

File tree

3 files changed

+27
-2
lines changed

3 files changed

+27
-2
lines changed

runtime/src/lib.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,15 +122,22 @@ pub type UncheckedExtrinsic =
122122

123123
/// Extrinsic type that has already been checked.
124124
pub type CheckedExtrinsic = generic::CheckedExtrinsic<AccountId, RuntimeCall, SignedExtra>;
125-
125+
parameter_types! {
126+
pub const Payouts: Vec<(AccountId, Balance)> = Vec::new();
127+
pub const InactiveAccounts: Vec<AccountId> = Vec::new();
128+
}
126129
pub type RuntimeUpgrades = (
127130
cumulus_pallet_parachain_system::migration::Migration<Runtime>,
128131
pallet_collator_selection::migration::v1::MigrateToV1<Runtime>,
129132
pallet_xcm::migration::v1::VersionCheckedMigrateToV1<Runtime>,
130133
cumulus_pallet_dmp_queue::migration::Migration<Runtime>,
131134
cumulus_pallet_xcmp_queue::migration::Migration<Runtime>,
135+
pallet_balances::migration::MigrateManyToTrackInactive<Runtime, InactiveAccounts>,
132136
pallet_assets::migration::v1::MigrateToV1<Runtime>,
133-
pallet_society::migrations::VersionCheckedMigrateToV2<Runtime, pallet_society::Instance1, Vec<(AccountId,Balances)>::new()>,
137+
pallet_society::migrations::VersionCheckedMigrateToV2<Runtime, (), Payouts>,
138+
pallet_multisig::migrations::v1::MigrateToV1<Runtime>,
139+
pallet_preimage::migration::v1::Migration<Runtime>,
140+
migrations::uniques::v0::MigrateToV1,
134141
migrations::identity::v1::MigrateToV2
135142
);
136143

runtime/src/migrations/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
pub mod identity;
2+
pub mod uniques;

runtime/src/migrations/uniques.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
use frame_support::traits::OnRuntimeUpgrade;
2+
use crate::Runtime;
3+
4+
5+
pub mod v0 {
6+
use super::*;
7+
use frame_support::pallet_prelude::*;
8+
9+
pub struct MigrateToV1;
10+
11+
impl OnRuntimeUpgrade for MigrateToV1 {
12+
fn on_runtime_upgrade() -> Weight {
13+
pallet_uniques::migration::migrate_to_v1::<Runtime, (), pallet_uniques::Pallet<Runtime, ()>>()
14+
}
15+
16+
}
17+
}

0 commit comments

Comments
 (0)