referrerpolicy=no-referrer-when-downgrade

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,

source

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: A Signed origin of an account.
  • who: A member account whose state is to be updated.
source

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 with ParamsOrigin or root.
  • params: The new parameters for the pallet.
source

pub fn set_active( origin: <T as Config>::RuntimeOrigin, is_active: bool, ) -> Result<(), DispatchError>

Set whether a member is active or not.

  • origin: A Signed origin of a member’s account.
  • is_active: true iff the member is active.
source

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 satisfies ApproveOrigin or root.
  • who: A member (i.e. of non-zero rank).
  • at_rank: The rank of member.
source

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 satisfies InductOrigin or root.
  • who: The account ID of the candidate to be inducted and become a member.
source

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 satisfies PromoteOrigin with a Success result of to_rank or more or root.
  • who: The account ID of the member to be promoted to to_rank.
  • to_rank: One more than the current rank of who.
source

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.

source

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: A Signed 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.
source

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: A Signed 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.
source

pub fn import( origin: <T as Config>::RuntimeOrigin, ) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>

👎Deprecated: Use import_member instead

Introduce 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.
source

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.
source

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 with ParamsOrigin 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,

source§

fn before_all_runtime_migrations() -> Weight

Something that should happen before runtime migrations are executed.
source§

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)

Ensure that this member is registered correctly.
source§

impl<T, I> Benchmarking for Pallet<T, I>
where T: Config<I> + Config, I: 'static,

source§

fn benchmarks(extra: bool) -> Vec<BenchmarkMetadata>

Get the benchmarks available for this pallet. Generally there is one benchmark per extrinsic, so these are sometimes just called “extrinsics”. Read more
source§

fn run_benchmark( extrinsic: &[u8], c: &[(BenchmarkParameter, u32)], whitelist: &[TrackedStorageKey], verify: bool, internal_repeats: u32, ) -> Result<Vec<BenchmarkResult>, BenchmarkError>

Run the benchmarks for this pallet.
source§

impl<T, I> Callable<T> for Pallet<T, I>
where T: Config<I>, I: 'static,

§

type RuntimeCall = Call<T, I>

source§

impl<T, I> Clone for Pallet<T, I>

source§

fn clone(&self) -> Pallet<T, I>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T, I> Debug for Pallet<T, I>

source§

