difftreelog
feat(app-promo) added `FreezeIdentifier` to runtime impl
in: master
Added `MaxFreezes` to `pallet_balances::Config`
3 files changed
pallets/app-promotion/src/lib.rsdiffbeforeafterboth--- a/pallets/app-promotion/src/lib.rs
+++ b/pallets/app-promotion/src/lib.rs
@@ -826,7 +826,11 @@
/// Migrates lock state into freeze one
///
- /// # Arguments
+ /// # Permissions
+ ///
+ /// * Sudo
+ ///
+ /// # Arguments
///
/// * `origin`: Must be `Signed`.
/// * `stakers`: Accounts to be upgraded.
@@ -836,7 +840,7 @@
origin: OriginFor<T>,
stakers: Vec<T::AccountId>,
) -> DispatchResult {
- ensure_signed(origin)?;
+ ensure_root(origin)?;
stakers
.into_iter()
runtime/common/config/pallets/app_promotion.rsdiffbeforeafterboth31 pub const RecalculationInterval: BlockNumber = RELAY_DAYS;31 pub const RecalculationInterval: BlockNumber = RELAY_DAYS;32 pub const PendingInterval: BlockNumber = 7 * DAYS;32 pub const PendingInterval: BlockNumber = 7 * DAYS;33 pub const Nominal: Balance = UNIQUE;33 pub const Nominal: Balance = UNIQUE;34 pub const HoldAndFreezeIdentifier: [u8; 16] = *b"appstakeappstake";34 pub IntervalIncome: Perbill = Perbill::from_rational(5u32, 10_000);35 pub IntervalIncome: Perbill = Perbill::from_rational(5u32, 10_000);35}36}363747 type Nominal = Nominal;48 type Nominal = Nominal;48 type IntervalIncome = IntervalIncome;49 type IntervalIncome = IntervalIncome;49 type RuntimeEvent = RuntimeEvent;50 type RuntimeEvent = RuntimeEvent;51 type FreezeIdentifier = HoldAndFreezeIdentifier;50}52}5153runtime/common/config/substrate.rsdiffbeforeafterboth--- a/runtime/common/config/substrate.rs
+++ b/runtime/common/config/substrate.rs
@@ -132,6 +132,7 @@
pub const ExistentialDeposit: u128 = EXISTENTIAL_DEPOSIT;
pub const MaxLocks: u32 = 50;
pub const MaxReserves: u32 = 50;
+ pub const MaxFreezes: u32 = 20;
}
impl pallet_balances::Config for Runtime {
@@ -150,7 +151,7 @@
type HoldIdentifier = [u8; 16];
type FreezeIdentifier = [u8; 16];
type MaxHolds = ();
- type MaxFreezes = ();
+ type MaxFreezes = MaxFreezes;
}
parameter_types! {