From 4ec9caa8a3074cf83e3fa3057dabf8321cb47504 Mon Sep 17 00:00:00 2001 From: Bryan Chen Date: Tue, 3 Sep 2024 11:45:01 +1200 Subject: [PATCH] allow signed migration --- runtime/karura/src/lib.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/runtime/karura/src/lib.rs b/runtime/karura/src/lib.rs index 80604e211..ff56511ef 100644 --- a/runtime/karura/src/lib.rs +++ b/runtime/karura/src/lib.rs @@ -1837,6 +1837,10 @@ impl orml_parameters::Config for Runtime { type WeightInfo = (); } +frame_support::ord_parameter_types! { + pub const MigController: AccountId = AccountId::from(hex_literal::hex!("ec68c9ec1f6233f3d8169e06e2c94df703c45c05eef923169bf2703b08797315")); +} + parameter_types! { // The deposit configuration for the singed migration. Specially if you want to allow any signed account to do the migration (see `SignedFilter`, these deposits should be high) pub MigrationSignedDepositPerItem: Balance = dollar(KAR); @@ -1848,7 +1852,7 @@ impl pallet_state_trie_migration::Config for Runtime { // An origin that can control the whole pallet: should be Root, or a part of your council. type ControlOrigin = EnsureRootOrTwoThirdsTechnicalCommittee; // specific account for the migration, can trigger the signed migrations. - type SignedFilter = frame_support::traits::NeverEnsureOrigin; + type SignedFilter = frame_system::EnsureSignedBy; type RuntimeEvent = RuntimeEvent; type Currency = Balances; type RuntimeHoldReason = RuntimeHoldReason;