mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 05:51:02 +00:00
v0.8.7 (#1222)
* Bump Substrate again. * update kusama runtmie for ensure origin * update polkadot runtime for ensure origin * fix imports * root only available for runtime benchmarks * Fix lock file * Bump Substrate * Update lock * Remove questionable feature-gating. Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
@@ -56,6 +56,7 @@ use frame_support::{
|
||||
traits::{KeyOwnerProofSystem, SplitTwoWays, Randomness, LockIdentifier, Filter, InstanceFilter},
|
||||
weights::Weight,
|
||||
};
|
||||
use system::{EnsureRoot, EnsureOneOf};
|
||||
use im_online::sr25519::AuthorityId as ImOnlineId;
|
||||
use authority_discovery_primitives::AuthorityId as AuthorityDiscoveryId;
|
||||
use transaction_payment_rpc_runtime_api::RuntimeDispatchInfo;
|
||||
@@ -109,6 +110,12 @@ impl Filter<Call> for BaseFilter {
|
||||
pub struct IsCallable;
|
||||
frame_support::impl_filter_stack!(IsCallable, BaseFilter, Call, is_callable);
|
||||
|
||||
type MoreThanHalfCouncil = EnsureOneOf<
|
||||
AccountId,
|
||||
EnsureRoot<AccountId>,
|
||||
collective::EnsureProportionMoreThan<_1, _2, AccountId, CouncilCollective>
|
||||
>;
|
||||
|
||||
parameter_types! {
|
||||
pub const Version: RuntimeVersion = VERSION;
|
||||
}
|
||||
@@ -293,6 +300,12 @@ parameter_types! {
|
||||
pub MinSolutionScoreBump: Perbill = Perbill::from_rational_approximation(5u32, 10_000);
|
||||
}
|
||||
|
||||
type SlashCancelOrigin = EnsureOneOf<
|
||||
AccountId,
|
||||
EnsureRoot<AccountId>,
|
||||
collective::EnsureProportionAtLeast<_1, _2, AccountId, CouncilCollective>
|
||||
>;
|
||||
|
||||
impl staking::Trait for Runtime {
|
||||
type Currency = Balances;
|
||||
type UnixTime = Timestamp;
|
||||
@@ -304,8 +317,8 @@ impl staking::Trait for Runtime {
|
||||
type SessionsPerEra = SessionsPerEra;
|
||||
type BondingDuration = BondingDuration;
|
||||
type SlashDeferDuration = SlashDeferDuration;
|
||||
// A majority of the council can cancel the slash.
|
||||
type SlashCancelOrigin = collective::EnsureProportionAtLeast<_1, _2, AccountId, CouncilCollective>;
|
||||
// A majority of the council or root can cancel the slash.
|
||||
type SlashCancelOrigin = SlashCancelOrigin;
|
||||
type SessionInterface = Self;
|
||||
type RewardCurve = RewardCurve;
|
||||
type MaxNominatorRewardedPerValidator = MaxNominatorRewardedPerValidator;
|
||||
@@ -423,11 +436,11 @@ impl collective::Trait<TechnicalCollective> for Runtime {
|
||||
|
||||
impl membership::Trait<membership::Instance1> for Runtime {
|
||||
type Event = Event;
|
||||
type AddOrigin = collective::EnsureProportionMoreThan<_1, _2, AccountId, CouncilCollective>;
|
||||
type RemoveOrigin = collective::EnsureProportionMoreThan<_1, _2, AccountId, CouncilCollective>;
|
||||
type SwapOrigin = collective::EnsureProportionMoreThan<_1, _2, AccountId, CouncilCollective>;
|
||||
type ResetOrigin = collective::EnsureProportionMoreThan<_1, _2, AccountId, CouncilCollective>;
|
||||
type PrimeOrigin = collective::EnsureProportionMoreThan<_1, _2, AccountId, CouncilCollective>;
|
||||
type AddOrigin = MoreThanHalfCouncil;
|
||||
type RemoveOrigin = MoreThanHalfCouncil;
|
||||
type SwapOrigin = MoreThanHalfCouncil;
|
||||
type ResetOrigin = MoreThanHalfCouncil;
|
||||
type PrimeOrigin = MoreThanHalfCouncil;
|
||||
type MembershipInitialized = TechnicalCommittee;
|
||||
type MembershipChanged = TechnicalCommittee;
|
||||
}
|
||||
@@ -445,10 +458,16 @@ parameter_types! {
|
||||
pub const TipReportDepositPerByte: Balance = 1 * CENTS;
|
||||
}
|
||||
|
||||
type ApproveOrigin = EnsureOneOf<
|
||||
AccountId,
|
||||
EnsureRoot<AccountId>,
|
||||
collective::EnsureProportionAtLeast<_3, _5, AccountId, CouncilCollective>
|
||||
>;
|
||||
|
||||
impl treasury::Trait for Runtime {
|
||||
type Currency = Balances;
|
||||
type ApproveOrigin = collective::EnsureProportionAtLeast<_3, _5, AccountId, CouncilCollective>;
|
||||
type RejectOrigin = collective::EnsureProportionMoreThan<_1, _2, AccountId, CouncilCollective>;
|
||||
type ApproveOrigin = ApproveOrigin;
|
||||
type RejectOrigin = MoreThanHalfCouncil;
|
||||
type Tippers = ElectionsPhragmen;
|
||||
type TipCountdown = TipCountdown;
|
||||
type TipFindersFee = TipFindersFee;
|
||||
@@ -687,8 +706,8 @@ impl identity::Trait for Runtime {
|
||||
type MaxSubAccounts = MaxSubAccounts;
|
||||
type MaxAdditionalFields = MaxAdditionalFields;
|
||||
type MaxRegistrars = MaxRegistrars;
|
||||
type RegistrarOrigin = collective::EnsureProportionMoreThan<_1, _2, AccountId, CouncilCollective>;
|
||||
type ForceOrigin = collective::EnsureProportionMoreThan<_1, _2, AccountId, CouncilCollective>;
|
||||
type RegistrarOrigin = MoreThanHalfCouncil;
|
||||
type ForceOrigin = MoreThanHalfCouncil;
|
||||
}
|
||||
|
||||
impl utility::Trait for Runtime {
|
||||
|
||||
Reference in New Issue
Block a user