Type Alias kitchensink_runtime::CoreFellowship
source · pub type CoreFellowship = Pallet<Runtime>;
Aliased Type§
struct CoreFellowship(/* private fields */);
Implementations
source§impl<T, I> Pallet<T, I>where
T: Config<I>,
I: 'static,
impl<T, I> Pallet<T, I>where
T: Config<I>,
I: 'static,
sourcepub fn bump(
origin: <T as Config>::RuntimeOrigin,
who: <T as Config>::AccountId,
) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
pub fn bump( origin: <T as Config>::RuntimeOrigin, who: <T as Config>::AccountId, ) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
Bump the state of a member.
This will demote a member whose last_proof
is now beyond their rank’s
demotion_period
.
origin
: ASigned
origin of an account.who
: A member account whose state is to be updated.
sourcepub fn set_params(
origin: <T as Config>::RuntimeOrigin,
params: Box<ParamsType<<T as Config<I>>::Balance, <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number, <T as Config<I>>::MaxRank>>,
) -> Result<(), DispatchError>
pub fn set_params( origin: <T as Config>::RuntimeOrigin, params: Box<ParamsType<<T as Config<I>>::Balance, <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number, <T as Config<I>>::MaxRank>>, ) -> Result<(), DispatchError>
Set the parameters.
origin
: An origin complying withParamsOrigin
or root.params
: The new parameters for the pallet.
sourcepub fn set_active(
origin: <T as Config>::RuntimeOrigin,
is_active: bool,
) -> Result<(), DispatchError>
pub fn set_active( origin: <T as Config>::RuntimeOrigin, is_active: bool, ) -> Result<(), DispatchError>
Set whether a member is active or not.
origin
: ASigned
origin of a member’s account.is_active
:true
iff the member is active.
sourcepub fn approve(
origin: <T as Config>::RuntimeOrigin,
who: <T as Config>::AccountId,
at_rank: <<T as Config<I>>::Members as RankedMembers>::Rank,
) -> Result<(), DispatchError>
pub fn approve( origin: <T as Config>::RuntimeOrigin, who: <T as Config>::AccountId, at_rank: <<T as Config<I>>::Members as RankedMembers>::Rank, ) -> Result<(), DispatchError>
Approve a member to continue at their rank.
This resets last_proof
to the current block, thereby delaying any automatic demotion.
who
must already be tracked by this pallet for this to have an effect.
origin
: An origin which satisfiesApproveOrigin
or root.who
: A member (i.e. of non-zero rank).at_rank
: The rank of member.
sourcepub fn induct(
origin: <T as Config>::RuntimeOrigin,
who: <T as Config>::AccountId,
) -> Result<(), DispatchError>
pub fn induct( origin: <T as Config>::RuntimeOrigin, who: <T as Config>::AccountId, ) -> Result<(), DispatchError>
Introduce a new and unranked candidate (rank zero).
origin
: An origin which satisfiesInductOrigin
or root.who
: The account ID of the candidate to be inducted and become a member.
sourcepub fn promote(
origin: <T as Config>::RuntimeOrigin,
who: <T as Config>::AccountId,
to_rank: <<T as Config<I>>::Members as RankedMembers>::Rank,
) -> Result<(), DispatchError>
pub fn promote( origin: <T as Config>::RuntimeOrigin, who: <T as Config>::AccountId, to_rank: <<T as Config<I>>::Members as RankedMembers>::Rank, ) -> Result<(), DispatchError>
Increment the rank of a ranked and tracked account.
origin
: An origin which satisfiesPromoteOrigin
with aSuccess
result ofto_rank
or more or root.who
: The account ID of the member to be promoted toto_rank
.to_rank
: One more than the current rank ofwho
.
sourcepub fn promote_fast(
origin: <T as Config>::RuntimeOrigin,
who: <T as Config>::AccountId,
to_rank: <<T as Config<I>>::Members as RankedMembers>::Rank,
) -> Result<(), DispatchError>
pub fn promote_fast( origin: <T as Config>::RuntimeOrigin, who: <T as Config>::AccountId, to_rank: <<T as Config<I>>::Members as RankedMembers>::Rank, ) -> Result<(), DispatchError>
Fast promotions can skip ranks and ignore the min_promotion_period
.
This is useful for out-of-band promotions, hence it has its own FastPromoteOrigin
to
be (possibly) more restrictive than PromoteOrigin
. Note that the member must already
be inducted.
sourcepub fn offboard(
origin: <T as Config>::RuntimeOrigin,
who: <T as Config>::AccountId,
) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
pub fn offboard( origin: <T as Config>::RuntimeOrigin, who: <T as Config>::AccountId, ) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
Stop tracking a prior member who is now not a ranked member of the collective.
origin
: ASigned
origin of an account.who
: The ID of an account which was tracked in this pallet but which is now not a ranked member of the collective.
sourcepub fn submit_evidence(
origin: <T as Config>::RuntimeOrigin,
wish: Wish,
evidence: BoundedVec<u8, <T as Config<I>>::EvidenceSize>,
) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
pub fn submit_evidence( origin: <T as Config>::RuntimeOrigin, wish: Wish, evidence: BoundedVec<u8, <T as Config<I>>::EvidenceSize>, ) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
Provide evidence that a rank is deserved.
This is free as long as no evidence for the forthcoming judgement is already submitted. Evidence is cleared after an outcome (either demotion, promotion of approval).
origin
: ASigned
origin of an inducted and ranked account.wish
: The stated desire of the member.evidence
: A dump of evidence to be considered. This should generally be either a Markdown-encoded document or a series of 32-byte hashes which can be found on a decentralised content-based-indexing system such as IPFS.
sourcepub fn import(
origin: <T as Config>::RuntimeOrigin,
) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
👎Deprecated: Use import_member
instead
pub fn import( origin: <T as Config>::RuntimeOrigin, ) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
import_member
insteadIntroduce an already-ranked individual of the collective into this pallet.
The rank may still be zero. This resets last_proof
to the current block and
last_promotion
will be set to zero, thereby delaying any automatic demotion but
allowing immediate promotion.
origin
: A signed origin of a ranked, but not tracked, account.
sourcepub fn import_member(
origin: <T as Config>::RuntimeOrigin,
who: <T as Config>::AccountId,
) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
pub fn import_member( origin: <T as Config>::RuntimeOrigin, who: <T as Config>::AccountId, ) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
Introduce an already-ranked individual of the collective into this pallet.
The rank may still be zero. Can be called by anyone on any collective member - including the sender.
This resets last_proof
to the current block and last_promotion
will be set to zero,
thereby delaying any automatic demotion but allowing immediate promotion.
origin
: A signed origin of a ranked, but not tracked, account.who
: The account ID of the collective member to be inducted.
sourcepub fn set_partial_params(
origin: <T as Config>::RuntimeOrigin,
partial_params: Box<ParamsType<Option<<T as Config<I>>::Balance>, Option<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number>, <T as Config<I>>::MaxRank>>,
) -> Result<(), DispatchError>
pub fn set_partial_params( origin: <T as Config>::RuntimeOrigin, partial_params: Box<ParamsType<Option<<T as Config<I>>::Balance>, Option<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number>, <T as Config<I>>::MaxRank>>, ) -> Result<(), DispatchError>
Set the parameters partially.
origin
: An origin complying withParamsOrigin
or root.partial_params
: The new parameters for the pallet.
This update config with multiple arguments without duplicating the fields that does not need to update (set to None).
Trait Implementations
source§impl<T, I> BeforeAllRuntimeMigrations for Pallet<T, I>where
T: Config<I>,
I: 'static,
impl<T, I> BeforeAllRuntimeMigrations for Pallet<T, I>where
T: Config<I>,
I: 'static,
source§fn before_all_runtime_migrations() -> Weight
fn before_all_runtime_migrations() -> Weight
source§impl<T, I> BenchmarkSetup<<T as Config>::AccountId> for Pallet<T, I>where
T: Config<I>,
I: 'static,
impl<T, I> BenchmarkSetup<<T as Config>::AccountId> for Pallet<T, I>where
T: Config<I>,
I: 'static,
source§fn ensure_member(who: &<T as Config>::AccountId)
fn ensure_member(who: &<T as Config>::AccountId)
source§impl<T, I> Benchmarking for Pallet<T, I>
impl<T, I> Benchmarking for Pallet<T, I>
source§fn benchmarks(extra: bool) -> Vec<BenchmarkMetadata>
fn benchmarks(extra: bool) -> Vec<BenchmarkMetadata>
source§fn run_benchmark(
extrinsic: &[u8],
c: &[(BenchmarkParameter, u32)],
whitelist: &[TrackedStorageKey],
verify: bool,
internal_repeats: u32,
) -> Result<Vec<BenchmarkResult>, BenchmarkError>
fn run_benchmark( extrinsic: &[u8], c: &[(BenchmarkParameter, u32)], whitelist: &[TrackedStorageKey], verify: bool, internal_repeats: u32, ) -> Result<Vec<BenchmarkResult>, BenchmarkError>
source§impl<T, I> Callable<T> for Pallet<T, I>where
T: Config<I>,
I: 'static,
impl<T, I> Callable<T> for Pallet<T, I>where
T: Config<I>,
I: 'static,
type RuntimeCall = Call<T, I>
source§impl<T, I> GetSalary<<<T as Config<I>>::Members as RankedMembers>::Rank, <T as Config>::AccountId, <T as Config<I>>::Balance> for Pallet<T, I>where
T: Config<I>,
I: 'static,
impl<T, I> GetSalary<<<T as Config<I>>::Members as RankedMembers>::Rank, <T as Config>::AccountId, <T as Config<I>>::Balance> for Pallet<T, I>where
T: Config<I>,
I: 'static,
source§impl<T, I> GetStorageVersion for Pallet<T, I>where
T: Config<I>,
I: 'static,
impl<T, I> GetStorageVersion for Pallet<T, I>where
T: Config<I>,
I: 'static,
source§fn in_code_storage_version() -> <Pallet<T, I> as GetStorageVersion>::InCodeStorageVersion
fn in_code_storage_version() -> <Pallet<T, I> as GetStorageVersion>::InCodeStorageVersion
storage_version
attribute, or
NoStorageVersionSet
if the attribute is missing.source§fn on_chain_storage_version() -> StorageVersion
fn on_chain_storage_version() -> StorageVersion
source§fn current_storage_version() -> Self::InCodeStorageVersion
fn current_storage_version() -> Self::InCodeStorageVersion
in_code_storage_version
and will be removed after March 2024.Self::current_storage_version
instead. Read moresource§impl<T, I> Hooks<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>where
T: Config<I>,
I: 'static,
impl<T, I> Hooks<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>where
T: Config<I>,
I: 'static,
source§fn on_initialize(_n: BlockNumber) -> Weight
fn on_initialize(_n: BlockNumber) -> Weight
source§fn on_finalize(_n: BlockNumber)
fn on_finalize(_n: BlockNumber)
source§fn on_idle(_n: BlockNumber, _remaining_weight: Weight) -> Weight
fn on_idle(_n: BlockNumber, _remaining_weight: Weight) -> Weight
Hooks::on_finalize
). Read moresource§fn on_poll(_n: BlockNumber, _weight: &mut WeightMeter)
fn on_poll(_n: BlockNumber, _weight: &mut WeightMeter)
source§fn on_runtime_upgrade() -> Weight
fn on_runtime_upgrade() -> Weight
Executive
pallet. Read moresource§fn try_state(_n: BlockNumber) -> Result<(), DispatchError>
fn try_state(_n: BlockNumber) -> Result<(), DispatchError>
source§fn pre_upgrade() -> Result<Vec<u8>, DispatchError>
fn pre_upgrade() -> Result<Vec<u8>, DispatchError>
source§fn post_upgrade(_state: Vec<u8>) -> Result<(), DispatchError>
fn post_upgrade(_state: Vec<u8>) -> Result<(), DispatchError>
source§fn offchain_worker(_n: BlockNumber)
fn offchain_worker(_n: BlockNumber)
source§fn integrity_test()
fn integrity_test()
source§impl<T, I> IntegrityTest for Pallet<T, I>where
T: Config<I>,
I: 'static,
impl<T, I> IntegrityTest for Pallet<T, I>where
T: Config<I>,
I: 'static,
source§impl<T, I> OffchainWorker<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>where
T: Config<I>,
I: 'static,
impl<T, I> OffchainWorker<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>where
T: Config<I>,
I: 'static,
source§impl<T, I> OnFinalize<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>where
T: Config<I>,
I: 'static,
impl<T, I> OnFinalize<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>where
T: Config<I>,
I: 'static,
source§fn on_finalize(
n: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number,
)
fn on_finalize( n: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number, )
Hooks::on_finalize
.source§impl<T, I> OnGenesis for Pallet<T, I>where
T: Config<I>,
I: 'static,
impl<T, I> OnGenesis for Pallet<T, I>where
T: Config<I>,
I: 'static,
source§fn on_genesis()
fn on_genesis()
source§impl<T, I> OnIdle<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>where
T: Config<I>,
I: 'static,
impl<T, I> OnIdle<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>where
T: Config<I>,
I: 'static,
source§impl<T, I> OnInitialize<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>where
T: Config<I>,
I: 'static,
impl<T, I> OnInitialize<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>where
T: Config<I>,
I: 'static,
source§fn on_initialize(
n: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number,
) -> Weight
fn on_initialize( n: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number, ) -> Weight
Hooks::on_initialize
.source§impl<T, I> OnPoll<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>where
T: Config<I>,
I: 'static,
impl<T, I> OnPoll<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>where
T: Config<I>,
I: 'static,
source§impl<T, I> OnRuntimeUpgrade for Pallet<T, I>where
T: Config<I>,
I: 'static,
impl<T, I> OnRuntimeUpgrade for Pallet<T, I>where
T: Config<I>,
I: 'static,
source§fn on_runtime_upgrade() -> Weight
fn on_runtime_upgrade() -> Weight
source§fn pre_upgrade() -> Result<Vec<u8>, DispatchError>
fn pre_upgrade() -> Result<Vec<u8>, DispatchError>
Hooks::pre_upgrade
.source§fn post_upgrade(state: Vec<u8>) -> Result<(), DispatchError>
fn post_upgrade(state: Vec<u8>) -> Result<(), DispatchError>
Hooks::post_upgrade
.source§fn try_on_runtime_upgrade(checks: bool) -> Result<Weight, DispatchError>
fn try_on_runtime_upgrade(checks: bool) -> Result<Weight, DispatchError>
pre_upgrade
->
on_runtime_upgrade
-> post_upgrade
hooks for a migration. Read moresource§impl<T, I> PalletInfoAccess for Pallet<T, I>where
T: Config<I>,
I: 'static,
impl<T, I> PalletInfoAccess for Pallet<T, I>where
T: Config<I>,
I: 'static,
source§fn module_name() -> &'static str
fn module_name() -> &'static str
source§fn crate_version() -> CrateVersion
fn crate_version() -> CrateVersion
source§impl<T, I> PalletsInfoAccess for Pallet<T, I>where
T: Config<I>,
I: 'static,
impl<T, I> PalletsInfoAccess for Pallet<T, I>where
T: Config<I>,
I: 'static,
source§impl<T, I> PartialEq for Pallet<T, I>
impl<T, I> PartialEq for Pallet<T, I>
source§impl<T, I> RankedMembersSwapHandler<<T as Config>::AccountId, u16> for Pallet<T, I>where
T: Config<I>,
I: 'static,
impl<T, I> RankedMembersSwapHandler<<T as Config>::AccountId, u16> for Pallet<T, I>where
T: Config<I>,
I: 'static,
source§impl<T, I> StorageInfoTrait for Pallet<T, I>where
T: Config<I>,
I: 'static,
impl<T, I> StorageInfoTrait for Pallet<T, I>where
T: Config<I>,
I: 'static,
fn storage_info() -> Vec<StorageInfo>
source§impl<T, I> TryDecodeEntireStorage for Pallet<T, I>where
T: Config<I>,
I: 'static,
impl<T, I> TryDecodeEntireStorage for Pallet<T, I>where
T: Config<I>,
I: 'static,
source§fn try_decode_entire_state() -> Result<usize, Vec<TryDecodeEntireStorageError>>
fn try_decode_entire_state() -> Result<usize, Vec<TryDecodeEntireStorageError>>
Ok(bytes_decoded)
if success.source§impl<T, I> TryState<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>where
T: Config<I>,
I: 'static,
impl<T, I> TryState<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>where
T: Config<I>,
I: 'static,
source§impl<T, I> WhitelistedStorageKeys for Pallet<T, I>where
T: Config<I>,
I: 'static,
impl<T, I> WhitelistedStorageKeys for Pallet<T, I>where
T: Config<I>,
I: 'static,
source§fn whitelisted_storage_keys() -> Vec<TrackedStorageKey>
fn whitelisted_storage_keys() -> Vec<TrackedStorageKey>
Vec<TrackedStorageKey>
indicating the storage keys that
should be whitelisted during benchmarking. This means that those keys
will be excluded from the benchmarking performance calculation.