use crate::*;
use common_runtime::constants::*;
use common_runtime::{Balance, BlockNumber};
use frame_support::parameter_types;
use frame_support::traits::EitherOfDiverse;
use frame_support::weights::constants::WEIGHT_REF_TIME_PER_SECOND;
use sp_arithmetic::Perbill;
use sp_runtime::transaction_validity::TransactionPriority;
parameter_types! {
pub const BlockHashCount: BlockNumber = 2400;
pub BlockWeights: frame_system::limits::BlockWeights = block_weights((Weight::from_parts(WEIGHT_REF_TIME_PER_SECOND, 0) * 2)
.set_proof_size(5 * 1024 * 1024), NORMAL_DISPATCH_RATIO);
pub BlockLength: frame_system::limits::BlockLength = frame_system::limits::BlockLength
::max_with_normal_ratio(5 * 1024 * 1024, NORMAL_DISPATCH_RATIO);
pub const SS58Prefix: u16 = 42;
}
parameter_types! {
pub const MaxAuthorities: u32 = 32;
}
parameter_types! {
pub const UncleGenerations: u32 = 0;
}
parameter_types! {
pub const MinimumPeriod: u64 = SLOT_DURATION / 2;
}
parameter_types! {
pub const ExpectedBlockTime: u64 = MILLISECS_PER_BLOCK;
pub const ReportLongevity: u64 = 168 * HOURS as u64;
}
parameter_types! {
pub const ImOnlineUnsignedPriority: TransactionPriority = TransactionPriority::max_value();
pub const MaxPeerInHeartbeats: u32 = 10_000;
pub const MaxPeerDataEncodingSize: u32 = 1_000;
}
frame_support::parameter_types! {
pub const ExistentialDeposit: Balance = 100;
pub const MaxLocks: u32 = 50;
}
parameter_types! {
pub const SquareMoneyGrowthRate: Perbill = Perbill::from_parts(2_381_440);
}
frame_support::parameter_types! {
pub const ChangeOwnerKeyPeriod: BlockNumber = 7 * DAYS;
pub const AutorevocationPeriod: BlockNumber = YEARS;
}
frame_support::parameter_types! {
pub const SmithMembershipRenewalPeriod: BlockNumber = MONTHS;
}
parameter_types! {
pub const MaxSignatories: u16 = 10;
}
pub type TreasuryApproveOrigin = EitherOfDiverse<
EnsureRoot<AccountId>,
pallet_collective::EnsureProportionMoreThan<AccountId, TechnicalCommitteeInstance, 1, 2>,
>; pub type TreasuryRejectOrigin =
pallet_collective::EnsureProportionMoreThan<AccountId, TechnicalCommitteeInstance, 1, 3>;