Skip to content

Commit

Permalink
fixup! fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-cholakov committed Jun 5, 2024
1 parent 77577c6 commit 1d4db66
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 11 deletions.
5 changes: 4 additions & 1 deletion runtime/avn/src/governance/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ parameter_types! {

impl pallet_custom_origins::Config for Runtime {}

pub type TreasurySpender = EitherOf<EnsureRootWithSuccess<AccountId, ConstU128<65535>>, Spender>;
pub const MAX_SPEND: u128 = u128::MAX;

pub type TreasurySpender =
EitherOf<EnsureRootWithSuccess<AccountId, ConstU128<MAX_SPEND>>, Spender>;

pub struct ToTreasury<R>(sp_std::marker::PhantomData<R>);
impl<R> OnUnbalanced<NegativeImbalance<R>> for ToTreasury<R>
Expand Down
18 changes: 9 additions & 9 deletions runtime/avn/src/governance/tracks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,9 @@ const TRACKS_DATA: [(u16, pallet_referenda::TrackInfo<Balance, BlockNumber>); 8]
name: "small_spender",
max_deciding: 50,
decision_deposit: 100 * 3 * AVT,
prepare_period: 10 * MINUTES,
decision_period: 20 * MINUTES,
confirm_period: 10 * MINUTES,
prepare_period: 2 * HOURS,
decision_period: 20 * DAYS,
confirm_period: 10 * HOURS,
min_enactment_period: 5 * MINUTES,
min_approval: APP_SMALL_SPENDER,
min_support: SUP_SMALL_SPENDER,
Expand All @@ -139,9 +139,9 @@ const TRACKS_DATA: [(u16, pallet_referenda::TrackInfo<Balance, BlockNumber>); 8]
name: "medium_spender",
max_deciding: 50,
decision_deposit: 200 * 3 * AVT,
prepare_period: 10 * MINUTES,
decision_period: 20 * MINUTES,
confirm_period: 12 * MINUTES,
prepare_period: 2 * HOURS,
decision_period: 20 * DAYS,
confirm_period: 12 * HOURS,
min_enactment_period: 5 * MINUTES,
min_approval: APP_MEDIUM_SPENDER,
min_support: SUP_MEDIUM_SPENDER,
Expand All @@ -153,9 +153,9 @@ const TRACKS_DATA: [(u16, pallet_referenda::TrackInfo<Balance, BlockNumber>); 8]
name: "big_spender",
max_deciding: 50,
decision_deposit: 400 * 3 * AVT,
prepare_period: 10 * MINUTES,
decision_period: 20 * MINUTES,
confirm_period: 14 * MINUTES,
prepare_period: 2 * HOURS,
decision_period: 20 * DAYS,
confirm_period: 14 * HOURS,
min_enactment_period: 5 * MINUTES,
min_approval: APP_BIG_SPENDER,
min_support: SUP_BIG_SPENDER,
Expand Down
7 changes: 6 additions & 1 deletion runtime/test/src/governance/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
use core::u128;

pub use super::*;

pub mod origins;
Expand Down Expand Up @@ -36,7 +38,10 @@ parameter_types! {

impl pallet_custom_origins::Config for Runtime {}

pub type TreasurySpender = EitherOf<EnsureRootWithSuccess<AccountId, ConstU128<65535>>, Spender>;
pub const MAX_SPEND: u128 = u128::MAX;

pub type TreasurySpender =
EitherOf<EnsureRootWithSuccess<AccountId, ConstU128<MAX_SPEND>>, Spender>;
pub struct ToTreasury<R>(sp_std::marker::PhantomData<R>);
impl<R> OnUnbalanced<NegativeImbalance<R>> for ToTreasury<R>
where
Expand Down

0 comments on commit 1d4db66

Please sign in to comment.