mirror of
https://git.ghostchain.io/proxmio/ghost-node.git
synced 2025-12-27 11:19:57 +00:00
rustfmt casper runtime and fix typos
Signed-off-by: Uncle Stretch <uncle.stretch@ghostchain.io>
This commit is contained in:
@@ -2,25 +2,34 @@ use super::*;
|
||||
use frame_support::{
|
||||
parameter_types,
|
||||
traits::{
|
||||
EitherOf, EitherOfDiverse, MapSuccess, OriginTrait, TryWithMorphedArg,
|
||||
tokens::pay::PayFromAccount,
|
||||
tokens::pay::PayFromAccount, EitherOf, EitherOfDiverse, MapSuccess, OriginTrait,
|
||||
TryWithMorphedArg,
|
||||
},
|
||||
};
|
||||
use frame_system::EnsureRootWithSuccess;
|
||||
use pallet_ranked_collective::EnsureOfRank;
|
||||
use sp_core::{ConstU128, ConstU32};
|
||||
use sp_runtime::traits::{ConstU16, TakeFirst};
|
||||
use pallet_ranked_collective::EnsureOfRank;
|
||||
|
||||
use crate::{
|
||||
// weights,
|
||||
RuntimeCall, RuntimeEvent, Scheduler, DAYS, CSPR, AccountId, Balance,
|
||||
TreasuryAccount, Balances, Preimage, Runtime,
|
||||
AccountId,
|
||||
Balance,
|
||||
Balances,
|
||||
Preimage,
|
||||
Runtime,
|
||||
// weights,
|
||||
RuntimeCall,
|
||||
RuntimeEvent,
|
||||
Scheduler,
|
||||
TreasuryAccount,
|
||||
CSPR,
|
||||
DAYS,
|
||||
};
|
||||
|
||||
mod origins;
|
||||
pub use origins::{
|
||||
pallet_cult_origins, Geniuses, Degens, Zombies, Skeletons, Ghosts,
|
||||
EnsureCanRetainAt, EnsureCanPromoteTo, EnsureCult, ToVoice, CultTreasurySpender,
|
||||
pallet_cult_origins, CultTreasurySpender, Degens, EnsureCanPromoteTo, EnsureCanRetainAt,
|
||||
EnsureCult, Geniuses, Ghosts, Skeletons, ToVoice, Zombies,
|
||||
};
|
||||
|
||||
mod tracks;
|
||||
@@ -45,14 +54,10 @@ parameter_types! {
|
||||
impl pallet_whitelist::Config for Runtime {
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type WhitelistOrigin = EitherOfDiverse<
|
||||
EnsureRootWithSuccess<Self::AccountId, ConstU16<65535>>,
|
||||
Skeletons,
|
||||
>;
|
||||
type DispatchWhitelistedOrigin = EitherOf<
|
||||
EnsureRootWithSuccess<Self::AccountId, ConstU16<65535>>,
|
||||
Geniuses,
|
||||
>;
|
||||
type WhitelistOrigin =
|
||||
EitherOfDiverse<EnsureRootWithSuccess<Self::AccountId, ConstU16<65535>>, Skeletons>;
|
||||
type DispatchWhitelistedOrigin =
|
||||
EitherOf<EnsureRootWithSuccess<Self::AccountId, ConstU16<65535>>, Geniuses>;
|
||||
type Preimages = Preimage;
|
||||
type WeightInfo = weights::pallet_whitelist::WeightInfo<Runtime>;
|
||||
}
|
||||
@@ -71,7 +76,7 @@ impl pallet_referenda::Config<CultReferendaInstance> for Runtime {
|
||||
type Scheduler = Scheduler;
|
||||
type Currency = Balances;
|
||||
type SubmitOrigin = EitherOf<
|
||||
pallet_ranked_collective::EnsureMember<Runtime, CultCollectiveInstance, 3>,
|
||||
pallet_ranked_collective::EnsureMember<Runtime, CultCollectiveInstance, 3>,
|
||||
MapSuccess<
|
||||
TryWithMorphedArg<
|
||||
RuntimeOrigin,
|
||||
@@ -81,7 +86,7 @@ impl pallet_referenda::Config<CultReferendaInstance> for Runtime {
|
||||
(AccountId, u16),
|
||||
>,
|
||||
TakeFirst,
|
||||
>
|
||||
>,
|
||||
>;
|
||||
type CancelOrigin = Skeletons;
|
||||
type KillOrigin = Ghosts;
|
||||
@@ -100,7 +105,7 @@ pub type CultCollectiveInstance = pallet_ranked_collective::Instance1;
|
||||
impl pallet_ranked_collective::Config<CultCollectiveInstance> for Runtime {
|
||||
type WeightInfo = weights::pallet_ranked_collective::WeightInfo<Runtime>;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
|
||||
|
||||
#[cfg(not(feature = "runtime-benchmarks"))]
|
||||
type PromoteOrigin = frame_system::EnsureNever<pallet_ranked_collective::Rank>;
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
@@ -123,7 +128,7 @@ impl pallet_ranked_collective::Config<CultCollectiveInstance> for Runtime {
|
||||
type MinRankOfClass = tracks::MinRankOfClass;
|
||||
type MemberSwappedHandler = (crate::CultCore, crate::CultSalary);
|
||||
type VoteWeight = pallet_ranked_collective::Geometric;
|
||||
|
||||
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
type BenchmarkSetup = (crate::CultCore, crate::CultSalary);
|
||||
}
|
||||
@@ -135,10 +140,13 @@ impl pallet_core_fellowship::Config<CultCoreInstance> for Runtime {
|
||||
type Members = pallet_ranked_collective::Pallet<Runtime, CultCollectiveInstance>;
|
||||
type Balance = Balance;
|
||||
|
||||
type ParamsOrigin = EitherOf<EnsureRootWithSuccess<Self::AccountId, ConstU16<65535>>, Skeletons>;
|
||||
type ParamsOrigin =
|
||||
EitherOf<EnsureRootWithSuccess<Self::AccountId, ConstU16<65535>>, Skeletons>;
|
||||
type InductOrigin = EitherOf<EnsureRootWithSuccess<Self::AccountId, ConstU16<65535>>, Zombies>;
|
||||
type ApproveOrigin = EitherOf<EnsureRootWithSuccess<Self::AccountId, ConstU16<65535>>, EnsureCanRetainAt>;
|
||||
type PromoteOrigin = EitherOf<EnsureRootWithSuccess<Self::AccountId, ConstU16<65535>>, EnsureCanPromoteTo>;
|
||||
type ApproveOrigin =
|
||||
EitherOf<EnsureRootWithSuccess<Self::AccountId, ConstU16<65535>>, EnsureCanRetainAt>;
|
||||
type PromoteOrigin =
|
||||
EitherOf<EnsureRootWithSuccess<Self::AccountId, ConstU16<65535>>, EnsureCanPromoteTo>;
|
||||
|
||||
type EvidenceSize = ConstU32<65536>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user