Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust funding proposal parameters #5161

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1682,7 +1682,7 @@ parameter_types! {
// Make sure to stay below MAX_BLOCK_SIZE of substrate consensus of ~4MB
// The new compressed wasm format is much smaller in size ~ 1MB
pub const RuntimeUpgradeWasmProposalMaxLength: u32 = DispatchableCallCodeMaxLen::get();
pub const FundingRequestProposalMaxTotalAmount: Balance = dollars!(10_000);
pub const FundingRequestProposalMaxTotalAmount: Balance = joy!(1_000_000);
pub const FundingRequestProposalMaxAccounts: u32 = 20;
pub const SetMaxValidatorCountProposalMaxValidators: u32 = 100;
}
Expand Down
4 changes: 2 additions & 2 deletions runtime/src/proposals_configuration/defaults.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! This module contains default "production" parameters configuration for the runtime codex proposals.

use crate::{
currency, days, dollars, hours, Balance, BlockNumber, CouncilSize, ExpectedBlockTime,
currency, days, dollars, hours, joy, Balance, BlockNumber, CouncilSize, ExpectedBlockTime,
ProposalParameters,
};
use static_assertions::const_assert;
Expand Down Expand Up @@ -65,7 +65,7 @@ pub(crate) fn funding_request_proposal() -> ProposalParameters<BlockNumber, Bala
approval_threshold_percentage: TWO_OUT_OF_THREE,
slashing_quorum_percentage: ALL,
slashing_threshold_percentage: ALL,
required_stake: Some(dollars!(10)),
required_stake: Some(joy!(3500)),
constitutionality: 1,
}
}
Expand Down
7 changes: 7 additions & 0 deletions runtime/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,3 +192,10 @@ macro_rules! monthly_dollars_to_per_block {
dollars!($a).saturating_div(Balance::from(days!(30)))
}};
}

#[macro_export]
macro_rules! joy {
($a: expr) => {
currency::BASE_UNIT_PER_JOY.saturating_mul($a).into()
};
}
Loading