Skip to content

Commit

Permalink
Fix voting ratios
Browse files Browse the repository at this point in the history
  • Loading branch information
maltekliemann committed Feb 22, 2023
1 parent eb29f32 commit 24db4c3
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions runtime/common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,22 +133,23 @@ macro_rules! decl_common_types {
EnsureProportionAtLeast<AccountId, TechnicalCommitteeInstance, 1, 1>,
>;

// More than 30%
// Advisory Committee vote proportions
// More than 33%
type EnsureRootOrMoreThanThirtyPercentAdvisoryCommittee = EitherOfDiverse<
EnsureRoot<AccountId>,
EnsureProportionMoreThan<AccountId, AdvisoryCommitteeInstance, 3, 10>,
EnsureProportionMoreThan<AccountId, AdvisoryCommitteeInstance, 1, 3>,
>;

// More than 50%
type EnsureRootOrMoreThanFiftyPercentAdvisoryCommittee = EitherOfDiverse<
type EnsureRootOrMoreThanHalfAdvisoryCommittee = EitherOfDiverse<
EnsureRoot<AccountId>,
EnsureProportionMoreThan<AccountId, AdvisoryCommitteeInstance, 1, 2>,
>;

// More than 70%
type EnsureRootOrMoreThanSeventyPercentAdvisoryCommittee = EitherOfDiverse<
// More than 66%
type EnsureRootOrMoreThanTwoThirdsAdvisoryCommittee = EitherOfDiverse<
EnsureRoot<AccountId>,
EnsureProportionMoreThan<AccountId, AdvisoryCommitteeInstance, 7, 10>,
EnsureProportionMoreThan<AccountId, AdvisoryCommitteeInstance, 2, 3>,
>;

// At least 66%
Expand Down Expand Up @@ -930,8 +931,7 @@ macro_rules! impl_config_traits {
impl parachain_info::Config for Runtime {}

impl zrml_authorized::Config for Runtime {
type AuthorizedDisputeResolutionOrigin =
EnsureRootOrMoreThanFiftyPercentAdvisoryCommittee;
type AuthorizedDisputeResolutionOrigin = EnsureRootOrMoreThanHalfAdvisoryCommittee;
type CorrectionPeriod = CorrectionPeriod;
type DisputeResolution = zrml_prediction_markets::Pallet<Runtime>;
type Event = Event;
Expand Down Expand Up @@ -1023,7 +1023,7 @@ macro_rules! impl_config_traits {
type OracleBond = OracleBond;
type OutsiderBond = OutsiderBond;
type PalletId = PmPalletId;
type RejectOrigin = EnsureRootOrMoreThanSeventyPercentAdvisoryCommittee;
type RejectOrigin = EnsureRootOrMoreThanTwoThirdsAdvisoryCommittee;
type RequestEditOrigin = EnsureRootOrMoreThanThirtyPercentAdvisoryCommittee;
type ResolveOrigin = EnsureRoot<AccountId>;
type AssetManager = AssetManager;
Expand Down

0 comments on commit 24db4c3

Please sign in to comment.