Переглянути джерело

Merge pull request #2526 from iorveth/olympia_missing_constants

Expose missing runtime constants
shamil-gadelshin 3 роки тому
батько
коміт
bdb0caba66

+ 8 - 0
runtime-modules/forum/src/lib.rs

@@ -554,6 +554,14 @@ decl_module! {
 
         fn deposit_event() = default;
 
+        /// Exports const
+
+        /// Deposit needed to create a post
+        const PostDeposit: BalanceOf<T> = T::PostDeposit::get();
+
+        /// Deposit needed to create a thread
+        const ThreadDeposit: BalanceOf<T> = T::ThreadDeposit::get();
+
         /// Enable a moderator can moderate a category and its sub categories.
         ///
         /// <weight>

+ 3 - 0
runtime-modules/membership/src/lib.rs

@@ -389,6 +389,9 @@ decl_module! {
         const DefaultInitialInvitationBalance: BalanceOf<T> =
             T::DefaultInitialInvitationBalance::get();
 
+        /// Exports const - Stake needed to candidate as staking account.
+        const CandidateStake: BalanceOf<T> = T::CandidateStake::get();
+
         /// Non-members can buy membership.
         ///
         /// <weight>

+ 17 - 3
runtime-modules/working-group/src/lib.rs

@@ -109,7 +109,7 @@ pub trait Trait<I: Instance = DefaultInstance>:
     /// Validates staking account ownership for a member.
     type StakingAccountValidator: common::StakingAccountValidator<Self>;
 
-    /// Validates member id and origin combination
+    /// Validates member id and origin combination.
     type MemberOriginValidator: MemberOriginValidator<Self::Origin, MemberId<Self>, Self::AccountId>;
 
     /// Defines min unstaking period in the group.
@@ -121,7 +121,7 @@ pub trait Trait<I: Instance = DefaultInstance>:
     /// Weight information for extrinsics in this pallet.
     type WeightInfo: WeightInfo;
 
-    /// Minimum stake required for applying into an opening
+    /// Minimum stake required for applying into an opening.
     type MinimumApplicationStake: Get<Self::Balance>;
 
     /// Stake needed to create an opening
@@ -339,9 +339,23 @@ decl_module! {
         /// Predefined errors
         type Error = Error<T, I>;
 
-        /// Exports const -  max simultaneous active worker number.
+        /// Exports const
+
+        /// Max simultaneous active worker number.
         const MaxWorkerNumberLimit: u32 = T::MaxWorkerNumberLimit::get();
 
+        /// Defines min unstaking period in the group.
+        const MinUnstakingPeriodLimit: T::BlockNumber = T::MinUnstakingPeriodLimit::get();
+
+        /// Minimum stake required for applying into an opening.
+        const MinimumApplicationStake: T::Balance = T::MinimumApplicationStake::get();
+
+        /// Stake needed to create an opening.
+        const LeaderOpeningStake: T::Balance = T::LeaderOpeningStake::get();
+
+        /// Defines the period every worker gets paid in blocks.
+        const RewardPeriod: u32 = T::RewardPeriod::get();
+
         /// # <weight>
         ///
         /// ## Weight