Skip to content

Commit

Permalink
allow signed migration (#2803)
Browse files Browse the repository at this point in the history
  • Loading branch information
xlc committed Sep 3, 2024
1 parent 4c725dd commit 536bed6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion runtime/karura/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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<AccountId>;
type SignedFilter = frame_system::EnsureSignedBy<MigController, AccountId>;
type RuntimeEvent = RuntimeEvent;
type Currency = Balances;
type RuntimeHoldReason = RuntimeHoldReason;
Expand Down

0 comments on commit 536bed6

Please sign in to comment.