Type Alias moonbeam_runtime::ParachainStaking
source · pub type ParachainStaking = Pallet<Runtime>;
Aliased Type§
struct ParachainStaking(/* private fields */);
Implementations
source§impl<T> Pallet<T>where
T: Config,
impl<T> Pallet<T>where
T: Config,
sourcepub fn delegation_request_exists(
collator: &<T as Config>::AccountId,
delegator: &<T as Config>::AccountId
) -> bool
pub fn delegation_request_exists( collator: &<T as Config>::AccountId, delegator: &<T as Config>::AccountId ) -> bool
Returns true if a ScheduledRequest exists for a given delegation
sourcepub fn delegation_request_revoke_exists(
collator: &<T as Config>::AccountId,
delegator: &<T as Config>::AccountId
) -> bool
pub fn delegation_request_revoke_exists( collator: &<T as Config>::AccountId, delegator: &<T as Config>::AccountId ) -> bool
Returns true if a DelegationAction::Revoke ScheduledRequest exists for a given delegation
source§impl<T> Pallet<T>where
T: Config,
impl<T> Pallet<T>where
T: Config,
sourcepub fn set_staking_expectations(
origin: <T as Config>::RuntimeOrigin,
expectations: Range<<<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance>
) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
pub fn set_staking_expectations( origin: <T as Config>::RuntimeOrigin, expectations: Range<<<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance> ) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
Set the expectations for total staked. These expectations determine the issuance for
the round according to logic in fn compute_issuance
sourcepub fn set_inflation(
origin: <T as Config>::RuntimeOrigin,
schedule: Range<Perbill>
) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
pub fn set_inflation( origin: <T as Config>::RuntimeOrigin, schedule: Range<Perbill> ) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
Set the annual inflation rate to derive per-round inflation
sourcepub fn set_parachain_bond_account(
origin: <T as Config>::RuntimeOrigin,
new: <T as Config>::AccountId
) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
pub fn set_parachain_bond_account( origin: <T as Config>::RuntimeOrigin, new: <T as Config>::AccountId ) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
Deprecated: please use set_inflation_distribution_config
instead.
Set the account that will hold funds set aside for parachain bond
sourcepub fn set_parachain_bond_reserve_percent(
origin: <T as Config>::RuntimeOrigin,
new: Percent
) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
pub fn set_parachain_bond_reserve_percent( origin: <T as Config>::RuntimeOrigin, new: Percent ) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
Deprecated: please use set_inflation_distribution_config
instead.
Set the percent of inflation set aside for parachain bond
sourcepub fn set_total_selected(
origin: <T as Config>::RuntimeOrigin,
new: u32
) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
pub fn set_total_selected( origin: <T as Config>::RuntimeOrigin, new: u32 ) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
Set the total number of collator candidates selected per round
- changes are not applied until the start of the next round
sourcepub fn set_collator_commission(
origin: <T as Config>::RuntimeOrigin,
new: Perbill
) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
pub fn set_collator_commission( origin: <T as Config>::RuntimeOrigin, new: Perbill ) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
Set the commission for all collators
sourcepub fn set_blocks_per_round(
origin: <T as Config>::RuntimeOrigin,
new: u32
) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
pub fn set_blocks_per_round( origin: <T as Config>::RuntimeOrigin, new: u32 ) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
Set blocks per round
- if called with
new
less than length of current round, will transition immediately in the next block - also updates per-round inflation config
sourcepub fn join_candidates(
origin: <T as Config>::RuntimeOrigin,
bond: <<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance,
candidate_count: u32
) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
pub fn join_candidates( origin: <T as Config>::RuntimeOrigin, bond: <<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance, candidate_count: u32 ) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
Join the set of collator candidates
sourcepub fn schedule_leave_candidates(
origin: <T as Config>::RuntimeOrigin,
candidate_count: u32
) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
pub fn schedule_leave_candidates( origin: <T as Config>::RuntimeOrigin, candidate_count: u32 ) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
Request to leave the set of candidates. If successful, the account is immediately removed from the candidate pool to prevent selection as a collator.
sourcepub fn execute_leave_candidates(
origin: <T as Config>::RuntimeOrigin,
candidate: <T as Config>::AccountId,
candidate_delegation_count: u32
) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
pub fn execute_leave_candidates( origin: <T as Config>::RuntimeOrigin, candidate: <T as Config>::AccountId, candidate_delegation_count: u32 ) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
Execute leave candidates request
sourcepub fn cancel_leave_candidates(
origin: <T as Config>::RuntimeOrigin,
candidate_count: u32
) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
pub fn cancel_leave_candidates( origin: <T as Config>::RuntimeOrigin, candidate_count: u32 ) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
Cancel open request to leave candidates
- only callable by collator account
- result upon successful call is the candidate is active in the candidate pool
sourcepub fn go_offline(
origin: <T as Config>::RuntimeOrigin
) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
pub fn go_offline( origin: <T as Config>::RuntimeOrigin ) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
Temporarily leave the set of collator candidates without unbonding
sourcepub fn go_online(
origin: <T as Config>::RuntimeOrigin
) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
pub fn go_online( origin: <T as Config>::RuntimeOrigin ) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
Rejoin the set of collator candidates if previously had called go_offline
sourcepub fn candidate_bond_more(
origin: <T as Config>::RuntimeOrigin,
more: <<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance
) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
pub fn candidate_bond_more( origin: <T as Config>::RuntimeOrigin, more: <<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance ) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
Increase collator candidate self bond by more
sourcepub fn schedule_candidate_bond_less(
origin: <T as Config>::RuntimeOrigin,
less: <<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance
) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
pub fn schedule_candidate_bond_less( origin: <T as Config>::RuntimeOrigin, less: <<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance ) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
Request by collator candidate to decrease self bond by less
sourcepub fn execute_candidate_bond_less(
origin: <T as Config>::RuntimeOrigin,
candidate: <T as Config>::AccountId
) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
pub fn execute_candidate_bond_less( origin: <T as Config>::RuntimeOrigin, candidate: <T as Config>::AccountId ) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
Execute pending request to adjust the collator candidate self bond
sourcepub fn cancel_candidate_bond_less(
origin: <T as Config>::RuntimeOrigin
) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
pub fn cancel_candidate_bond_less( origin: <T as Config>::RuntimeOrigin ) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
Cancel pending request to adjust the collator candidate self bond
sourcepub fn delegate_with_auto_compound(
origin: <T as Config>::RuntimeOrigin,
candidate: <T as Config>::AccountId,
amount: <<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance,
auto_compound: Percent,
candidate_delegation_count: u32,
candidate_auto_compounding_delegation_count: u32,
delegation_count: u32
) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
pub fn delegate_with_auto_compound( origin: <T as Config>::RuntimeOrigin, candidate: <T as Config>::AccountId, amount: <<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance, auto_compound: Percent, candidate_delegation_count: u32, candidate_auto_compounding_delegation_count: u32, delegation_count: u32 ) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
If caller is not a delegator and not a collator, then join the set of delegators If caller is a delegator, then makes delegation to change their delegation state Sets the auto-compound config for the delegation
sourcepub fn schedule_revoke_delegation(
origin: <T as Config>::RuntimeOrigin,
collator: <T as Config>::AccountId
) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
pub fn schedule_revoke_delegation( origin: <T as Config>::RuntimeOrigin, collator: <T as Config>::AccountId ) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
Request to revoke an existing delegation. If successful, the delegation is scheduled
to be allowed to be revoked via the execute_delegation_request
extrinsic.
The delegation receives no rewards for the rounds while a revoke is pending.
A revoke may not be performed if any other scheduled request is pending.
sourcepub fn delegator_bond_more(
origin: <T as Config>::RuntimeOrigin,
candidate: <T as Config>::AccountId,
more: <<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance
) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
pub fn delegator_bond_more( origin: <T as Config>::RuntimeOrigin, candidate: <T as Config>::AccountId, more: <<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance ) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
Bond more for delegators wrt a specific collator candidate.
sourcepub fn schedule_delegator_bond_less(
origin: <T as Config>::RuntimeOrigin,
candidate: <T as Config>::AccountId,
less: <<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance
) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
pub fn schedule_delegator_bond_less( origin: <T as Config>::RuntimeOrigin, candidate: <T as Config>::AccountId, less: <<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance ) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
Request bond less for delegators wrt a specific collator candidate. The delegation’s rewards for rounds while the request is pending use the reduced bonded amount. A bond less may not be performed if any other scheduled request is pending.
sourcepub fn execute_delegation_request(
origin: <T as Config>::RuntimeOrigin,
delegator: <T as Config>::AccountId,
candidate: <T as Config>::AccountId
) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
pub fn execute_delegation_request( origin: <T as Config>::RuntimeOrigin, delegator: <T as Config>::AccountId, candidate: <T as Config>::AccountId ) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
Execute pending request to change an existing delegation
sourcepub fn cancel_delegation_request(
origin: <T as Config>::RuntimeOrigin,
candidate: <T as Config>::AccountId
) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
pub fn cancel_delegation_request( origin: <T as Config>::RuntimeOrigin, candidate: <T as Config>::AccountId ) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
Cancel request to change an existing delegation.
sourcepub fn set_auto_compound(
origin: <T as Config>::RuntimeOrigin,
candidate: <T as Config>::AccountId,
value: Percent,
candidate_auto_compounding_delegation_count_hint: u32,
delegation_count_hint: u32
) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
pub fn set_auto_compound( origin: <T as Config>::RuntimeOrigin, candidate: <T as Config>::AccountId, value: Percent, candidate_auto_compounding_delegation_count_hint: u32, delegation_count_hint: u32 ) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
Sets the auto-compounding reward percentage for a delegation.
sourcepub fn hotfix_remove_delegation_requests_exited_candidates(
origin: <T as Config>::RuntimeOrigin,
candidates: Vec<<T as Config>::AccountId>
) -> Result<(), DispatchError>
pub fn hotfix_remove_delegation_requests_exited_candidates( origin: <T as Config>::RuntimeOrigin, candidates: Vec<<T as Config>::AccountId> ) -> Result<(), DispatchError>
Hotfix to remove existing empty entries for candidates that have left.
sourcepub fn notify_inactive_collator(
origin: <T as Config>::RuntimeOrigin,
collator: <T as Config>::AccountId
) -> Result<(), DispatchError>
pub fn notify_inactive_collator( origin: <T as Config>::RuntimeOrigin, collator: <T as Config>::AccountId ) -> Result<(), DispatchError>
Notify a collator is inactive during MaxOfflineRounds
sourcepub fn enable_marking_offline(
origin: <T as Config>::RuntimeOrigin,
value: bool
) -> Result<(), DispatchError>
pub fn enable_marking_offline( origin: <T as Config>::RuntimeOrigin, value: bool ) -> Result<(), DispatchError>
Enable/Disable marking offline feature
sourcepub fn force_join_candidates(
origin: <T as Config>::RuntimeOrigin,
account: <T as Config>::AccountId,
bond: <<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance,
candidate_count: u32
) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
pub fn force_join_candidates( origin: <T as Config>::RuntimeOrigin, account: <T as Config>::AccountId, bond: <<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance, candidate_count: u32 ) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
Force join the set of collator candidates. It will skip the minimum required bond check.
sourcepub fn set_inflation_distribution_config(
origin: <T as Config>::RuntimeOrigin,
new: InflationDistributionConfig<<T as Config>::AccountId>
) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
pub fn set_inflation_distribution_config( origin: <T as Config>::RuntimeOrigin, new: InflationDistributionConfig<<T as Config>::AccountId> ) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
Set the inflation distribution configuration.
source§impl<T> Pallet<T>where
T: Config,
impl<T> Pallet<T>where
T: Config,
pub fn set_candidate_bond_to_zero(acc: &<T as Config>::AccountId) -> Weight
pub fn is_delegator(acc: &<T as Config>::AccountId) -> bool
pub fn is_candidate(acc: &<T as Config>::AccountId) -> bool
pub fn is_selected_candidate(acc: &<T as Config>::AccountId) -> bool
pub fn join_candidates_inner( acc: <T as Config>::AccountId, bond: <<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance, candidate_count: u32 ) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
pub fn go_offline_inner( collator: <T as Config>::AccountId ) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
pub fn go_online_inner( collator: <T as Config>::AccountId ) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
pub fn candidate_bond_more_inner( collator: <T as Config>::AccountId, more: <<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance ) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
pub fn execute_candidate_bond_less_inner( candidate: <T as Config>::AccountId ) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
pub fn execute_leave_candidates_inner( candidate: <T as Config>::AccountId ) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
sourcepub fn get_delegator_stakable_balance(
acc: &<T as Config>::AccountId
) -> <<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance
pub fn get_delegator_stakable_balance( acc: &<T as Config>::AccountId ) -> <<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance
Returns an account’s stakable balance which is not locked in delegation staking
sourcepub fn get_collator_stakable_free_balance(
acc: &<T as Config>::AccountId
) -> <<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance
pub fn get_collator_stakable_free_balance( acc: &<T as Config>::AccountId ) -> <<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance
Returns an account’s free balance which is not locked in collator staking
sourcepub fn delegation_auto_compound(
candidate: &<T as Config>::AccountId,
delegator: &<T as Config>::AccountId
) -> Percent
pub fn delegation_auto_compound( candidate: &<T as Config>::AccountId, delegator: &<T as Config>::AccountId ) -> Percent
Returns a delegations auto-compound value.
sourcepub fn compute_top_candidates() -> Vec<<T as Config>::AccountId>
pub fn compute_top_candidates() -> Vec<<T as Config>::AccountId>
Compute the top TotalSelected
candidates in the CandidatePool and return
a vec of their AccountIds (sorted by AccountId).
If the returned vec is empty, the previous candidates should be used.
sourcepub fn delegation_bond_more_without_event(
delegator: <T as Config>::AccountId,
candidate: <T as Config>::AccountId,
more: <<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance
) -> Result<(bool, Weight), DispatchErrorWithPostInfo<PostDispatchInfo>>
pub fn delegation_bond_more_without_event( delegator: <T as Config>::AccountId, candidate: <T as Config>::AccountId, more: <<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance ) -> Result<(bool, Weight), DispatchErrorWithPostInfo<PostDispatchInfo>>
This function exists as a helper to delegator_bond_more & auto_compound functionality. Any changes to this function must align with both user-initiated bond increases and auto-compounding bond increases. Any feature-specific preconditions should be validated before this function is invoked. Any feature-specific events must be emitted after this function is invoked.
sourcepub fn mint(
amt: <<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance,
to: <T as Config>::AccountId
)
pub fn mint( amt: <<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance, to: <T as Config>::AccountId )
Mint a specified reward amount to the beneficiary account. Emits the [Rewarded] event.
sourcepub fn mint_collator_reward(
_paid_for_round: u32,
collator_id: <T as Config>::AccountId,
amt: <<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance
) -> Weight
pub fn mint_collator_reward( _paid_for_round: u32, collator_id: <T as Config>::AccountId, amt: <<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance ) -> Weight
Mint a specified reward amount to the collator’s account. Emits the [Rewarded] event.
sourcepub fn mint_and_compound(
amt: <<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance,
compound_percent: Percent,
candidate: <T as Config>::AccountId,
delegator: <T as Config>::AccountId
)
pub fn mint_and_compound( amt: <<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance, compound_percent: Percent, candidate: <T as Config>::AccountId, delegator: <T as Config>::AccountId )
Mint and compound delegation rewards. The function mints the amount towards the delegator and tries to compound a specified percent of it back towards the delegation. If a scheduled delegation revoke exists, then the amount is only minted, and nothing is compounded. Emits the [Compounded] event.
sourcepub fn mark_collators_as_inactive(cur: u32) -> Weight
pub fn mark_collators_as_inactive(cur: u32) -> Weight
Marks collators as inactive for the previous round if they received zero awarded points.
source§impl<T> Pallet<T>where
T: Config,
impl<T> Pallet<T>where
T: Config,
sourcepub fn collator_commission() -> Perbill
pub fn collator_commission() -> Perbill
An auto-generated getter for CollatorCommission
.
source§impl<T> Pallet<T>where
T: Config,
impl<T> Pallet<T>where
T: Config,
sourcepub fn total_selected() -> u32
pub fn total_selected() -> u32
An auto-generated getter for TotalSelected
.
source§impl<T> Pallet<T>where
T: Config,
impl<T> Pallet<T>where
T: Config,
sourcepub fn inflation_distribution_info(
) -> InflationDistributionConfig<<T as Config>::AccountId>
pub fn inflation_distribution_info( ) -> InflationDistributionConfig<<T as Config>::AccountId>
An auto-generated getter for InflationDistributionInfo
.
source§impl<T> Pallet<T>where
T: Config,
impl<T> Pallet<T>where
T: Config,
sourcepub fn candidate_info<KArg>(
k: KArg
) -> Option<CandidateMetadata<<<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance>>where
KArg: EncodeLike<<T as Config>::AccountId>,
pub fn candidate_info<KArg>(
k: KArg
) -> Option<CandidateMetadata<<<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance>>where
KArg: EncodeLike<<T as Config>::AccountId>,
An auto-generated getter for CandidateInfo
.
source§impl<T> Pallet<T>where
T: Config,
impl<T> Pallet<T>where
T: Config,
sourcepub fn delegation_scheduled_requests<KArg>(
k: KArg
) -> BoundedVec<ScheduledRequest<<T as Config>::AccountId, <<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance>, AddGet<<T as Config>::MaxTopDelegationsPerCandidate, <T as Config>::MaxBottomDelegationsPerCandidate>>where
KArg: EncodeLike<<T as Config>::AccountId>,
pub fn delegation_scheduled_requests<KArg>(
k: KArg
) -> BoundedVec<ScheduledRequest<<T as Config>::AccountId, <<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance>, AddGet<<T as Config>::MaxTopDelegationsPerCandidate, <T as Config>::MaxBottomDelegationsPerCandidate>>where
KArg: EncodeLike<<T as Config>::AccountId>,
An auto-generated getter for DelegationScheduledRequests
.
source§impl<T> Pallet<T>where
T: Config,
impl<T> Pallet<T>where
T: Config,
sourcepub fn auto_compounding_delegations<KArg>(
k: KArg
) -> BoundedVec<AutoCompoundConfig<<T as Config>::AccountId>, AddGet<<T as Config>::MaxTopDelegationsPerCandidate, <T as Config>::MaxBottomDelegationsPerCandidate>>where
KArg: EncodeLike<<T as Config>::AccountId>,
pub fn auto_compounding_delegations<KArg>(
k: KArg
) -> BoundedVec<AutoCompoundConfig<<T as Config>::AccountId>, AddGet<<T as Config>::MaxTopDelegationsPerCandidate, <T as Config>::MaxBottomDelegationsPerCandidate>>where
KArg: EncodeLike<<T as Config>::AccountId>,
An auto-generated getter for AutoCompoundingDelegations
.
source§impl<T> Pallet<T>where
T: Config,
impl<T> Pallet<T>where
T: Config,
sourcepub fn top_delegations<KArg>(
k: KArg
) -> Option<Delegations<<T as Config>::AccountId, <<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance>>where
KArg: EncodeLike<<T as Config>::AccountId>,
pub fn top_delegations<KArg>(
k: KArg
) -> Option<Delegations<<T as Config>::AccountId, <<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance>>where
KArg: EncodeLike<<T as Config>::AccountId>,
An auto-generated getter for TopDelegations
.
source§impl<T> Pallet<T>where
T: Config,
impl<T> Pallet<T>where
T: Config,
sourcepub fn bottom_delegations<KArg>(
k: KArg
) -> Option<Delegations<<T as Config>::AccountId, <<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance>>where
KArg: EncodeLike<<T as Config>::AccountId>,
pub fn bottom_delegations<KArg>(
k: KArg
) -> Option<Delegations<<T as Config>::AccountId, <<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance>>where
KArg: EncodeLike<<T as Config>::AccountId>,
An auto-generated getter for BottomDelegations
.
source§impl<T> Pallet<T>where
T: Config,
impl<T> Pallet<T>where
T: Config,
sourcepub fn selected_candidates(
) -> BoundedVec<<T as Config>::AccountId, <T as Config>::MaxCandidates>
pub fn selected_candidates( ) -> BoundedVec<<T as Config>::AccountId, <T as Config>::MaxCandidates>
An auto-generated getter for SelectedCandidates
.
source§impl<T> Pallet<T>where
T: Config,
impl<T> Pallet<T>where
T: Config,
sourcepub fn candidate_pool(
) -> BoundedOrderedSet<Bond<<T as Config>::AccountId, <<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance>, <T as Config>::MaxCandidates>
pub fn candidate_pool( ) -> BoundedOrderedSet<Bond<<T as Config>::AccountId, <<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance>, <T as Config>::MaxCandidates>
An auto-generated getter for CandidatePool
.
source§impl<T> Pallet<T>where
T: Config,
impl<T> Pallet<T>where
T: Config,
sourcepub fn was_inactive<KArg1, KArg2>(k1: KArg1, k2: KArg2) -> Option<()>where
KArg1: EncodeLike<u32>,
KArg2: EncodeLike<<T as Config>::AccountId>,
pub fn was_inactive<KArg1, KArg2>(k1: KArg1, k2: KArg2) -> Option<()>where
KArg1: EncodeLike<u32>,
KArg2: EncodeLike<<T as Config>::AccountId>,
An auto-generated getter for WasInactive
.
source§impl<T> Pallet<T>where
T: Config,
impl<T> Pallet<T>where
T: Config,
sourcepub fn delayed_payouts<KArg>(
k: KArg
) -> Option<DelayedPayout<<<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance>>where
KArg: EncodeLike<u32>,
pub fn delayed_payouts<KArg>(
k: KArg
) -> Option<DelayedPayout<<<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance>>where
KArg: EncodeLike<u32>,
An auto-generated getter for DelayedPayouts
.
source§impl<T> Pallet<T>where
T: Config,
impl<T> Pallet<T>where
T: Config,
sourcepub fn inflation_config(
) -> InflationInfo<<<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance>
pub fn inflation_config( ) -> InflationInfo<<<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance>
An auto-generated getter for InflationConfig
.
source§impl<T> Pallet<T>where
T: Config,
impl<T> Pallet<T>where
T: Config,
sourcepub fn awarded_pts<KArg1, KArg2>(k1: KArg1, k2: KArg2) -> u32where
KArg1: EncodeLike<u32>,
KArg2: EncodeLike<<T as Config>::AccountId>,
pub fn awarded_pts<KArg1, KArg2>(k1: KArg1, k2: KArg2) -> u32where
KArg1: EncodeLike<u32>,
KArg2: EncodeLike<<T as Config>::AccountId>,
An auto-generated getter for AwardedPts
.
source§impl<T> Pallet<T>where
T: Config,
impl<T> Pallet<T>where
T: Config,
sourcepub fn marking_offline() -> bool
pub fn marking_offline() -> bool
An auto-generated getter for EnableMarkingOffline
.
Trait Implementations
source§impl<T> BeforeAllRuntimeMigrations for Pallet<T>where
T: Config,
impl<T> BeforeAllRuntimeMigrations for Pallet<T>where
T: Config,
source§fn before_all_runtime_migrations() -> Weight
fn before_all_runtime_migrations() -> Weight
source§impl<T> PalletInfoAccess for Pallet<T>where
T: Config,
impl<T> PalletInfoAccess for Pallet<T>where
T: Config,
source§fn module_name() -> &'static str
fn module_name() -> &'static str
source§fn crate_version() -> CrateVersion
fn crate_version() -> CrateVersion
source§impl<T> WhitelistedStorageKeys for Pallet<T>where
T: Config,
impl<T> WhitelistedStorageKeys for Pallet<T>where
T: Config,
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.source§impl<T> GetStorageVersion for Pallet<T>where
T: Config,
impl<T> GetStorageVersion for Pallet<T>where
T: Config,
§type InCodeStorageVersion = NoStorageVersionSet
type InCodeStorageVersion = NoStorageVersionSet
source§fn in_code_storage_version(
) -> <Pallet<T> as GetStorageVersion>::InCodeStorageVersion
fn in_code_storage_version( ) -> <Pallet<T> 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
§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> OffchainWorker<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>where
T: Config,
impl<T> OffchainWorker<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>where
T: Config,
source§fn offchain_worker(
n: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number
)
fn offchain_worker( n: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number )
source§impl<T> OnRuntimeUpgrade for Pallet<T>where
T: Config,
impl<T> OnRuntimeUpgrade for Pallet<T>where
T: Config,
source§fn on_runtime_upgrade() -> Weight
fn on_runtime_upgrade() -> Weight
Hooks::on_runtime_upgrade
].source§impl<T> OnIdle<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>where
T: Config,
impl<T> OnIdle<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>where
T: Config,
source§impl<T> Hooks<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>where
T: Config,
impl<T> Hooks<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>where
T: Config,
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
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 )
§fn on_idle(_n: BlockNumber, _remaining_weight: Weight) -> Weight
fn on_idle(_n: BlockNumber, _remaining_weight: Weight) -> Weight
Hooks::on_finalize
]). Read more§fn on_poll(_n: BlockNumber, _weight: &mut WeightMeter)
fn on_poll(_n: BlockNumber, _weight: &mut WeightMeter)
§fn on_runtime_upgrade() -> Weight
fn on_runtime_upgrade() -> Weight
Executive
pallet. Read more§fn offchain_worker(_n: BlockNumber)
fn offchain_worker(_n: BlockNumber)
§fn integrity_test()
fn integrity_test()
source§impl<T> OnInitialize<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>where
T: Config,
impl<T> OnInitialize<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>where
T: Config,
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> OnFinalize<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>where
T: Config,
impl<T> OnFinalize<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>where
T: Config,
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
].