diff --git a/pallets/unified-accounts/src/lib.rs b/pallets/unified-accounts/src/lib.rs index 4b72946055..455025c152 100644 --- a/pallets/unified-accounts/src/lib.rs +++ b/pallets/unified-accounts/src/lib.rs @@ -88,7 +88,6 @@ use sp_std::marker::PhantomData; pub use pallet::*; -pub mod migration; pub mod weights; pub use weights::WeightInfo; diff --git a/pallets/unified-accounts/src/migration.rs b/pallets/unified-accounts/src/migration.rs deleted file mode 100644 index 9a1c7b89df..0000000000 --- a/pallets/unified-accounts/src/migration.rs +++ /dev/null @@ -1,39 +0,0 @@ -// This file is part of Astar. - -// Copyright (C) Stake Technologies Pte.Ltd. -// SPDX-License-Identifier: GPL-3.0-or-later - -// Astar is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Astar is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Astar. If not, see . - -use super::{Config, Pallet}; -use astar_primitives::evm::EvmAddress; -use frame_support::{pallet_prelude::OptionQuery, storage_alias, Blake2_128Concat}; - -#[storage_alias] -type EvmToNative = StorageMap< - Pallet, - Blake2_128Concat, - ::AccountId, - EvmAddress, - OptionQuery, ->; - -#[storage_alias] -type NativeToEvm = StorageMap< - Pallet, - Blake2_128Concat, - EvmAddress, - ::AccountId, - OptionQuery, ->; diff --git a/runtime/astar/src/lib.rs b/runtime/astar/src/lib.rs index c1cfcc6a50..511211b000 100644 --- a/runtime/astar/src/lib.rs +++ b/runtime/astar/src/lib.rs @@ -718,7 +718,7 @@ impl pallet_contracts::Config for Runtime { type CodeHashLockupDepositPercent = CodeHashLockupDepositPercent; type Debug = (); type Environment = (); - type Migrations = (); + type Migrations = (pallet_contracts::migration::v16::Migration,); type Xcm = (); type UploadOrigin = EnsureSigned<::AccountId>; type InstantiateOrigin = EnsureSigned<::AccountId>; @@ -1025,7 +1025,6 @@ impl InstanceFilter for ProxyType { | RuntimeCall::XcmpQueue(..) | RuntimeCall::PolkadotXcm(..) | RuntimeCall::CumulusXcm(..) - | RuntimeCall::DmpQueue(..) | RuntimeCall::XcAssetConfig(..) // Skip entire EVM pallet // Skip entire Ethereum pallet @@ -1226,7 +1225,6 @@ construct_runtime!( XcmpQueue: cumulus_pallet_xcmp_queue = 50, PolkadotXcm: pallet_xcm = 51, CumulusXcm: cumulus_pallet_xcm = 52, - DmpQueue: cumulus_pallet_dmp_queue = 53, XcAssetConfig: pallet_xc_asset_config = 54, XTokens: orml_xtokens = 55, MessageQueue: pallet_message_queue = 56, @@ -1297,17 +1295,23 @@ parameter_types! { ]; } +parameter_types! { + pub const DmpQueuePalletName: &'static str = "DmpQueue"; +} + /// All migrations that will run on the next runtime upgrade. /// /// Once done, migrations should be removed from the tuple. pub type Migrations = ( // permanent migration, do not remove pallet_xcm::migration::MigrateToLatestXcmVersion, - // XCM V3 -> V4 - pallet_xc_asset_config::migrations::versioned::V2ToV3, - pallet_identity::migration::versioned::V0ToV1, // dapp-staking dyn tier threshold migrations pallet_dapp_staking_v3::migration::versioned_migrations::V7ToV8, + frame_support::migrations::RemovePallet< + DmpQueuePalletName, + ::DbWeight, + >, + pallet_contracts::Migration, ); type EventRecord = frame_system::EventRecord< diff --git a/runtime/astar/src/xcm_config.rs b/runtime/astar/src/xcm_config.rs index 9785a9eaaf..77e44a3fe6 100644 --- a/runtime/astar/src/xcm_config.rs +++ b/runtime/astar/src/xcm_config.rs @@ -341,19 +341,6 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { type WeightInfo = cumulus_pallet_xcmp_queue::weights::SubstrateWeight; } -parameter_types! { - pub const RelayOrigin: AggregateMessageOrigin = AggregateMessageOrigin::Parent; -} - -// TODO: This pallet should be removed after the lazy migration is done and -// event `Completed` is emitted. -// https://github.com/paritytech/polkadot-sdk/pull/1246 -impl cumulus_pallet_dmp_queue::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type DmpSink = frame_support::traits::EnqueueWithOrigin; - type WeightInfo = cumulus_pallet_dmp_queue::weights::SubstrateWeight; -} - parameter_types! { /// The absolute location in perspective of the whole network. pub AstarLocationAbsolute: Location = Location { diff --git a/runtime/shibuya/src/lib.rs b/runtime/shibuya/src/lib.rs index 8507677993..f6e710ad51 100644 --- a/runtime/shibuya/src/lib.rs +++ b/runtime/shibuya/src/lib.rs @@ -764,7 +764,7 @@ impl pallet_contracts::Config for Runtime { type CodeHashLockupDepositPercent = CodeHashLockupDepositPercent; type Debug = (); type Environment = (); - type Migrations = (); + type Migrations = (pallet_contracts::migration::v16::Migration,); type Xcm = (); type UploadOrigin = EnsureSigned<::AccountId>; type InstantiateOrigin = EnsureSigned<::AccountId>; @@ -1058,7 +1058,6 @@ impl InstanceFilter for ProxyType { | RuntimeCall::XcmpQueue(..) | RuntimeCall::PolkadotXcm(..) | RuntimeCall::CumulusXcm(..) - | RuntimeCall::DmpQueue(..) | RuntimeCall::XcAssetConfig(..) // Skip entire EVM pallet // Skip entire Ethereum pallet @@ -1549,7 +1548,6 @@ construct_runtime!( XcmpQueue: cumulus_pallet_xcmp_queue = 50, PolkadotXcm: pallet_xcm = 51, CumulusXcm: cumulus_pallet_xcm = 52, - DmpQueue: cumulus_pallet_dmp_queue = 53, XcAssetConfig: pallet_xc_asset_config = 54, XTokens: orml_xtokens = 55, MessageQueue: pallet_message_queue = 56, @@ -1638,6 +1636,10 @@ parameter_types! { ]; } +parameter_types! { + pub const DmpQueuePalletName: &'static str = "DmpQueue"; +} + /// All migrations that will run on the next runtime upgrade. /// /// Once done, migrations should be removed from the tuple. @@ -1646,6 +1648,11 @@ pub type Migrations = ( pallet_xcm::migration::MigrateToLatestXcmVersion, // dapp-staking dyn tier threshold migrations pallet_dapp_staking_v3::migration::versioned_migrations::V7ToV8, + frame_support::migrations::RemovePallet< + DmpQueuePalletName, + ::DbWeight, + >, + pallet_contracts::Migration, ); type EventRecord = frame_system::EventRecord< diff --git a/runtime/shibuya/src/xcm_config.rs b/runtime/shibuya/src/xcm_config.rs index bb36c1935f..beb5f76f41 100644 --- a/runtime/shibuya/src/xcm_config.rs +++ b/runtime/shibuya/src/xcm_config.rs @@ -270,16 +270,6 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { type WeightInfo = cumulus_pallet_xcmp_queue::weights::SubstrateWeight; } -parameter_types! { - pub const RelayOrigin: AggregateMessageOrigin = AggregateMessageOrigin::Parent; -} - -impl cumulus_pallet_dmp_queue::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type DmpSink = frame_support::traits::EnqueueWithOrigin; - type WeightInfo = cumulus_pallet_dmp_queue::weights::SubstrateWeight; -} - parameter_types! { /// The absolute location in perspective of the whole network. pub ShibuyaLocationAbsolute: Location = Location { diff --git a/runtime/shiden/src/lib.rs b/runtime/shiden/src/lib.rs index 7f6a91fdae..ae03c6f352 100644 --- a/runtime/shiden/src/lib.rs +++ b/runtime/shiden/src/lib.rs @@ -746,7 +746,7 @@ impl pallet_contracts::Config for Runtime { type CodeHashLockupDepositPercent = CodeHashLockupDepositPercent; type Debug = (); type Environment = (); - type Migrations = (); + type Migrations = (pallet_contracts::migration::v16::Migration,); type Xcm = (); type UploadOrigin = EnsureSigned<::AccountId>; type InstantiateOrigin = EnsureSigned<::AccountId>; @@ -1024,7 +1024,6 @@ impl InstanceFilter for ProxyType { | RuntimeCall::XcmpQueue(..) | RuntimeCall::PolkadotXcm(..) | RuntimeCall::CumulusXcm(..) - | RuntimeCall::DmpQueue(..) | RuntimeCall::XcAssetConfig(..) // Skip entire EVM pallet // Skip entire Ethereum pallet @@ -1225,7 +1224,6 @@ construct_runtime!( XcmpQueue: cumulus_pallet_xcmp_queue = 50, PolkadotXcm: pallet_xcm = 51, CumulusXcm: cumulus_pallet_xcm = 52, - DmpQueue: cumulus_pallet_dmp_queue = 53, XcAssetConfig: pallet_xc_asset_config = 54, XTokens: orml_xtokens = 55, MessageQueue: pallet_message_queue = 56, @@ -1297,18 +1295,22 @@ parameter_types! { ]; } +parameter_types! { + pub const DmpQueuePalletName: &'static str = "DmpQueue"; +} + /// All migrations that will run on the next runtime upgrade. /// /// Once done, migrations should be removed from the tuple. pub type Migrations = ( - cumulus_pallet_xcmp_queue::migration::v4::MigrationToV4, - // permanent migration, do not remove pallet_xcm::migration::MigrateToLatestXcmVersion, - // XCM V3 -> V4 - pallet_xc_asset_config::migrations::versioned::V2ToV3, - pallet_identity::migration::versioned::V0ToV1, // dapp-staking dyn tier threshold migrations pallet_dapp_staking_v3::migration::versioned_migrations::V7ToV8, + frame_support::migrations::RemovePallet< + DmpQueuePalletName, + ::DbWeight, + >, + pallet_contracts::Migration, ); type EventRecord = frame_system::EventRecord< diff --git a/runtime/shiden/src/xcm_config.rs b/runtime/shiden/src/xcm_config.rs index 8bc30e2968..e4eac2340a 100644 --- a/runtime/shiden/src/xcm_config.rs +++ b/runtime/shiden/src/xcm_config.rs @@ -345,16 +345,6 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { type WeightInfo = cumulus_pallet_xcmp_queue::weights::SubstrateWeight; } -parameter_types! { - pub const RelayOrigin: AggregateMessageOrigin = AggregateMessageOrigin::Parent; -} - -impl cumulus_pallet_dmp_queue::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type DmpSink = frame_support::traits::EnqueueWithOrigin; - type WeightInfo = cumulus_pallet_dmp_queue::weights::SubstrateWeight; -} - parameter_types! { /// The absolute location in perspective of the whole network. pub ShidenLocationAbsolute: Location = Location {