diff --git a/Cargo.lock b/Cargo.lock index 43ee82d28d..9f5b1db076 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -172,6 +172,7 @@ dependencies = [ "orml-nft", "orml-oracle", "orml-oracle-rpc-runtime-api", + "orml-parameters", "orml-rewards", "orml-tokens", "orml-tokens-rpc-runtime-api", @@ -4955,6 +4956,7 @@ dependencies = [ "orml-nft", "orml-oracle", "orml-oracle-rpc-runtime-api", + "orml-parameters", "orml-rewards", "orml-tokens", "orml-tokens-rpc-runtime-api", @@ -5951,6 +5953,7 @@ dependencies = [ "orml-nft", "orml-oracle", "orml-oracle-rpc-runtime-api", + "orml-parameters", "orml-payments", "orml-rewards", "orml-tokens", @@ -7546,7 +7549,7 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "hex-literal 0.3.4", + "hex-literal 0.4.1", "log", "parity-scale-codec", "paste", @@ -7657,6 +7660,22 @@ dependencies = [ "sp-std", ] +[[package]] +name = "orml-parameters" +version = "0.4.1-dev" +dependencies = [ + "frame-support", + "frame-system", + "orml-traits", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", +] + [[package]] name = "orml-payments" version = "0.4.1-dev" @@ -7748,6 +7767,7 @@ dependencies = [ "num-traits", "orml-utilities", "parity-scale-codec", + "paste", "scale-info", "serde", "sp-core", @@ -7763,7 +7783,7 @@ version = "0.4.1-dev" dependencies = [ "frame-support", "frame-system", - "hex-literal 0.3.4", + "hex-literal 0.4.1", "orml-xcm-support", "parity-scale-codec", "scale-info", diff --git a/Cargo.toml b/Cargo.toml index 2f0275ea0a..ea8dc1425f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,6 +29,7 @@ members = [ "orml/nft", "orml/oracle", "orml/oracle/rpc", + "orml/parameters", "orml/rewards", "orml/tokens", "orml/tokens/rpc", diff --git a/modules/earning/src/lib.rs b/modules/earning/src/lib.rs index 062699988f..0d172d569c 100644 --- a/modules/earning/src/lib.rs +++ b/modules/earning/src/lib.rs @@ -26,7 +26,7 @@ use frame_support::{ traits::{Currency, ExistenceRequirement, LockIdentifier, LockableCurrency, OnUnbalanced, WithdrawReasons}, }; use frame_system::pallet_prelude::*; -use orml_traits::Happened; +use orml_traits::{define_parameters, parameters::ParameterStore, Happened}; use primitives::{ bonding::{self, BondingController}, Balance, @@ -41,6 +41,12 @@ pub mod weights; pub use weights::WeightInfo; +define_parameters! { + pub Parameters = { + InstantUnstakeFee: Permill = 0, + } +} + #[frame_support::pallet] pub mod module { use super::*; @@ -51,6 +57,8 @@ pub mod module { type Currency: LockableCurrency; + type ParameterStore: ParameterStore; + type OnBonded: Happened<(Self::AccountId, Balance)>; type OnUnbonded: Happened<(Self::AccountId, Balance)>; type OnUnstakeFee: OnUnbalanced>; @@ -60,8 +68,6 @@ pub mod module { #[pallet::constant] type UnbondingPeriod: Get>; #[pallet::constant] - type InstantUnstakeFee: Get>; - #[pallet::constant] type MaxUnbondingChunks: Get; #[pallet::constant] type LockIdentifier: Get; @@ -174,7 +180,7 @@ pub mod module { pub fn unbond_instant(origin: OriginFor, #[pallet::compact] amount: Balance) -> DispatchResult { let who = ensure_signed(origin)?; - let fee_ratio = T::InstantUnstakeFee::get().ok_or(Error::::NotAllowed)?; + let fee_ratio = T::ParameterStore::get(InstantUnstakeFee).ok_or(Error::::NotAllowed)?; let change = ::unbond_instant(&who, amount)?; diff --git a/modules/earning/src/mock.rs b/modules/earning/src/mock.rs index 7983f5b6cb..b4ac33f3f4 100644 --- a/modules/earning/src/mock.rs +++ b/modules/earning/src/mock.rs @@ -76,7 +76,6 @@ impl pallet_balances::Config for Runtime { } parameter_types! { - pub const InstantUnstakeFee: Option = Some(Permill::from_percent(10)); pub const EarningLockIdentifier: LockIdentifier = *b"12345678"; } @@ -92,15 +91,35 @@ impl OnUnbalanced> for OnUnstakeFee { } } +pub struct ParameterStoreImpl; +impl ParameterStore for ParameterStoreImpl { + fn get(key: K) -> Option + where + K: orml_traits::parameters::Key + + Into<::AggregratedKey>, + ::AggregratedValue: TryInto, + { + let key = key.into(); + match key { + ParametersKey::InstantUnstakeFee(_) => Some( + ParametersValue::InstantUnstakeFee(Permill::from_percent(10)) + .try_into() + .ok()? + .into(), + ), + } + } +} + impl Config for Runtime { type RuntimeEvent = RuntimeEvent; type Currency = Balances; + type ParameterStore = ParameterStoreImpl; type OnBonded = OnBonded; type OnUnbonded = OnUnbonded; type OnUnstakeFee = OnUnstakeFee; type MinBond = ConstU128<100>; type UnbondingPeriod = ConstU64<3>; - type InstantUnstakeFee = InstantUnstakeFee; type MaxUnbondingChunks = ConstU32<3>; type LockIdentifier = EarningLockIdentifier; type WeightInfo = (); diff --git a/orml b/orml index 22ae492498..5680303914 160000 --- a/orml +++ b/orml @@ -1 +1 @@ -Subproject commit 22ae49249854b058043665f6642ac4ecad5b78da +Subproject commit 56803039140d968f41a10431d5d6a66133dd200a diff --git a/runtime/acala/Cargo.toml b/runtime/acala/Cargo.toml index ef95ab91c9..6187c079c0 100644 --- a/runtime/acala/Cargo.toml +++ b/runtime/acala/Cargo.toml @@ -75,19 +75,20 @@ pallet-xcm = { git = "https://github.com/paritytech/polkadot", branch = "release orml-auction = { path = "../../orml/auction", default-features = false } orml-authority = { path = "../../orml/authority", default-features = false } orml-benchmarking = { path = "../../orml/benchmarking", default-features = false, optional = true } +orml-nft= { path = "../../orml/nft", default-features = false } orml-oracle = { path = "../../orml/oracle", default-features = false } orml-oracle-rpc-runtime-api = { path = "../../orml/oracle/rpc/runtime-api", default-features = false } +orml-parameters = { path = "../../orml/parameters", default-features = false } +orml-rewards = { path = "../../orml/rewards", default-features = false } orml-tokens = { path = "../../orml/tokens", default-features = false } orml-tokens-rpc-runtime-api = { path = "../../orml/tokens/rpc/runtime-api", default-features = false } orml-traits = { path = "../../orml/traits", default-features = false } -orml-vesting = { path = "../../orml/vesting", default-features = false } -orml-rewards = { path = "../../orml/rewards", default-features = false } -orml-nft= { path = "../../orml/nft", default-features = false } -orml-xtokens = { path = "../../orml/xtokens", default-features = false } -orml-xcm-support = { path = "../../orml/xcm-support", default-features = false } orml-unknown-tokens = { path = "../../orml/unknown-tokens", default-features = false } -orml-xcm = { path = "../../orml/xcm", default-features = false } orml-utilities = { path = "../../orml/utilities", default-features = false } +orml-vesting = { path = "../../orml/vesting", default-features = false } +orml-xcm = { path = "../../orml/xcm", default-features = false } +orml-xcm-support = { path = "../../orml/xcm-support", default-features = false } +orml-xtokens = { path = "../../orml/xtokens", default-features = false } # modules module-aggregated-dex = { path = "../../modules/aggregated-dex", default-features = false } @@ -212,16 +213,17 @@ std = [ "orml-nft/std", "orml-oracle-rpc-runtime-api/std", "orml-oracle/std", + "orml-parameters/std", "orml-rewards/std", "orml-tokens-rpc-runtime-api/std", "orml-tokens/std", "orml-traits/std", "orml-unknown-tokens/std", + "orml-utilities/std", "orml-vesting/std", "orml-xcm-support/std", "orml-xcm/std", "orml-xtokens/std", - "orml-utilities/std", "module-aggregated-dex/std", "module-asset-registry/std", @@ -292,6 +294,7 @@ runtime-benchmarks = [ "polkadot-runtime/runtime-benchmarks", "orml-authority/runtime-benchmarks", + "orml-parameters/runtime-benchmarks", "orml-tokens/runtime-benchmarks", "orml-vesting/runtime-benchmarks", "orml-xtokens/runtime-benchmarks", @@ -356,6 +359,7 @@ try-runtime = [ "orml-authority/try-runtime", "orml-nft/try-runtime", "orml-oracle/try-runtime", + "orml-parameters/try-runtime", "orml-rewards/try-runtime", "orml-tokens/try-runtime", "orml-unknown-tokens/try-runtime", diff --git a/runtime/acala/src/lib.rs b/runtime/acala/src/lib.rs index 1521911709..2625c191ec 100644 --- a/runtime/acala/src/lib.rs +++ b/runtime/acala/src/lib.rs @@ -60,7 +60,10 @@ use module_support::{AssetIdMapping, DispatchableTask, PoolId}; use module_transaction_payment::TargetedFeeAdjustment; use cumulus_pallet_parachain_system::RelaychainDataProvider; -use orml_traits::{create_median_value_data_provider, parameter_type_with_key, DataFeeder, DataProviderExtended}; +use orml_traits::{ + create_median_value_data_provider, define_aggregrated_parameters, parameter_type_with_key, + parameters::ParameterStoreAdapter, DataFeeder, DataProviderExtended, +}; use orml_utilities::simulate_execution; use pallet_transaction_payment::RuntimeDispatchInfo; @@ -1694,7 +1697,6 @@ impl module_liquid_crowdloan::Config for Runtime { } parameter_types! { - pub const InstantUnstakeFee: Option = None; pub MinBond: Balance = 100 * dollar(ACA); pub const UnbondingPeriod: BlockNumber = 28 * DAYS; pub const EarningLockIdentifier: LockIdentifier = *b"aca/earn"; @@ -1703,17 +1705,30 @@ parameter_types! { impl module_earning::Config for Runtime { type RuntimeEvent = RuntimeEvent; type Currency = Balances; + type ParameterStore = ParameterStoreAdapter; type OnBonded = module_incentives::OnEarningBonded; type OnUnbonded = module_incentives::OnEarningUnbonded; type OnUnstakeFee = Treasury; // fee goes to treasury type MinBond = MinBond; type UnbondingPeriod = UnbondingPeriod; - type InstantUnstakeFee = InstantUnstakeFee; type MaxUnbondingChunks = ConstU32<10>; type LockIdentifier = EarningLockIdentifier; type WeightInfo = (); } +define_aggregrated_parameters! { + pub RuntimeParameters = { + Earning: module_earning::Parameters = 0, + } +} + +impl orml_parameters::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type AggregratedKeyValue = RuntimeParameters; + type AdminOrigin = EnsureRootOrThreeFourthsGeneralCouncil; + type WeightInfo = (); +} + construct_runtime!( pub enum Runtime { // Core & Utility @@ -1782,6 +1797,7 @@ construct_runtime!( Auction: orml_auction = 80, Rewards: orml_rewards = 81, OrmlNFT: orml_nft exclude_parts { Call } = 82, + Parameters: orml_parameters = 83, // Acala Core Prices: module_prices = 90, diff --git a/runtime/karura/Cargo.toml b/runtime/karura/Cargo.toml index e693ba6160..18845b9230 100644 --- a/runtime/karura/Cargo.toml +++ b/runtime/karura/Cargo.toml @@ -75,19 +75,20 @@ pallet-xcm = { git = "https://github.com/paritytech/polkadot", branch = "release orml-auction = { path = "../../orml/auction", default-features = false } orml-authority = { path = "../../orml/authority", default-features = false } orml-benchmarking = { path = "../../orml/benchmarking", default-features = false, optional = true } +orml-nft= { path = "../../orml/nft", default-features = false } orml-oracle = { path = "../../orml/oracle", default-features = false } orml-oracle-rpc-runtime-api = { path = "../../orml/oracle/rpc/runtime-api", default-features = false } +orml-parameters = { path = "../../orml/parameters", default-features = false } +orml-rewards = { path = "../../orml/rewards", default-features = false } orml-tokens = { path = "../../orml/tokens", default-features = false } orml-tokens-rpc-runtime-api = { path = "../../orml/tokens/rpc/runtime-api", default-features = false } orml-traits = { path = "../../orml/traits", default-features = false } -orml-vesting = { path = "../../orml/vesting", default-features = false } -orml-rewards = { path = "../../orml/rewards", default-features = false } -orml-nft= { path = "../../orml/nft", default-features = false } -orml-xtokens = { path = "../../orml/xtokens", default-features = false } -orml-xcm-support = { path = "../../orml/xcm-support", default-features = false } orml-unknown-tokens = { path = "../../orml/unknown-tokens", default-features = false } -orml-xcm = { path = "../../orml/xcm", default-features = false } orml-utilities = { path = "../../orml/utilities", default-features = false } +orml-vesting = { path = "../../orml/vesting", default-features = false } +orml-xcm = { path = "../../orml/xcm", default-features = false } +orml-xcm-support = { path = "../../orml/xcm-support", default-features = false } +orml-xtokens = { path = "../../orml/xtokens", default-features = false } # modules module-aggregated-dex = { path = "../../modules/aggregated-dex", default-features = false } @@ -213,16 +214,17 @@ std = [ "orml-nft/std", "orml-oracle-rpc-runtime-api/std", "orml-oracle/std", + "orml-parameters/std", "orml-rewards/std", "orml-tokens-rpc-runtime-api/std", "orml-tokens/std", "orml-traits/std", "orml-unknown-tokens/std", + "orml-utilities/std", "orml-vesting/std", "orml-xcm-support/std", "orml-xcm/std", "orml-xtokens/std", - "orml-utilities/std", "module-aggregated-dex/std", "module-asset-registry/std", @@ -288,11 +290,12 @@ runtime-benchmarks = [ "cumulus-pallet-xcmp-queue/runtime-benchmarks", "pallet-xcm/runtime-benchmarks", "polkadot-parachain/runtime-benchmarks", + "polkadot-runtime/runtime-benchmarks", "xcm-builder/runtime-benchmarks", "xcm-executor/runtime-benchmarks", - "polkadot-runtime/runtime-benchmarks", "orml-authority/runtime-benchmarks", + "orml-parameters/runtime-benchmarks", "orml-tokens/runtime-benchmarks", "orml-vesting/runtime-benchmarks", "orml-xtokens/runtime-benchmarks", @@ -357,6 +360,7 @@ try-runtime = [ "orml-authority/try-runtime", "orml-nft/try-runtime", "orml-oracle/try-runtime", + "orml-parameters/try-runtime", "orml-rewards/try-runtime", "orml-tokens/try-runtime", "orml-unknown-tokens/try-runtime", diff --git a/runtime/karura/src/lib.rs b/runtime/karura/src/lib.rs index ef2c223696..b2f162e10f 100644 --- a/runtime/karura/src/lib.rs +++ b/runtime/karura/src/lib.rs @@ -61,7 +61,8 @@ use module_transaction_payment::TargetedFeeAdjustment; use cumulus_pallet_parachain_system::RelaychainDataProvider; use orml_traits::{ - create_median_value_data_provider, parameter_type_with_key, DataFeeder, DataProviderExtended, GetByKey, + create_median_value_data_provider, define_aggregrated_parameters, parameter_type_with_key, + parameters::ParameterStoreAdapter, DataFeeder, DataProviderExtended, GetByKey, }; use orml_utilities::simulate_execution; use pallet_transaction_payment::RuntimeDispatchInfo; @@ -1688,7 +1689,6 @@ impl nutsfinance_stable_asset::Config for Runtime { } parameter_types! { - pub const InstantUnstakeFee: Option = None; pub MinBond: Balance = 10 * dollar(KAR); pub const UnbondingPeriod: BlockNumber = 8 * DAYS; pub const EarningLockIdentifier: LockIdentifier = *b"aca/earn"; @@ -1697,17 +1697,30 @@ parameter_types! { impl module_earning::Config for Runtime { type RuntimeEvent = RuntimeEvent; type Currency = Balances; + type ParameterStore = ParameterStoreAdapter; type OnBonded = module_incentives::OnEarningBonded; type OnUnbonded = module_incentives::OnEarningUnbonded; type OnUnstakeFee = Treasury; // fee goes to treasury type MinBond = MinBond; type UnbondingPeriod = UnbondingPeriod; - type InstantUnstakeFee = InstantUnstakeFee; type MaxUnbondingChunks = ConstU32<10>; type LockIdentifier = EarningLockIdentifier; type WeightInfo = (); } +define_aggregrated_parameters! { + pub RuntimeParameters = { + Earning: module_earning::Parameters = 0, + } +} + +impl orml_parameters::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type AggregratedKeyValue = RuntimeParameters; + type AdminOrigin = EnsureRootOrThreeFourthsGeneralCouncil; + type WeightInfo = (); +} + construct_runtime!( pub enum Runtime { // Core & Utility @@ -1776,6 +1789,7 @@ construct_runtime!( Auction: orml_auction = 80, Rewards: orml_rewards = 81, OrmlNFT: orml_nft exclude_parts { Call } = 82, + Parameters: orml_parameters = 83, // Karura Core Prices: module_prices = 90, diff --git a/runtime/mandala/Cargo.toml b/runtime/mandala/Cargo.toml index eff089f914..35c0ec0f40 100644 --- a/runtime/mandala/Cargo.toml +++ b/runtime/mandala/Cargo.toml @@ -79,20 +79,21 @@ pallet-xcm = { git = "https://github.com/paritytech/polkadot", branch = "release orml-auction = { path = "../../orml/auction", default-features = false } orml-authority = { path = "../../orml/authority", default-features = false } orml-benchmarking = { path = "../../orml/benchmarking", default-features = false, optional = true } +orml-nft= { path = "../../orml/nft", default-features = false } orml-oracle = { path = "../../orml/oracle", default-features = false } orml-oracle-rpc-runtime-api = { path = "../../orml/oracle/rpc/runtime-api", default-features = false } +orml-parameters = { path = "../../orml/parameters", default-features = false } +orml-payments = { path = "../../orml/payments", default-features = false } +orml-rewards = { path = "../../orml/rewards", default-features = false } orml-tokens = { path = "../../orml/tokens", default-features = false } orml-tokens-rpc-runtime-api = { path = "../../orml/tokens/rpc/runtime-api", default-features = false } orml-traits = { path = "../../orml/traits", default-features = false } -orml-vesting = { path = "../../orml/vesting", default-features = false } -orml-rewards = { path = "../../orml/rewards", default-features = false } -orml-nft= { path = "../../orml/nft", default-features = false } -orml-xtokens = { path = "../../orml/xtokens", default-features = false } -orml-xcm-support = { path = "../../orml/xcm-support", default-features = false } orml-unknown-tokens = { path = "../../orml/unknown-tokens", default-features = false } -orml-xcm = { path = "../../orml/xcm", default-features = false } -orml-payments = { path = "../../orml/payments", default-features = false } orml-utilities = { path = "../../orml/utilities", default-features = false } +orml-vesting = { path = "../../orml/vesting", default-features = false } +orml-xcm = { path = "../../orml/xcm", default-features = false } +orml-xcm-support = { path = "../../orml/xcm-support", default-features = false } +orml-xtokens = { path = "../../orml/xtokens", default-features = false } # modules module-transaction-pause = { path = "../../modules/transaction-pause", default-features = false } @@ -227,17 +228,18 @@ std = [ "orml-nft/std", "orml-oracle-rpc-runtime-api/std", "orml-oracle/std", + "orml-parameters/std", "orml-payments/std", "orml-rewards/std", "orml-tokens-rpc-runtime-api/std", "orml-tokens/std", "orml-traits/std", "orml-unknown-tokens/std", + "orml-utilities/std", "orml-vesting/std", "orml-xcm-support/std", "orml-xcm/std", "orml-xtokens/std", - "orml-utilities/std", "module-aggregated-dex/std", "module-asset-registry/std", @@ -311,6 +313,7 @@ runtime-benchmarks = [ "acala-service/runtime-benchmarks", "orml-authority/runtime-benchmarks", + "orml-parameters/runtime-benchmarks", "orml-tokens/runtime-benchmarks", "orml-vesting/runtime-benchmarks", "orml-xtokens/runtime-benchmarks", @@ -383,6 +386,7 @@ try-runtime = [ "orml-authority/try-runtime", "orml-nft/try-runtime", "orml-oracle/try-runtime", + "orml-parameters/try-runtime", "orml-payments/try-runtime", "orml-rewards/try-runtime", "orml-tokens/try-runtime", diff --git a/runtime/mandala/src/benchmarking/earning.rs b/runtime/mandala/src/benchmarking/earning.rs index 03f769945f..88c09234dd 100644 --- a/runtime/mandala/src/benchmarking/earning.rs +++ b/runtime/mandala/src/benchmarking/earning.rs @@ -17,10 +17,14 @@ // along with this program. If not, see . use super::utils::{dollar, set_balance, NATIVE}; -use crate::{AccountId, DispatchResult, Earning, Get, NativeTokenExistentialDeposit, Runtime, RuntimeOrigin, System}; +use crate::{ + AccountId, DispatchResult, Earning, Get, NativeTokenExistentialDeposit, Parameters, Runtime, RuntimeOrigin, + RuntimeParameters, System, +}; use frame_benchmarking::whitelisted_caller; use frame_system::RawOrigin; use orml_benchmarking::runtime_benchmarks; +use sp_runtime::Permill; fn make_max_unbonding_chunk(who: AccountId) -> DispatchResult { System::set_block_number(0); @@ -46,6 +50,10 @@ runtime_benchmarks! { unbond_instant { let caller: AccountId = whitelisted_caller(); set_balance(NATIVE, &caller, dollar(NATIVE)); + Parameters::set_parameter( + RawOrigin::Root.into(), + RuntimeParameters::Earning(module_earning::Parameters::InstantUnstakeFee(module_earning::InstantUnstakeFee, Some(Permill::from_percent(10)))) + )?; Earning::bond(RuntimeOrigin::signed(caller.clone()), 2 * NativeTokenExistentialDeposit::get())?; }: _(RawOrigin::Signed(caller), NativeTokenExistentialDeposit::get()) diff --git a/runtime/mandala/src/lib.rs b/runtime/mandala/src/lib.rs index 6ff18e6932..80eaa39545 100644 --- a/runtime/mandala/src/lib.rs +++ b/runtime/mandala/src/lib.rs @@ -62,7 +62,8 @@ use scale_info::TypeInfo; use orml_tokens::CurrencyAdapter; use orml_traits::{ - create_median_value_data_provider, parameter_type_with_key, DataFeeder, DataProviderExtended, GetByKey, + create_median_value_data_provider, define_aggregrated_parameters, parameter_type_with_key, + parameters::ParameterStoreAdapter, DataFeeder, DataProviderExtended, GetByKey, }; use orml_utilities::simulate_execution; use pallet_transaction_payment::{FeeDetails, RuntimeDispatchInfo}; @@ -1301,19 +1302,15 @@ impl module_transaction_payment::Config for Runtime { type DefaultFeeTokens = DefaultFeeTokens; } -parameter_types! { - pub const InstantUnstakeFee: Permill = Permill::from_percent(10); -} - impl module_earning::Config for Runtime { type RuntimeEvent = RuntimeEvent; type Currency = Balances; + type ParameterStore = ParameterStoreAdapter; type OnBonded = module_incentives::OnEarningBonded; type OnUnbonded = module_incentives::OnEarningUnbonded; type OnUnstakeFee = Treasury; // fee goes to treasury type MinBond = ConstU128<100>; type UnbondingPeriod = ConstU32<3>; - type InstantUnstakeFee = InstantUnstakeFee; type MaxUnbondingChunks = ConstU32<3>; type LockIdentifier = EarningLockIdentifier; type WeightInfo = weights::module_earning::WeightInfo; @@ -1810,6 +1807,19 @@ impl module_liquid_crowdloan::Config for Runtime { type WeightInfo = weights::module_liquid_crowdloan::WeightInfo; } +define_aggregrated_parameters! { + pub RuntimeParameters = { + Earning: module_earning::Parameters = 0, + } +} + +impl orml_parameters::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type AggregratedKeyValue = RuntimeParameters; + type AdminOrigin = EnsureRootOrThreeFourthsGeneralCouncil; + type WeightInfo = (); +} + #[derive(Clone, Encode, Decode, PartialEq, Eq, RuntimeDebug)] pub struct ConvertEthereumTx; @@ -2020,6 +2030,7 @@ construct_runtime!( Auction: orml_auction = 100, Rewards: orml_rewards = 101, OrmlNFT: orml_nft exclude_parts { Call } = 102, + Parameters: orml_parameters = 103, // Acala Core Prices: module_prices = 110,