chore: regenerate umbrella crate, fix feature propagation
This commit is contained in:
@@ -40,15 +40,15 @@
|
||||
//! - Pre-existing members may call `import_member` on themselves (formerly `import`) to have their
|
||||
//! rank recognised and be inducted into this pezpallet (to gain a salary and allow for eventual
|
||||
//! promotion).
|
||||
//! - If, externally to this pezpallet, a member or candidate has their rank removed completely, then
|
||||
//! `offboard` may be called to remove them entirely from this pezpallet.
|
||||
//! - If, externally to this pezpallet, a member or candidate has their rank removed completely,
|
||||
//! then `offboard` may be called to remove them entirely from this pezpallet.
|
||||
//!
|
||||
//! Note there is a difference between having a rank of 0 (whereby the account is a *candidate*) and
|
||||
//! having no rank at all (whereby we consider it *unranked*). An account can be demoted from rank
|
||||
//! 0 to become unranked. This process is called being offboarded and there is an extrinsic to do
|
||||
//! this explicitly when external factors to this pezpallet have caused the tracked account to become
|
||||
//! unranked. At rank 0, there is not a "demotion" period after which the account may be bumped to
|
||||
//! become offboarded but rather an "offboard timeout".
|
||||
//! this explicitly when external factors to this pezpallet have caused the tracked account to
|
||||
//! become unranked. At rank 0, there is not a "demotion" period after which the account may be
|
||||
//! bumped to become offboarded but rather an "offboard timeout".
|
||||
//!
|
||||
//! Candidates may be introduced (i.e. an account to go from unranked to rank of 0) by an origin
|
||||
//! of a different privilege to that for promotion. This allows the possibility for even a single
|
||||
@@ -64,9 +64,9 @@ extern crate alloc;
|
||||
use alloc::boxed::Box;
|
||||
use codec::{Decode, DecodeWithMemTracking, Encode, MaxEncodedLen};
|
||||
use core::{fmt::Debug, marker::PhantomData};
|
||||
use scale_info::TypeInfo;
|
||||
use pezsp_arithmetic::traits::{Saturating, Zero};
|
||||
use pezsp_runtime::RuntimeDebug;
|
||||
use scale_info::TypeInfo;
|
||||
|
||||
use pezframe_support::{
|
||||
defensive,
|
||||
@@ -219,8 +219,9 @@ pub mod pezpallet {
|
||||
/// The origin which has permission update the parameters.
|
||||
type ParamsOrigin: EnsureOrigin<Self::RuntimeOrigin>;
|
||||
|
||||
/// The origin which has permission to move a candidate into being tracked in this pezpallet.
|
||||
/// Generally a very low-permission, such as a pre-existing member of rank 1 or above.
|
||||
/// The origin which has permission to move a candidate into being tracked in this
|
||||
/// pezpallet. Generally a very low-permission, such as a pre-existing member of rank 1 or
|
||||
/// above.
|
||||
///
|
||||
/// This allows the candidate to deposit evidence for their request to be promoted to a
|
||||
/// member.
|
||||
@@ -739,7 +740,9 @@ pub mod pezpallet {
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: Config<I>, I: 'static> GetSalary<RankOf<T, I>, T::AccountId, T::Balance> for Pezpallet<T, I> {
|
||||
impl<T: Config<I>, I: 'static> GetSalary<RankOf<T, I>, T::AccountId, T::Balance>
|
||||
for Pezpallet<T, I>
|
||||
{
|
||||
fn get_salary(rank: RankOf<T, I>, who: &T::AccountId) -> T::Balance {
|
||||
let index = match Self::rank_to_index(rank) {
|
||||
Some(i) => i,
|
||||
@@ -822,7 +825,8 @@ impl<T: Config<I>, I: 'static> RankedMembersSwapHandler<T::AccountId, u16> for P
|
||||
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
impl<T: Config<I>, I: 'static>
|
||||
pezpallet_ranked_collective::BenchmarkSetup<<T as pezframe_system::Config>::AccountId> for Pezpallet<T, I>
|
||||
pezpallet_ranked_collective::BenchmarkSetup<<T as pezframe_system::Config>::AccountId>
|
||||
for Pezpallet<T, I>
|
||||
{
|
||||
fn ensure_member(who: &<T as pezframe_system::Config>::AccountId) {
|
||||
#[allow(deprecated)]
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
|
||||
use pezframe_support::{
|
||||
assert_noop, assert_ok, derive_impl, hypothetically, hypothetically_ok, ord_parameter_types,
|
||||
pezpallet_prelude::Weight,
|
||||
parameter_types,
|
||||
pezpallet_prelude::Weight,
|
||||
traits::{ConstU16, EitherOf, IsInVec, MapSuccess, NoOpPoll, TryMapSuccess},
|
||||
};
|
||||
use pezframe_system::{pezpallet_prelude::BlockNumberFor, EnsureSignedBy};
|
||||
|
||||
@@ -23,13 +23,14 @@ use std::collections::BTreeMap;
|
||||
|
||||
use core::cell::RefCell;
|
||||
use pezframe_support::{
|
||||
assert_noop, assert_ok, derive_impl, hypothetically, ord_parameter_types,
|
||||
assert_noop, assert_ok, derive_impl, hypothetically, ord_parameter_types, parameter_types,
|
||||
pezpallet_prelude::Weight,
|
||||
parameter_types,
|
||||
traits::{tokens::GetSalary, ConstU16, ConstU32, IsInVec, TryMapSuccess},
|
||||
};
|
||||
use pezframe_system::EnsureSignedBy;
|
||||
use pezsp_runtime::{bounded_vec, traits::TryMorphInto, BuildStorage, DispatchError, DispatchResult};
|
||||
use pezsp_runtime::{
|
||||
bounded_vec, traits::TryMorphInto, BuildStorage, DispatchError, DispatchResult,
|
||||
};
|
||||
|
||||
use crate as pezpallet_core_fellowship;
|
||||
use crate::*;
|
||||
|
||||
Reference in New Issue
Block a user