|
13 | 13 | // See the License for the specific language governing permissions and |
14 | 14 | // limitations under the License. |
15 | 15 |
|
16 | | -use super::*; |
17 | | -use frame_support::parameter_types; |
18 | | -use frame_support::traits::{ConstU32, LockIdentifier}; |
19 | | -use frame_system::pallet_prelude::BlockNumberFor; |
20 | | - |
21 | | -parameter_types! { |
22 | | - pub const CouncilPalletName: &'static str = "Council"; |
23 | | - pub const PhragmenElectionPalletName: &'static str = "Elections"; |
24 | | - pub const TipsPalletName: &'static str = "Tips"; |
25 | | - pub const PhragmenElectionPalletId: LockIdentifier = *b"phrelect"; |
26 | | - pub const DataDepositPerByte: Balance = primitives::constants::currency::CENTS; |
27 | | - pub const TipReportDepositBase: Balance = 10 * primitives::constants::currency::DOLLARS; |
28 | | -} |
29 | | - |
30 | | -// Special Config for Gov V1 pallets, allowing us to run migrations for them without |
31 | | -// implementing their configs on [`Runtime`]. |
32 | | -pub struct UnlockConfig; |
33 | | -impl pallet_elections_phragmen::migrations::unlock_and_unreserve_all_funds::UnlockConfig for UnlockConfig { |
34 | | - type Currency = Balances; |
35 | | - type MaxVotesPerVoter = ConstU32<16>; |
36 | | - type PalletId = PhragmenElectionPalletId; |
37 | | - type AccountId = AccountId; |
38 | | - type DbWeight = <Runtime as frame_system::Config>::DbWeight; |
39 | | - type PalletName = PhragmenElectionPalletName; |
40 | | -} |
41 | | -impl pallet_tips::migrations::unreserve_deposits::UnlockConfig<()> for UnlockConfig { |
42 | | - type Currency = Balances; |
43 | | - type Hash = Hash; |
44 | | - type DataDepositPerByte = DataDepositPerByte; |
45 | | - type TipReportDepositBase = TipReportDepositBase; |
46 | | - type AccountId = AccountId; |
47 | | - type BlockNumber = BlockNumberFor<Runtime>; |
48 | | - type DbWeight = <Runtime as frame_system::Config>::DbWeight; |
49 | | - type PalletName = TipsPalletName; |
50 | | -} |
51 | | - |
52 | | -pub type Migrations = ( |
53 | | - pallet_ema_oracle::migrations::v1::MigrateV0ToV1<Runtime>, |
54 | | - // Unlock/unreserve balances from Gov v1 pallets that hold them |
55 | | - // https://github.com/paritytech/polkadot/issues/6749 |
56 | | - pallet_elections_phragmen::migrations::unlock_and_unreserve_all_funds::UnlockAndUnreserveAllFunds<UnlockConfig>, |
57 | | - pallet_tips::migrations::unreserve_deposits::UnreserveDeposits<UnlockConfig, ()>, |
58 | | - // Delete storage key/values for pallets Council, PragmenElection and Tips |
59 | | - frame_support::migrations::RemovePallet<CouncilPalletName, <Runtime as frame_system::Config>::DbWeight>, |
60 | | - frame_support::migrations::RemovePallet<PhragmenElectionPalletName, <Runtime as frame_system::Config>::DbWeight>, |
61 | | - frame_support::migrations::RemovePallet<TipsPalletName, <Runtime as frame_system::Config>::DbWeight>, |
62 | | - // Duster pallet migration to rename AccountBlacklist to AccountWhitelist, at RuntimeVersion 348 |
63 | | - pallet_duster::migration::v2::MigrateV1ToV2<Runtime>, |
64 | | -); |
| 16 | +pub type Migrations = (); |
0 commit comments