1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
use sp_std::marker::PhantomData;
pub type GovernanceOrigin<AccountId, Runtime> = frame_system::EnsureOneOf<
AccountId,
pallet_committee::EnsureApprovedByCommittee<Runtime>,
frame_system::EnsureRoot<AccountId>,
>;
pub type CommitteeOrigin<Runtime> = pallet_committee::EnsureApprovedByCommittee<Runtime>;
pub struct VotingPeriodRange<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_committee::traits::VotingPeriodRange<T::BlockNumber> for VotingPeriodRange<T> {
fn max() -> T::BlockNumber {
(crate::constants::DAYS * 28).into()
}
fn min() -> T::BlockNumber {
(crate::constants::DAYS * 7).into()
}
}
pub struct LockupPeriodRange<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_asset_index::traits::LockupPeriodRange<T::BlockNumber> for LockupPeriodRange<T> {
fn min() -> T::BlockNumber {
crate::constants::DAYS.into()
}
fn max() -> T::BlockNumber {
(crate::constants::DAYS * 28).into()
}
}