moonbase_runtime/
runtime_params.rs1use crate::{currency, Runtime};
20use frame_support::dynamic_params::{dynamic_pallet_params, dynamic_params};
21use moonbeam_runtime_common::expose_u128_get;
22use moonbeam_runtime_common::types::BoundedU128;
23use sp_runtime::Perbill;
24
25#[dynamic_params(RuntimeParameters, pallet_parameters::Parameters::<Runtime>)]
26pub mod dynamic_params {
27 use super::*;
28 #[dynamic_pallet_params]
29 #[codec(index = 0)]
30 pub mod runtime_config {
31 #[codec(index = 0)]
33 pub static FeesTreasuryProportion: Perbill = Perbill::from_percent(20);
34 }
35
36 #[dynamic_pallet_params]
37 #[codec(index = 1)]
38 pub mod pallet_randomness {
39 #[codec(index = 0)]
40 pub static Deposit: BoundedU128<
41 { 1 * currency::UNIT * currency::SUPPLY_FACTOR },
42 { 1_000 * currency::UNIT * currency::SUPPLY_FACTOR },
43 > = BoundedU128::const_new::<{ 1 * currency::UNIT * currency::SUPPLY_FACTOR }>();
44 }
45
46 #[dynamic_pallet_params]
47 #[codec(index = 2)]
48 pub mod xcm_config {
49 #[codec(index = 0)]
50 pub static ForeignAssetCreationDeposit: u128 = 100 * currency::UNIT;
51 }
52}
53
54expose_u128_get!(
55 PalletRandomnessDepositU128,
56 dynamic_params::pallet_randomness::Deposit
57);
58
59#[cfg(feature = "runtime-benchmarks")]
60impl Default for RuntimeParameters {
61 fn default() -> Self {
62 RuntimeParameters::RuntimeConfig(
63 dynamic_params::runtime_config::Parameters::FeesTreasuryProportion(
64 dynamic_params::runtime_config::FeesTreasuryProportion,
65 Some(Perbill::from_percent(20)),
66 ),
67 )
68 }
69}