Skip to content

Commit

Permalink
Remove migration pallet from testnet
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinfernandez1 committed Jul 15, 2024
1 parent ca1e970 commit c0b7278
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 179 deletions.
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions runtime/testnet/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ smallvec = { workspace = true }
# Local
runtime-common = { workspace = true, default-features = false }
pallet-marketplace = { workspace = true, default-features = false }
pallet-migration = { workspace = true, default-features = false }
pallet-multibatching = { workspace = true, default-features = false }
xcm-primitives = { path = "../../primitives/xcm", default-features = false }
pallet-escrow = { workspace = true, default-features = false }
Expand Down Expand Up @@ -123,7 +122,6 @@ std = [
"pallet-collective/std",
"pallet-multibatching/std",
"pallet-marketplace/std",
"pallet-migration/std",
"pallet-multisig/std",
"pallet-nfts/std",
"pallet-session/std",
Expand Down Expand Up @@ -173,7 +171,6 @@ runtime-benchmarks = [
"pallet-collective/runtime-benchmarks",
"pallet-message-queue/runtime-benchmarks",
"pallet-marketplace/runtime-benchmarks",
"pallet-migration/runtime-benchmarks",
"pallet-multisig/runtime-benchmarks",
"pallet-multibatching/runtime-benchmarks",
"pallet-nfts/runtime-benchmarks",
Expand Down Expand Up @@ -209,7 +206,6 @@ try-runtime = [
"pallet-collective/try-runtime",
"pallet-multibatching/try-runtime",
"pallet-marketplace/try-runtime",
"pallet-migration/try-runtime",
"pallet-multisig/try-runtime",
"pallet-nfts/try-runtime",
"pallet-session/try-runtime",
Expand Down
34 changes: 5 additions & 29 deletions runtime/testnet/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ use sp_std::prelude::*;
use sp_version::NativeVersion;
use sp_version::RuntimeVersion;

use frame_support::traits::{InstanceFilter, WithdrawReasons};
use frame_support::traits::{AsEnsureOriginWithArg, InstanceFilter, WithdrawReasons};
use frame_support::{
construct_runtime, derive_impl,
dispatch::DispatchClass,
Expand All @@ -39,7 +39,7 @@ use frame_support::{
};
use frame_system::{
limits::{BlockLength, BlockWeights},
EnsureRoot, EnsureSignedBy,
EnsureRoot,
};
use pallet_nfts::PalletFeatures;
use parachains_common::message_queue::{NarrowOriginToSibling, ParaIdToSibling};
Expand Down Expand Up @@ -224,7 +224,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("muse"),
impl_name: create_runtime_str!("muse"),
authoring_version: 1,
spec_version: 1006,
spec_version: 1007,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 1,
Expand Down Expand Up @@ -598,16 +598,12 @@ parameter_types! {

pub type CollectionId = IncrementableU256;

pub type MigratorOrigin = EnsureSignedBy<pallet_migration::MigratorProvider<Runtime>, AccountId>;

impl pallet_nfts::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type CollectionId = CollectionId;
type Currency = Balances;
//TODO: Change to AsEnsureOriginWithArg<frame_system::EnsureSigned<AccountId>> after migration
type CreateOrigin = MigratorOrigin;
//TODO: Change to EnsureRoot<AccountId> after migration
type ForceOrigin = MigratorOrigin;
type CreateOrigin = AsEnsureOriginWithArg<frame_system::EnsureSigned<AccountId>>;
type ForceOrigin = EnsureRoot<AccountId>;
type Locker = ();
type CollectionDeposit = NftsCollectionDeposit;
type ItemDeposit = NftsItemDeposit;
Expand Down Expand Up @@ -658,18 +654,6 @@ impl pallet_marketplace::Config for Runtime {
type BenchmarkHelper = ();
}

parameter_types! {
pub const MigrationPotId: PalletId = PalletId(*b"PotMigra");
}

impl pallet_migration::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type RuntimeCall = RuntimeCall;
type Currency = Balances;
type PotId = MigrationPotId;
type WeightInfo = weights::pallet_migration::WeightInfo<Runtime>;
}

parameter_types! {
pub const ProxyDepositBase: Balance = deposit(1, 8);
pub const ProxyDepositFactor: Balance = deposit(0, 33);
Expand Down Expand Up @@ -846,7 +830,6 @@ construct_runtime!(
// Other pallets
Proxy: pallet_proxy = 40,
Vesting: pallet_vesting = 41,
Migration: pallet_migration = 42,

Escrow: pallet_escrow = 50,
MythProxy: pallet_myth_proxy = 51,
Expand Down Expand Up @@ -921,7 +904,6 @@ mod benches {
[pallet_collator_selection, CollatorSelection]
[pallet_nfts, Nfts]
[pallet_marketplace, Marketplace]
[pallet_migration, Migration]
[pallet_proxy, Proxy]
[pallet_escrow, Escrow]
[pallet_vesting, Vesting]
Expand Down Expand Up @@ -1082,12 +1064,6 @@ impl_runtime_apis! {
}
}

impl pallet_migration::MigrationApi<Block, AccountId> for Runtime {
fn pot_account_id() -> AccountId {
Migration::pot_account_id()
}
}

impl cumulus_primitives_aura::AuraUnincludedSegmentApi<Block> for Runtime {
fn can_build_upon(
included_hash: <Block as BlockT>::Hash,
Expand Down
1 change: 0 additions & 1 deletion runtime/testnet/src/weights/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ pub mod pallet_collective;
pub mod pallet_escrow;
pub mod pallet_marketplace;
pub mod pallet_message_queue;
pub mod pallet_migration;
pub mod pallet_multibatching;
pub mod pallet_multisig;
pub mod pallet_myth_proxy;
Expand Down
144 changes: 0 additions & 144 deletions runtime/testnet/src/weights/pallet_migration.rs

This file was deleted.

0 comments on commit c0b7278

Please sign in to comment.