Struct pallet_parachain_staking::pallet::Pallet
source · pub struct Pallet<T>(/* private fields */);
Expand description
Pallet for parachain staking
Implementations§
source§impl<T: Config> Pallet<T>
impl<T: Config> Pallet<T>
sourcepub fn delegation_request_exists(
collator: &T::AccountId,
delegator: &T::AccountId
) -> bool
pub fn delegation_request_exists( collator: &T::AccountId, delegator: &T::AccountId ) -> bool
Returns true if a ScheduledRequest exists for a given delegation
sourcepub fn delegation_request_revoke_exists(
collator: &T::AccountId,
delegator: &T::AccountId
) -> bool
pub fn delegation_request_revoke_exists( collator: &T::AccountId, delegator: &T::AccountId ) -> bool
Returns true if a DelegationAction::Revoke ScheduledRequest exists for a given delegation
source§impl<T: Config> Pallet<T>
impl<T: Config> Pallet<T>
sourcepub fn set_staking_expectations(
origin: OriginFor<T>,
expectations: Range<BalanceOf<T>>
) -> DispatchResultWithPostInfo
pub fn set_staking_expectations( origin: OriginFor<T>, expectations: Range<BalanceOf<T>> ) -> DispatchResultWithPostInfo
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: OriginFor<T>,
schedule: Range<Perbill>
) -> DispatchResultWithPostInfo
pub fn set_inflation( origin: OriginFor<T>, schedule: Range<Perbill> ) -> DispatchResultWithPostInfo
Set the annual inflation rate to derive per-round inflation
sourcepub fn set_parachain_bond_account(
origin: OriginFor<T>,
new: T::AccountId
) -> DispatchResultWithPostInfo
pub fn set_parachain_bond_account( origin: OriginFor<T>, new: T::AccountId ) -> DispatchResultWithPostInfo
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: OriginFor<T>,
new: Percent
) -> DispatchResultWithPostInfo
pub fn set_parachain_bond_reserve_percent( origin: OriginFor<T>, new: Percent ) -> DispatchResultWithPostInfo
Deprecated: please use set_inflation_distribution_config
instead.
Set the percent of inflation set aside for parachain bond
sourcepub fn set_total_selected(
origin: OriginFor<T>,
new: u32
) -> DispatchResultWithPostInfo
pub fn set_total_selected( origin: OriginFor<T>, new: u32 ) -> DispatchResultWithPostInfo
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: OriginFor<T>,
new: Perbill
) -> DispatchResultWithPostInfo
pub fn set_collator_commission( origin: OriginFor<T>, new: Perbill ) -> DispatchResultWithPostInfo
Set the commission for all collators
sourcepub fn set_blocks_per_round(
origin: OriginFor<T>,
new: u32
) -> DispatchResultWithPostInfo
pub fn set_blocks_per_round( origin: OriginFor<T>, new: u32 ) -> DispatchResultWithPostInfo
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: OriginFor<T>,
bond: BalanceOf<T>,
candidate_count: u32
) -> DispatchResultWithPostInfo
pub fn join_candidates( origin: OriginFor<T>, bond: BalanceOf<T>, candidate_count: u32 ) -> DispatchResultWithPostInfo
Join the set of collator candidates
sourcepub fn schedule_leave_candidates(
origin: OriginFor<T>,
candidate_count: u32
) -> DispatchResultWithPostInfo
pub fn schedule_leave_candidates( origin: OriginFor<T>, candidate_count: u32 ) -> DispatchResultWithPostInfo
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: OriginFor<T>,
candidate: T::AccountId,
candidate_delegation_count: u32
) -> DispatchResultWithPostInfo
pub fn execute_leave_candidates( origin: OriginFor<T>, candidate: T::AccountId, candidate_delegation_count: u32 ) -> DispatchResultWithPostInfo
Execute leave candidates request
sourcepub fn cancel_leave_candidates(
origin: OriginFor<T>,
candidate_count: u32
) -> DispatchResultWithPostInfo
pub fn cancel_leave_candidates( origin: OriginFor<T>, candidate_count: u32 ) -> DispatchResultWithPostInfo
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: OriginFor<T>) -> DispatchResultWithPostInfo
pub fn go_offline(origin: OriginFor<T>) -> DispatchResultWithPostInfo
Temporarily leave the set of collator candidates without unbonding
sourcepub fn go_online(origin: OriginFor<T>) -> DispatchResultWithPostInfo
pub fn go_online(origin: OriginFor<T>) -> DispatchResultWithPostInfo
Rejoin the set of collator candidates if previously had called go_offline
sourcepub fn candidate_bond_more(
origin: OriginFor<T>,
more: BalanceOf<T>
) -> DispatchResultWithPostInfo
pub fn candidate_bond_more( origin: OriginFor<T>, more: BalanceOf<T> ) -> DispatchResultWithPostInfo
Increase collator candidate self bond by more
sourcepub fn schedule_candidate_bond_less(
origin: OriginFor<T>,
less: BalanceOf<T>
) -> DispatchResultWithPostInfo
pub fn schedule_candidate_bond_less( origin: OriginFor<T>, less: BalanceOf<T> ) -> DispatchResultWithPostInfo
Request by collator candidate to decrease self bond by less
sourcepub fn execute_candidate_bond_less(
origin: OriginFor<T>,
candidate: T::AccountId
) -> DispatchResultWithPostInfo
pub fn execute_candidate_bond_less( origin: OriginFor<T>, candidate: T::AccountId ) -> DispatchResultWithPostInfo
Execute pending request to adjust the collator candidate self bond
sourcepub fn cancel_candidate_bond_less(
origin: OriginFor<T>
) -> DispatchResultWithPostInfo
pub fn cancel_candidate_bond_less( origin: OriginFor<T> ) -> DispatchResultWithPostInfo
Cancel pending request to adjust the collator candidate self bond
sourcepub fn delegate(
origin: OriginFor<T>,
candidate: T::AccountId,
amount: BalanceOf<T>,
candidate_delegation_count: u32,
delegation_count: u32
) -> DispatchResultWithPostInfo
pub fn delegate( origin: OriginFor<T>, candidate: T::AccountId, amount: BalanceOf<T>, candidate_delegation_count: u32, delegation_count: u32 ) -> DispatchResultWithPostInfo
DEPRECATED use delegateWithAutoCompound 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
sourcepub fn delegate_with_auto_compound(
origin: OriginFor<T>,
candidate: T::AccountId,
amount: BalanceOf<T>,
auto_compound: Percent,
candidate_delegation_count: u32,
candidate_auto_compounding_delegation_count: u32,
delegation_count: u32
) -> DispatchResultWithPostInfo
pub fn delegate_with_auto_compound( origin: OriginFor<T>, candidate: T::AccountId, amount: BalanceOf<T>, auto_compound: Percent, candidate_delegation_count: u32, candidate_auto_compounding_delegation_count: u32, delegation_count: u32 ) -> DispatchResultWithPostInfo
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 removed_call_19(_origin: OriginFor<T>) -> DispatchResultWithPostInfo
pub fn removed_call_19(_origin: OriginFor<T>) -> DispatchResultWithPostInfo
REMOVED, was schedule_leave_delegators
sourcepub fn removed_call_20(_origin: OriginFor<T>) -> DispatchResultWithPostInfo
pub fn removed_call_20(_origin: OriginFor<T>) -> DispatchResultWithPostInfo
REMOVED, was execute_leave_delegators
sourcepub fn removed_call_21(_origin: OriginFor<T>) -> DispatchResultWithPostInfo
pub fn removed_call_21(_origin: OriginFor<T>) -> DispatchResultWithPostInfo
REMOVED, was cancel_leave_delegators
sourcepub fn schedule_revoke_delegation(
origin: OriginFor<T>,
collator: T::AccountId
) -> DispatchResultWithPostInfo
pub fn schedule_revoke_delegation( origin: OriginFor<T>, collator: T::AccountId ) -> DispatchResultWithPostInfo
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: OriginFor<T>,
candidate: T::AccountId,
more: BalanceOf<T>
) -> DispatchResultWithPostInfo
pub fn delegator_bond_more( origin: OriginFor<T>, candidate: T::AccountId, more: BalanceOf<T> ) -> DispatchResultWithPostInfo
Bond more for delegators wrt a specific collator candidate.
sourcepub fn schedule_delegator_bond_less(
origin: OriginFor<T>,
candidate: T::AccountId,
less: BalanceOf<T>
) -> DispatchResultWithPostInfo
pub fn schedule_delegator_bond_less( origin: OriginFor<T>, candidate: T::AccountId, less: BalanceOf<T> ) -> DispatchResultWithPostInfo
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: OriginFor<T>,
delegator: T::AccountId,
candidate: T::AccountId
) -> DispatchResultWithPostInfo
pub fn execute_delegation_request( origin: OriginFor<T>, delegator: T::AccountId, candidate: T::AccountId ) -> DispatchResultWithPostInfo
Execute pending request to change an existing delegation
sourcepub fn cancel_delegation_request(
origin: OriginFor<T>,
candidate: T::AccountId
) -> DispatchResultWithPostInfo
pub fn cancel_delegation_request( origin: OriginFor<T>, candidate: T::AccountId ) -> DispatchResultWithPostInfo
Cancel request to change an existing delegation.
sourcepub fn set_auto_compound(
origin: OriginFor<T>,
candidate: T::AccountId,
value: Percent,
candidate_auto_compounding_delegation_count_hint: u32,
delegation_count_hint: u32
) -> DispatchResultWithPostInfo
pub fn set_auto_compound( origin: OriginFor<T>, candidate: T::AccountId, value: Percent, candidate_auto_compounding_delegation_count_hint: u32, delegation_count_hint: u32 ) -> DispatchResultWithPostInfo
Sets the auto-compounding reward percentage for a delegation.
sourcepub fn hotfix_remove_delegation_requests_exited_candidates(
origin: OriginFor<T>,
candidates: Vec<T::AccountId>
) -> DispatchResult
pub fn hotfix_remove_delegation_requests_exited_candidates( origin: OriginFor<T>, candidates: Vec<T::AccountId> ) -> DispatchResult
Hotfix to remove existing empty entries for candidates that have left.
sourcepub fn notify_inactive_collator(
origin: OriginFor<T>,
collator: T::AccountId
) -> DispatchResult
pub fn notify_inactive_collator( origin: OriginFor<T>, collator: T::AccountId ) -> DispatchResult
Notify a collator is inactive during MaxOfflineRounds
sourcepub fn enable_marking_offline(
origin: OriginFor<T>,
value: bool
) -> DispatchResult
pub fn enable_marking_offline( origin: OriginFor<T>, value: bool ) -> DispatchResult
Enable/Disable marking offline feature
sourcepub fn force_join_candidates(
origin: OriginFor<T>,
account: T::AccountId,
bond: BalanceOf<T>,
candidate_count: u32
) -> DispatchResultWithPostInfo
pub fn force_join_candidates( origin: OriginFor<T>, account: T::AccountId, bond: BalanceOf<T>, candidate_count: u32 ) -> DispatchResultWithPostInfo
Force join the set of collator candidates. It will skip the minimum required bond check.
sourcepub fn set_inflation_distribution_config(
origin: OriginFor<T>,
new: InflationDistributionConfig<T::AccountId>
) -> DispatchResultWithPostInfo
pub fn set_inflation_distribution_config( origin: OriginFor<T>, new: InflationDistributionConfig<T::AccountId> ) -> DispatchResultWithPostInfo
Set the inflation distribution configuration.
source§impl<T: Config> Pallet<T>
impl<T: Config> Pallet<T>
pub fn set_candidate_bond_to_zero(acc: &T::AccountId) -> Weight
pub fn is_delegator(acc: &T::AccountId) -> bool
pub fn is_candidate(acc: &T::AccountId) -> bool
pub fn is_selected_candidate(acc: &T::AccountId) -> bool
pub fn join_candidates_inner( acc: T::AccountId, bond: BalanceOf<T>, candidate_count: u32 ) -> DispatchResultWithPostInfo
pub fn go_offline_inner(collator: T::AccountId) -> DispatchResultWithPostInfo
pub fn go_online_inner(collator: T::AccountId) -> DispatchResultWithPostInfo
pub fn candidate_bond_more_inner( collator: T::AccountId, more: BalanceOf<T> ) -> DispatchResultWithPostInfo
pub fn execute_candidate_bond_less_inner( candidate: T::AccountId ) -> DispatchResultWithPostInfo
pub fn execute_leave_candidates_inner( candidate: T::AccountId ) -> DispatchResultWithPostInfo
sourcepub fn get_delegator_stakable_balance(acc: &T::AccountId) -> BalanceOf<T>
pub fn get_delegator_stakable_balance(acc: &T::AccountId) -> BalanceOf<T>
Returns an account’s stakable balance which is not locked in delegation staking
sourcepub fn get_collator_stakable_free_balance(acc: &T::AccountId) -> BalanceOf<T>
pub fn get_collator_stakable_free_balance(acc: &T::AccountId) -> BalanceOf<T>
Returns an account’s free balance which is not locked in collator staking
sourcepub fn delegation_auto_compound(
candidate: &T::AccountId,
delegator: &T::AccountId
) -> Percent
pub fn delegation_auto_compound( candidate: &T::AccountId, delegator: &T::AccountId ) -> Percent
Returns a delegations auto-compound value.
sourcepub fn compute_top_candidates() -> Vec<T::AccountId>
pub fn compute_top_candidates() -> Vec<T::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::AccountId,
candidate: T::AccountId,
more: BalanceOf<T>
) -> Result<(bool, Weight), DispatchErrorWithPostInfo<PostDispatchInfo>>
pub fn delegation_bond_more_without_event( delegator: T::AccountId, candidate: T::AccountId, more: BalanceOf<T> ) -> 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: BalanceOf<T>, to: T::AccountId)
pub fn mint(amt: BalanceOf<T>, to: T::AccountId)
Mint a specified reward amount to the beneficiary account. Emits the [Rewarded] event.
sourcepub fn mint_collator_reward(
_paid_for_round: RoundIndex,
collator_id: T::AccountId,
amt: BalanceOf<T>
) -> Weight
pub fn mint_collator_reward( _paid_for_round: RoundIndex, collator_id: T::AccountId, amt: BalanceOf<T> ) -> Weight
Mint a specified reward amount to the collator’s account. Emits the [Rewarded] event.
sourcepub fn mint_and_compound(
amt: BalanceOf<T>,
compound_percent: Percent,
candidate: T::AccountId,
delegator: T::AccountId
)
pub fn mint_and_compound( amt: BalanceOf<T>, compound_percent: Percent, candidate: T::AccountId, delegator: T::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.
source§impl<T: Config> Pallet<T>
impl<T: Config> Pallet<T>
sourcepub fn collator_commission() -> Perbill
pub fn collator_commission() -> Perbill
An auto-generated getter for CollatorCommission
.
source§impl<T: Config> Pallet<T>
impl<T: Config> Pallet<T>
sourcepub fn total_selected() -> u32
pub fn total_selected() -> u32
An auto-generated getter for TotalSelected
.
source§impl<T: Config> Pallet<T>
impl<T: Config> Pallet<T>
sourcepub fn inflation_distribution_info(
) -> InflationDistributionConfig<T::AccountId>
pub fn inflation_distribution_info( ) -> InflationDistributionConfig<T::AccountId>
An auto-generated getter for InflationDistributionInfo
.
source§impl<T: Config> Pallet<T>
impl<T: Config> Pallet<T>
sourcepub fn delegator_state<KArg>(
k: KArg
) -> Option<Delegator<T::AccountId, BalanceOf<T>>>where
KArg: EncodeLike<T::AccountId>,
pub fn delegator_state<KArg>(
k: KArg
) -> Option<Delegator<T::AccountId, BalanceOf<T>>>where
KArg: EncodeLike<T::AccountId>,
An auto-generated getter for DelegatorState
.
source§impl<T: Config> Pallet<T>
impl<T: Config> Pallet<T>
sourcepub fn candidate_info<KArg>(k: KArg) -> Option<CandidateMetadata<BalanceOf<T>>>where
KArg: EncodeLike<T::AccountId>,
pub fn candidate_info<KArg>(k: KArg) -> Option<CandidateMetadata<BalanceOf<T>>>where
KArg: EncodeLike<T::AccountId>,
An auto-generated getter for CandidateInfo
.
source§impl<T: Config> Pallet<T>
impl<T: Config> Pallet<T>
sourcepub fn delegation_scheduled_requests<KArg>(
k: KArg
) -> BoundedVec<ScheduledRequest<T::AccountId, BalanceOf<T>>, AddGet<T::MaxTopDelegationsPerCandidate, T::MaxBottomDelegationsPerCandidate>>where
KArg: EncodeLike<T::AccountId>,
pub fn delegation_scheduled_requests<KArg>(
k: KArg
) -> BoundedVec<ScheduledRequest<T::AccountId, BalanceOf<T>>, AddGet<T::MaxTopDelegationsPerCandidate, T::MaxBottomDelegationsPerCandidate>>where
KArg: EncodeLike<T::AccountId>,
An auto-generated getter for DelegationScheduledRequests
.
source§impl<T: Config> Pallet<T>
impl<T: Config> Pallet<T>
sourcepub fn auto_compounding_delegations<KArg>(
k: KArg
) -> BoundedVec<AutoCompoundConfig<T::AccountId>, AddGet<T::MaxTopDelegationsPerCandidate, T::MaxBottomDelegationsPerCandidate>>where
KArg: EncodeLike<T::AccountId>,
pub fn auto_compounding_delegations<KArg>(
k: KArg
) -> BoundedVec<AutoCompoundConfig<T::AccountId>, AddGet<T::MaxTopDelegationsPerCandidate, T::MaxBottomDelegationsPerCandidate>>where
KArg: EncodeLike<T::AccountId>,
An auto-generated getter for AutoCompoundingDelegations
.
source§impl<T: Config> Pallet<T>
impl<T: Config> Pallet<T>
sourcepub fn top_delegations<KArg>(
k: KArg
) -> Option<Delegations<T::AccountId, BalanceOf<T>>>where
KArg: EncodeLike<T::AccountId>,
pub fn top_delegations<KArg>(
k: KArg
) -> Option<Delegations<T::AccountId, BalanceOf<T>>>where
KArg: EncodeLike<T::AccountId>,
An auto-generated getter for TopDelegations
.
source§impl<T: Config> Pallet<T>
impl<T: Config> Pallet<T>
sourcepub fn bottom_delegations<KArg>(
k: KArg
) -> Option<Delegations<T::AccountId, BalanceOf<T>>>where
KArg: EncodeLike<T::AccountId>,
pub fn bottom_delegations<KArg>(
k: KArg
) -> Option<Delegations<T::AccountId, BalanceOf<T>>>where
KArg: EncodeLike<T::AccountId>,
An auto-generated getter for BottomDelegations
.
source§impl<T: Config> Pallet<T>
impl<T: Config> Pallet<T>
sourcepub fn selected_candidates() -> BoundedVec<T::AccountId, T::MaxCandidates>
pub fn selected_candidates() -> BoundedVec<T::AccountId, T::MaxCandidates>
An auto-generated getter for SelectedCandidates
.
source§impl<T: Config> Pallet<T>
impl<T: Config> Pallet<T>
sourcepub fn candidate_pool(
) -> BoundedOrderedSet<Bond<T::AccountId, BalanceOf<T>>, T::MaxCandidates>
pub fn candidate_pool( ) -> BoundedOrderedSet<Bond<T::AccountId, BalanceOf<T>>, T::MaxCandidates>
An auto-generated getter for CandidatePool
.
source§impl<T: Config> Pallet<T>
impl<T: Config> Pallet<T>
sourcepub fn at_stake<KArg1, KArg2>(
k1: KArg1,
k2: KArg2
) -> Option<CollatorSnapshot<T::AccountId, BalanceOf<T>>>where
KArg1: EncodeLike<RoundIndex>,
KArg2: EncodeLike<T::AccountId>,
pub fn at_stake<KArg1, KArg2>(
k1: KArg1,
k2: KArg2
) -> Option<CollatorSnapshot<T::AccountId, BalanceOf<T>>>where
KArg1: EncodeLike<RoundIndex>,
KArg2: EncodeLike<T::AccountId>,
An auto-generated getter for AtStake
.
source§impl<T: Config> Pallet<T>
impl<T: Config> Pallet<T>
sourcepub fn delayed_payouts<KArg>(k: KArg) -> Option<DelayedPayout<BalanceOf<T>>>where
KArg: EncodeLike<RoundIndex>,
pub fn delayed_payouts<KArg>(k: KArg) -> Option<DelayedPayout<BalanceOf<T>>>where
KArg: EncodeLike<RoundIndex>,
An auto-generated getter for DelayedPayouts
.
source§impl<T: Config> Pallet<T>
impl<T: Config> Pallet<T>
sourcepub fn inflation_config() -> InflationInfo<BalanceOf<T>>
pub fn inflation_config() -> InflationInfo<BalanceOf<T>>
An auto-generated getter for InflationConfig
.
source§impl<T: Config> Pallet<T>
impl<T: Config> Pallet<T>
sourcepub fn points<KArg>(k: KArg) -> u32where
KArg: EncodeLike<RoundIndex>,
pub fn points<KArg>(k: KArg) -> u32where
KArg: EncodeLike<RoundIndex>,
An auto-generated getter for Points
.
source§impl<T: Config> Pallet<T>
impl<T: Config> Pallet<T>
sourcepub fn awarded_pts<KArg1, KArg2>(k1: KArg1, k2: KArg2) -> u32where
KArg1: EncodeLike<RoundIndex>,
KArg2: EncodeLike<T::AccountId>,
pub fn awarded_pts<KArg1, KArg2>(k1: KArg1, k2: KArg2) -> u32where
KArg1: EncodeLike<RoundIndex>,
KArg2: EncodeLike<T::AccountId>,
An auto-generated getter for AwardedPts
.
source§impl<T: Config> Pallet<T>
impl<T: Config> Pallet<T>
sourcepub fn marking_offline() -> bool
pub fn marking_offline() -> bool
An auto-generated getter for EnableMarkingOffline
.
Trait Implementations§
source§impl<T: Config> BeforeAllRuntimeMigrations for Pallet<T>
impl<T: Config> BeforeAllRuntimeMigrations for Pallet<T>
source§fn before_all_runtime_migrations() -> Weight
fn before_all_runtime_migrations() -> Weight
source§impl<T: Config> GetStorageVersion for Pallet<T>
impl<T: Config> GetStorageVersion for Pallet<T>
§type InCodeStorageVersion = NoStorageVersionSet
type InCodeStorageVersion = NoStorageVersionSet
source§fn in_code_storage_version() -> Self::InCodeStorageVersion
fn in_code_storage_version() -> Self::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: Config> Hooks<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>
impl<T: Config> Hooks<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>
source§fn on_initialize(n: BlockNumberFor<T>) -> Weight
fn on_initialize(n: BlockNumberFor<T>) -> Weight
source§fn on_finalize(_n: BlockNumberFor<T>)
fn on_finalize(_n: BlockNumberFor<T>)
§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: Config> IntegrityTest for Pallet<T>
impl<T: Config> IntegrityTest for Pallet<T>
source§fn integrity_test()
fn integrity_test()
Hooks::integrity_test
].source§impl<T: Config> OffchainWorker<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>
impl<T: Config> OffchainWorker<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>
source§fn offchain_worker(n: BlockNumberFor<T>)
fn offchain_worker(n: BlockNumberFor<T>)
source§impl<T: Config> OnFinalize<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>
impl<T: Config> OnFinalize<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>
source§fn on_finalize(n: BlockNumberFor<T>)
fn on_finalize(n: BlockNumberFor<T>)
Hooks::on_finalize
].source§impl<T: Config> OnGenesis for Pallet<T>
impl<T: Config> OnGenesis for Pallet<T>
source§fn on_genesis()
fn on_genesis()
source§impl<T: Config> OnIdle<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>
impl<T: Config> OnIdle<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>
source§impl<T: Config> OnInitialize<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>
impl<T: Config> OnInitialize<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>
source§fn on_initialize(n: BlockNumberFor<T>) -> Weight
fn on_initialize(n: BlockNumberFor<T>) -> Weight
Hooks::on_initialize
].source§impl<T: Config> OnPoll<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>
impl<T: Config> OnPoll<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>
source§impl<T: Config> OnRuntimeUpgrade for Pallet<T>
impl<T: Config> OnRuntimeUpgrade for Pallet<T>
source§fn on_runtime_upgrade() -> Weight
fn on_runtime_upgrade() -> Weight
Hooks::on_runtime_upgrade
].source§impl<T: Config> PalletInfoAccess for Pallet<T>
impl<T: Config> PalletInfoAccess for Pallet<T>
source§fn module_name() -> &'static str
fn module_name() -> &'static str
source§fn crate_version() -> CrateVersion
fn crate_version() -> CrateVersion
source§impl<T> PartialEq for Pallet<T>
impl<T> PartialEq for Pallet<T>
source§impl<T: Config> WhitelistedStorageKeys for Pallet<T>
impl<T: Config> WhitelistedStorageKeys for Pallet<T>
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.impl<T> Eq for Pallet<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for Pallet<T>where
T: RefUnwindSafe,
impl<T> Send for Pallet<T>where
T: Send,
impl<T> Sync for Pallet<T>where
T: Sync,
impl<T> Unpin for Pallet<T>where
T: Unpin,
impl<T> UnwindSafe for Pallet<T>where
T: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CheckedConversion for T
impl<T> CheckedConversion for T
§fn checked_from<T>(t: T) -> Option<Self>where
Self: TryFrom<T>,
fn checked_from<T>(t: T) -> Option<Self>where
Self: TryFrom<T>,
§fn checked_into<T>(self) -> Option<T>where
Self: TryInto<T>,
fn checked_into<T>(self) -> Option<T>where
Self: TryInto<T>,
§impl<T> Conv for T
impl<T> Conv for T
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self
to use its Binary
implementation when Debug
-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self
to use its Display
implementation when
Debug
-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self
to use its LowerExp
implementation when
Debug
-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self
to use its LowerHex
implementation when
Debug
-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self
to use its Octal
implementation when Debug
-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self
to use its Pointer
implementation when
Debug
-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self
to use its UpperExp
implementation when
Debug
-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self
to use its UpperHex
implementation when
Debug
-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<T> IsType<T> for T
impl<T> IsType<T> for T
§impl<T, Outer> IsWrappedBy<Outer> for T
impl<T, Outer> IsWrappedBy<Outer> for T
source§impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
source§fn lossy_into(self) -> Dst
fn lossy_into(self) -> Dst
§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self
, then passes self.as_ref()
into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self
, then passes self.as_mut()
into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self
, then passes self.deref()
into the pipe function.§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
§fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
§fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
T
. Read more§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B>
of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B>
of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R>
view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R>
view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target
of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target
of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap()
only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut()
only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow()
only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut()
only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref()
only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut()
only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref()
only in debug builds, and is erased in release
builds.§impl<T> TryConv for T
impl<T> TryConv for T
§impl<T, U> TryIntoKey<U> for Twhere
U: TryFromKey<T>,
impl<T, U> TryIntoKey<U> for Twhere
U: TryFromKey<T>,
type Error = <U as TryFromKey<T>>::Error
fn try_into_key(self) -> Result<U, <U as TryFromKey<T>>::Error>
§impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
§fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
unchecked_from
.§impl<T, S> UniqueSaturatedInto<T> for S
impl<T, S> UniqueSaturatedInto<T> for S
§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
T
.