fn fmt(&self, fmt: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
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,

source§

fn get_salary( rank: <<T as Config<I>>::Members as RankedMembers>::Rank, who: &<T as Config>::AccountId, ) -> <T as Config<I>>::Balance

Retrieve the salary for a given rank. The account ID is also supplied in case this changes things.
source§

impl<T, I> GetStorageVersion for Pallet<T, I>
where T: Config<I>, I: 'static,

§

type InCodeStorageVersion = StorageVersion

This type is generated by the pallet macro. Read more
source§

fn in_code_storage_version() -> <Pallet<T, I> as GetStorageVersion>::InCodeStorageVersion

Returns the in-code storage version as specified in the storage_version attribute, or NoStorageVersionSet if the attribute is missing.
source§

fn on_chain_storage_version() -> StorageVersion

Returns the storage version of the pallet as last set in the actual on-chain storage.
source§

fn current_storage_version() -> Self::InCodeStorageVersion

👎Deprecated: This method has been renamed to in_code_storage_version and will be removed after March 2024.
DEPRECATED: Use Self::current_storage_version instead. Read more
source§

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

Block initialization hook. This is called at the very beginning of block execution. Read more
source§

fn on_finalize(_n: BlockNumber)

Block finalization hook. This is called at the very end of block execution. Read more
source§

fn on_idle(_n: BlockNumber, _remaining_weight: Weight) -> Weight

Hook to consume a block’s idle time. This will run when the block is being finalized (before Hooks::on_finalize). Read more
source§

fn on_poll(_n: BlockNumber, _weight: &mut WeightMeter)

A hook to run logic after inherent application. Read more
source§

fn on_runtime_upgrade() -> Weight

Hook executed when a code change (aka. a “runtime upgrade”) is detected by the FRAME Executive pallet. Read more
source§

fn try_state(_n: BlockNumber) -> Result<(), DispatchError>

Execute the sanity checks of this pallet, per block. Read more
source§

fn pre_upgrade() -> Result<Vec<u8>, DispatchError>

Execute some pre-checks prior to a runtime upgrade. Read more
source§

fn post_upgrade(_state: Vec<u8>) -> Result<(), DispatchError>

Execute some post-checks after a runtime upgrade. Read more
source§

fn offchain_worker(_n: BlockNumber)

Implementing this function on a pallet allows you to perform long-running tasks that are dispatched as separate threads, and entirely independent of the main blockchain execution. Read more
source§

fn integrity_test()

Check the integrity of this pallet’s configuration. Read more
source§

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,

source§

fn offchain_worker( n: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number, )

This function is being called after every block import (when fully synced). Read more
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,

source§

fn on_finalize( n: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number, )

source§

impl<T, I> OnGenesis for Pallet<T, I>
where T: Config<I>, I: 'static,

source§

fn on_genesis()

Something that should happen at 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,

source§

fn on_idle( n: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number, remaining_weight: Weight, ) -> Weight

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,

source§

fn on_initialize( n: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number, ) -> Weight

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,

source§

fn on_poll( n: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number, weight: &mut WeightMeter, )

Code to execute every now and then at the beginning of the block after inherent application. Read more
source§

impl<T, I> OnRuntimeUpgrade for Pallet<T, I>
where T: Config<I>, I: 'static,

source§

fn on_runtime_upgrade() -> Weight

source§

fn pre_upgrade() -> Result<Vec<u8>, DispatchError>

source§

fn post_upgrade(state: Vec<u8>) -> Result<(), DispatchError>

source§

fn try_on_runtime_upgrade(checks: bool) -> Result<Weight, DispatchError>

The expected and default behavior of this method is to handle executing pre_upgrade -> on_runtime_upgrade -> post_upgrade hooks for a migration. Read more
source§

impl<T, I> PalletInfoAccess for Pallet<T, I>
where T: Config<I>, I: 'static,

source§

fn index() -> usize

Index of the pallet as configured in the runtime.
source§

fn name() -> &'static str

Name of the pallet as configured in the runtime.
source§

fn name_hash() -> [u8; 16]

Two128 hash of name.
source§

fn module_name() -> &'static str

Name of the Rust module containing the pallet.
source§

fn crate_version() -> CrateVersion

Version of the crate containing the pallet.
source§

impl<T, I> PalletsInfoAccess for Pallet<T, I>
where T: Config<I>, I: 'static,

source§

fn count() -> usize

The number of pallets’ information that this type represents. Read more
source§

fn infos() -> Vec<PalletInfoData>

All of the pallets’ information that this type represents.
source§

impl<T, I> PartialEq for Pallet<T, I>

source§

fn eq(&self, other: &Pallet<T, I>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<T, I> RankedMembersSwapHandler<<T as Config>::AccountId, u16> for Pallet<T, I>
where T: Config<I>, I: 'static,

source§

fn swapped( old: &<T as Config>::AccountId, new: &<T as Config>::AccountId, _rank: u16, )

Member old was swapped with new at rank.
source§

impl<T, I> StorageInfoTrait for Pallet<T, I>
where T: Config<I>, I: 'static,

source§

impl<T, I> TryDecodeEntireStorage for Pallet<T, I>
where T: Config<I>, I: 'static,

source§

fn try_decode_entire_state() -> Result<usize, Vec<TryDecodeEntireStorageError>>

Decode the entire data under the given storage, returning 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,

source§

fn try_state( n: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number, _s: Select, ) -> Result<(), DispatchError>

Execute the state checks.
source§

impl<T, I> WhitelistedStorageKeys for Pallet<T, I>
where T: Config<I>, I: 'static,

source§

fn whitelisted_storage_keys() -> Vec<TrackedStorageKey>

Returns a 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.
source§

impl<T, I> Eq for Pallet<T, I>