1234567891011121314151617use frame_support::{parameter_types, PalletId};18use up_common::{19 constants::{DAYS, RELAY_DAYS, UNIQUE},20 types::Balance,21};2223use super::AppPromotionDailyRate;24use 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 MaintenanceMode: bool = Maintenance::is_enabled();36}3738impl pallet_app_promotion::Config for Runtime {39 type PalletId = AppPromotionId;40 type CollectionHandler = Unique;41 type ContractHandler = EvmContractHelpers;42 type Currency = Balances;43 type WeightInfo = pallet_app_promotion::weights::SubstrateWeight<Self>;44 type TreasuryAccountId = TreasuryAccountId;45 type RelayBlockNumberProvider = RelayChainBlockNumberProvider<Runtime>;46 type RecalculationInterval = RecalculationInterval;47 type PendingInterval = PendingInterval;48 type Nominal = Nominal;49 type IntervalIncome = AppPromotionDailyRate;50 type RuntimeEvent = RuntimeEvent;51 type FreezeIdentifier = HoldAndFreezeIdentifier;52 type IsMaintenanceModeEnabled = MaintenanceMode;53}