1234567891011121314151617use frame_support::{parameter_types, PalletId};18use sp_arithmetic::Perbill;19use up_common::{20 constants::{DAYS, RELAY_DAYS, UNIQUE},21 types::Balance,22};2324use crate::{25 runtime_common::config::pallets::{RelayChainBlockNumberProvider, TreasuryAccountId},26 Balances, BlockNumber, EvmContractHelpers, Maintenance, Runtime, RuntimeEvent, Unique,27};2829parameter_types! {30 pub const AppPromotionId: PalletId = PalletId(*b"appstake");31 pub const RecalculationInterval: BlockNumber = RELAY_DAYS;32 pub const PendingInterval: BlockNumber = 7 * DAYS;33 pub const Nominal: Balance = UNIQUE;34 pub const HoldAndFreezeIdentifier: [u8; 16] = *b"appstakeappstake";35 pub IntervalIncome: Perbill = Perbill::from_rational(5u32, 10_000);36 pub MaintenanceMode: bool = Maintenance::is_enabled();37}3839impl pallet_app_promotion::Config for Runtime {40 type PalletId = AppPromotionId;41 type CollectionHandler = Unique;42 type ContractHandler = EvmContractHelpers;43 type Currency = Balances;44 type WeightInfo = pallet_app_promotion::weights::SubstrateWeight<Self>;45 type TreasuryAccountId = TreasuryAccountId;46 type RelayBlockNumberProvider = RelayChainBlockNumberProvider<Runtime>;47 type RecalculationInterval = RecalculationInterval;48 type PendingInterval = PendingInterval;49 type Nominal = Nominal;50 type IntervalIncome = IntervalIncome;51 type RuntimeEvent = RuntimeEvent;52 type FreezeIdentifier = HoldAndFreezeIdentifier;53 type IsMaintenanceModeEnabled = MaintenanceMode;54}