|
@@ -1,8 +1,8 @@
|
|
|
-use crate::{BalanceOfCurrency, Module, ProposalParameters};
|
|
|
+use crate::{BalanceOf, Module, ProposalParameters};
|
|
|
|
|
|
// Proposal parameters for the 'Set validator count' proposal
|
|
|
pub(crate) fn set_validator_count_proposal<T: crate::Trait>(
|
|
|
-) -> ProposalParameters<T::BlockNumber, BalanceOfCurrency<T>> {
|
|
|
+) -> ProposalParameters<T::BlockNumber, BalanceOf<T>> {
|
|
|
ProposalParameters {
|
|
|
voting_period: <Module<T>>::set_validator_count_proposal_voting_period(),
|
|
|
grace_period: <Module<T>>::set_validator_count_proposal_grace_period(),
|
|
@@ -10,13 +10,13 @@ pub(crate) fn set_validator_count_proposal<T: crate::Trait>(
|
|
|
approval_threshold_percentage: 80,
|
|
|
slashing_quorum_percentage: 60,
|
|
|
slashing_threshold_percentage: 80,
|
|
|
- required_stake: Some(<BalanceOfCurrency<T>>::from(100_000_u32)),
|
|
|
+ required_stake: Some(<BalanceOf<T>>::from(100_000_u32)),
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// Proposal parameters for the upgrade runtime proposal
|
|
|
pub(crate) fn runtime_upgrade_proposal<T: crate::Trait>(
|
|
|
-) -> ProposalParameters<T::BlockNumber, BalanceOfCurrency<T>> {
|
|
|
+) -> ProposalParameters<T::BlockNumber, BalanceOf<T>> {
|
|
|
ProposalParameters {
|
|
|
voting_period: <Module<T>>::runtime_upgrade_proposal_voting_period(),
|
|
|
grace_period: <Module<T>>::runtime_upgrade_proposal_grace_period(),
|
|
@@ -24,13 +24,12 @@ pub(crate) fn runtime_upgrade_proposal<T: crate::Trait>(
|
|
|
approval_threshold_percentage: 100,
|
|
|
slashing_quorum_percentage: 60,
|
|
|
slashing_threshold_percentage: 80,
|
|
|
- required_stake: Some(<BalanceOfCurrency<T>>::from(1_000_000_u32)),
|
|
|
+ required_stake: Some(<BalanceOf<T>>::from(1_000_000_u32)),
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// Proposal parameters for the text proposal
|
|
|
-pub(crate) fn text_proposal<T: crate::Trait>(
|
|
|
-) -> ProposalParameters<T::BlockNumber, BalanceOfCurrency<T>> {
|
|
|
+pub(crate) fn text_proposal<T: crate::Trait>() -> ProposalParameters<T::BlockNumber, BalanceOf<T>> {
|
|
|
ProposalParameters {
|
|
|
voting_period: <Module<T>>::text_proposal_voting_period(),
|
|
|
grace_period: <Module<T>>::text_proposal_grace_period(),
|
|
@@ -38,13 +37,13 @@ pub(crate) fn text_proposal<T: crate::Trait>(
|
|
|
approval_threshold_percentage: 80,
|
|
|
slashing_quorum_percentage: 60,
|
|
|
slashing_threshold_percentage: 80,
|
|
|
- required_stake: Some(<BalanceOfCurrency<T>>::from(25000u32)),
|
|
|
+ required_stake: Some(<BalanceOf<T>>::from(25000u32)),
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// Proposal parameters for the 'Spending' proposal
|
|
|
pub(crate) fn spending_proposal<T: crate::Trait>(
|
|
|
-) -> ProposalParameters<T::BlockNumber, BalanceOfCurrency<T>> {
|
|
|
+) -> ProposalParameters<T::BlockNumber, BalanceOf<T>> {
|
|
|
ProposalParameters {
|
|
|
voting_period: <Module<T>>::spending_proposal_voting_period(),
|
|
|
grace_period: <Module<T>>::spending_proposal_grace_period(),
|
|
@@ -52,13 +51,13 @@ pub(crate) fn spending_proposal<T: crate::Trait>(
|
|
|
approval_threshold_percentage: 80,
|
|
|
slashing_quorum_percentage: 60,
|
|
|
slashing_threshold_percentage: 80,
|
|
|
- required_stake: Some(<BalanceOfCurrency<T>>::from(25000u32)),
|
|
|
+ required_stake: Some(<BalanceOf<T>>::from(25000u32)),
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// Proposal parameters for the 'Add working group leader' proposal
|
|
|
pub(crate) fn add_working_group_leader_opening_proposal<T: crate::Trait>(
|
|
|
-) -> ProposalParameters<T::BlockNumber, BalanceOfCurrency<T>> {
|
|
|
+) -> ProposalParameters<T::BlockNumber, BalanceOf<T>> {
|
|
|
ProposalParameters {
|
|
|
voting_period: <Module<T>>::add_working_group_opening_proposal_voting_period(),
|
|
|
grace_period: <Module<T>>::add_working_group_opening_proposal_grace_period(),
|
|
@@ -66,13 +65,13 @@ pub(crate) fn add_working_group_leader_opening_proposal<T: crate::Trait>(
|
|
|
approval_threshold_percentage: 80,
|
|
|
slashing_quorum_percentage: 60,
|
|
|
slashing_threshold_percentage: 80,
|
|
|
- required_stake: Some(<BalanceOfCurrency<T>>::from(100_000_u32)),
|
|
|
+ required_stake: Some(<BalanceOf<T>>::from(100_000_u32)),
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// Proposal parameters for the 'Begin review working group leader applications' proposal
|
|
|
pub(crate) fn begin_review_working_group_leader_applications_proposal<T: crate::Trait>(
|
|
|
-) -> ProposalParameters<T::BlockNumber, BalanceOfCurrency<T>> {
|
|
|
+) -> ProposalParameters<T::BlockNumber, BalanceOf<T>> {
|
|
|
ProposalParameters {
|
|
|
voting_period:
|
|
|
<Module<T>>::begin_review_working_group_leader_applications_proposal_voting_period(),
|
|
@@ -82,13 +81,13 @@ pub(crate) fn begin_review_working_group_leader_applications_proposal<T: crate::
|
|
|
approval_threshold_percentage: 75,
|
|
|
slashing_quorum_percentage: 60,
|
|
|
slashing_threshold_percentage: 80,
|
|
|
- required_stake: Some(<BalanceOfCurrency<T>>::from(25000u32)),
|
|
|
+ required_stake: Some(<BalanceOf<T>>::from(25000u32)),
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// Proposal parameters for the 'Fill working group leader opening' proposal
|
|
|
pub(crate) fn fill_working_group_leader_opening_proposal<T: crate::Trait>(
|
|
|
-) -> ProposalParameters<T::BlockNumber, BalanceOfCurrency<T>> {
|
|
|
+) -> ProposalParameters<T::BlockNumber, BalanceOf<T>> {
|
|
|
ProposalParameters {
|
|
|
voting_period: <Module<T>>::fill_working_group_leader_opening_proposal_voting_period(),
|
|
|
grace_period: <Module<T>>::fill_working_group_leader_opening_proposal_grace_period(),
|
|
@@ -96,13 +95,13 @@ pub(crate) fn fill_working_group_leader_opening_proposal<T: crate::Trait>(
|
|
|
approval_threshold_percentage: 75,
|
|
|
slashing_quorum_percentage: 60,
|
|
|
slashing_threshold_percentage: 80,
|
|
|
- required_stake: Some(<BalanceOfCurrency<T>>::from(50000u32)),
|
|
|
+ required_stake: Some(<BalanceOf<T>>::from(50000u32)),
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// Proposal parameters for the 'Set working group mint capacity' proposal
|
|
|
pub(crate) fn set_working_group_mint_capacity_proposal<T: crate::Trait>(
|
|
|
-) -> ProposalParameters<T::BlockNumber, BalanceOfCurrency<T>> {
|
|
|
+) -> ProposalParameters<T::BlockNumber, BalanceOf<T>> {
|
|
|
ProposalParameters {
|
|
|
voting_period: <Module<T>>::set_working_group_mint_capacity_proposal_voting_period(),
|
|
|
grace_period: <Module<T>>::set_working_group_mint_capacity_proposal_grace_period(),
|
|
@@ -110,13 +109,13 @@ pub(crate) fn set_working_group_mint_capacity_proposal<T: crate::Trait>(
|
|
|
approval_threshold_percentage: 75,
|
|
|
slashing_quorum_percentage: 60,
|
|
|
slashing_threshold_percentage: 80,
|
|
|
- required_stake: Some(<BalanceOfCurrency<T>>::from(50000u32)),
|
|
|
+ required_stake: Some(<BalanceOf<T>>::from(50000u32)),
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// Proposal parameters for the 'Decrease working group leader stake' proposal
|
|
|
pub(crate) fn decrease_working_group_leader_stake_proposal<T: crate::Trait>(
|
|
|
-) -> ProposalParameters<T::BlockNumber, BalanceOfCurrency<T>> {
|
|
|
+) -> ProposalParameters<T::BlockNumber, BalanceOf<T>> {
|
|
|
ProposalParameters {
|
|
|
voting_period: <Module<T>>::decrease_working_group_leader_stake_proposal_voting_period(),
|
|
|
grace_period: <Module<T>>::decrease_working_group_leader_stake_proposal_grace_period(),
|
|
@@ -124,13 +123,13 @@ pub(crate) fn decrease_working_group_leader_stake_proposal<T: crate::Trait>(
|
|
|
approval_threshold_percentage: 75,
|
|
|
slashing_quorum_percentage: 60,
|
|
|
slashing_threshold_percentage: 80,
|
|
|
- required_stake: Some(<BalanceOfCurrency<T>>::from(50000u32)),
|
|
|
+ required_stake: Some(<BalanceOf<T>>::from(50000u32)),
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// Proposal parameters for the 'Slash working group leader stake' proposal
|
|
|
pub(crate) fn slash_working_group_leader_stake_proposal<T: crate::Trait>(
|
|
|
-) -> ProposalParameters<T::BlockNumber, BalanceOfCurrency<T>> {
|
|
|
+) -> ProposalParameters<T::BlockNumber, BalanceOf<T>> {
|
|
|
ProposalParameters {
|
|
|
voting_period: <Module<T>>::slash_working_group_leader_stake_proposal_voting_period(),
|
|
|
grace_period: <Module<T>>::slash_working_group_leader_stake_proposal_grace_period(),
|
|
@@ -138,13 +137,13 @@ pub(crate) fn slash_working_group_leader_stake_proposal<T: crate::Trait>(
|
|
|
approval_threshold_percentage: 75,
|
|
|
slashing_quorum_percentage: 60,
|
|
|
slashing_threshold_percentage: 80,
|
|
|
- required_stake: Some(<BalanceOfCurrency<T>>::from(50000u32)),
|
|
|
+ required_stake: Some(<BalanceOf<T>>::from(50000u32)),
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// Proposal parameters for the 'Set working group leader reward' proposal
|
|
|
pub(crate) fn set_working_group_leader_reward_proposal<T: crate::Trait>(
|
|
|
-) -> ProposalParameters<T::BlockNumber, BalanceOfCurrency<T>> {
|
|
|
+) -> ProposalParameters<T::BlockNumber, BalanceOf<T>> {
|
|
|
ProposalParameters {
|
|
|
voting_period: <Module<T>>::set_working_group_leader_reward_proposal_voting_period(),
|
|
|
grace_period: <Module<T>>::set_working_group_leader_reward_proposal_grace_period(),
|
|
@@ -152,13 +151,13 @@ pub(crate) fn set_working_group_leader_reward_proposal<T: crate::Trait>(
|
|
|
approval_threshold_percentage: 75,
|
|
|
slashing_quorum_percentage: 60,
|
|
|
slashing_threshold_percentage: 80,
|
|
|
- required_stake: Some(<BalanceOfCurrency<T>>::from(50000u32)),
|
|
|
+ required_stake: Some(<BalanceOf<T>>::from(50000u32)),
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// Proposal parameters for the 'Terminate working group leader role' proposal
|
|
|
pub(crate) fn terminate_working_group_leader_role_proposal<T: crate::Trait>(
|
|
|
-) -> ProposalParameters<T::BlockNumber, BalanceOfCurrency<T>> {
|
|
|
+) -> ProposalParameters<T::BlockNumber, BalanceOf<T>> {
|
|
|
ProposalParameters {
|
|
|
voting_period: <Module<T>>::terminate_working_group_leader_role_proposal_voting_period(),
|
|
|
grace_period: <Module<T>>::terminate_working_group_leader_role_proposal_grace_period(),
|
|
@@ -166,6 +165,6 @@ pub(crate) fn terminate_working_group_leader_role_proposal<T: crate::Trait>(
|
|
|
approval_threshold_percentage: 80,
|
|
|
slashing_quorum_percentage: 60,
|
|
|
slashing_threshold_percentage: 80,
|
|
|
- required_stake: Some(<BalanceOfCurrency<T>>::from(100_000_u32)),
|
|
|
+ required_stake: Some(<BalanceOf<T>>::from(100_000_u32)),
|
|
|
}
|
|
|
}
|