pub struct StorageApi;Implementations§
Source§impl StorageApi
impl StorageApi
Sourcepub fn validator_count(&self) -> StaticAddress<(), ValidatorCount, Yes, Yes, ()>
pub fn validator_count(&self) -> StaticAddress<(), ValidatorCount, Yes, Yes, ()>
The ideal number of active validators.
Sourcepub fn minimum_validator_count(
&self,
) -> StaticAddress<(), MinimumValidatorCount, Yes, Yes, ()>
pub fn minimum_validator_count( &self, ) -> StaticAddress<(), MinimumValidatorCount, Yes, Yes, ()>
Minimum number of staking participants before emergency conditions are imposed.
Sourcepub fn invulnerables(&self) -> StaticAddress<(), Invulnerables, Yes, Yes, ()>
pub fn invulnerables(&self) -> StaticAddress<(), Invulnerables, Yes, Yes, ()>
Any validators that may never be slashed or forcibly kicked. It’s a Vec since they’re easy to initialize and the performance hit is minimal (we expect no more than four invulnerables) and restricted to testnets.
Sourcepub fn bonded_iter(&self) -> StaticAddress<(), Bonded, (), (), Yes>
pub fn bonded_iter(&self) -> StaticAddress<(), Bonded, (), (), Yes>
Map from all locked “stash” accounts to the controller account.
TWOX-NOTE: SAFE since AccountId is a secure hash.
Sourcepub fn bonded(
&self,
_0: impl Borrow<Param0>,
) -> StaticAddress<StaticStorageKey<Param0>, Bonded, Yes, (), ()>
pub fn bonded( &self, _0: impl Borrow<Param0>, ) -> StaticAddress<StaticStorageKey<Param0>, Bonded, Yes, (), ()>
Map from all locked “stash” accounts to the controller account.
TWOX-NOTE: SAFE since AccountId is a secure hash.
Sourcepub fn min_nominator_bond(
&self,
) -> StaticAddress<(), MinNominatorBond, Yes, Yes, ()>
pub fn min_nominator_bond( &self, ) -> StaticAddress<(), MinNominatorBond, Yes, Yes, ()>
The minimum active bond to become and maintain the role of a nominator.
Sourcepub fn min_validator_bond(
&self,
) -> StaticAddress<(), MinValidatorBond, Yes, Yes, ()>
pub fn min_validator_bond( &self, ) -> StaticAddress<(), MinValidatorBond, Yes, Yes, ()>
The minimum active bond to become and maintain the role of a validator.
Sourcepub fn minimum_active_stake(
&self,
) -> StaticAddress<(), MinimumActiveStake, Yes, Yes, ()>
pub fn minimum_active_stake( &self, ) -> StaticAddress<(), MinimumActiveStake, Yes, Yes, ()>
The minimum active nominator stake of the last successful election.
Sourcepub fn min_commission(&self) -> StaticAddress<(), MinCommission, Yes, Yes, ()>
pub fn min_commission(&self) -> StaticAddress<(), MinCommission, Yes, Yes, ()>
The minimum amount of commission that validators can set.
If set to 0, no limit exists.
Sourcepub fn ledger_iter(&self) -> StaticAddress<(), Ledger, (), (), Yes>
pub fn ledger_iter(&self) -> StaticAddress<(), Ledger, (), (), Yes>
Map from all (unlocked) “controller” accounts to the info regarding the staking.
Note: All the reads and mutations to this storage MUST be done through the methods exposed
by [StakingLedger] to ensure data and lock consistency.
Sourcepub fn ledger(
&self,
_0: impl Borrow<Param0>,
) -> StaticAddress<StaticStorageKey<Param0>, Ledger, Yes, (), ()>
pub fn ledger( &self, _0: impl Borrow<Param0>, ) -> StaticAddress<StaticStorageKey<Param0>, Ledger, Yes, (), ()>
Map from all (unlocked) “controller” accounts to the info regarding the staking.
Note: All the reads and mutations to this storage MUST be done through the methods exposed
by [StakingLedger] to ensure data and lock consistency.
Sourcepub fn payee_iter(&self) -> StaticAddress<(), Payee, (), (), Yes>
pub fn payee_iter(&self) -> StaticAddress<(), Payee, (), (), Yes>
Where the reward payment should be made. Keyed by stash.
TWOX-NOTE: SAFE since AccountId is a secure hash.
Sourcepub fn payee(
&self,
_0: impl Borrow<Param0>,
) -> StaticAddress<StaticStorageKey<Param0>, Payee, Yes, (), ()>
pub fn payee( &self, _0: impl Borrow<Param0>, ) -> StaticAddress<StaticStorageKey<Param0>, Payee, Yes, (), ()>
Where the reward payment should be made. Keyed by stash.
TWOX-NOTE: SAFE since AccountId is a secure hash.
Sourcepub fn validators_iter(&self) -> StaticAddress<(), Validators, (), Yes, Yes>
pub fn validators_iter(&self) -> StaticAddress<(), Validators, (), Yes, Yes>
The map from (wannabe) validator stash key to the preferences of that validator.
TWOX-NOTE: SAFE since AccountId is a secure hash.
Sourcepub fn validators(
&self,
_0: impl Borrow<Param0>,
) -> StaticAddress<StaticStorageKey<Param0>, Validators, Yes, Yes, ()>
pub fn validators( &self, _0: impl Borrow<Param0>, ) -> StaticAddress<StaticStorageKey<Param0>, Validators, Yes, Yes, ()>
The map from (wannabe) validator stash key to the preferences of that validator.
TWOX-NOTE: SAFE since AccountId is a secure hash.
Sourcepub fn counter_for_validators(
&self,
) -> StaticAddress<(), CounterForValidators, Yes, Yes, ()>
pub fn counter_for_validators( &self, ) -> StaticAddress<(), CounterForValidators, Yes, Yes, ()>
Counter for the related counted storage map
Sourcepub fn max_validators_count(
&self,
) -> StaticAddress<(), MaxValidatorsCount, Yes, (), ()>
pub fn max_validators_count( &self, ) -> StaticAddress<(), MaxValidatorsCount, Yes, (), ()>
The maximum validator count before we stop allowing new validators to join.
When this value is not set, no limits are enforced.
Sourcepub fn nominators_iter(&self) -> StaticAddress<(), Nominators, (), (), Yes>
pub fn nominators_iter(&self) -> StaticAddress<(), Nominators, (), (), Yes>
The map from nominator stash key to their nomination preferences, namely the validators that they wish to support.
Note that the keys of this storage map might become non-decodable in case the
account’s [NominationsQuota::MaxNominations] configuration is decreased.
In this rare case, these nominators
are still existent in storage, their key is correct and retrievable (i.e. contains_key
indicates that they exist), but their value cannot be decoded. Therefore, the non-decodable
nominators will effectively not-exist, until they re-submit their preferences such that it
is within the bounds of the newly set Config::MaxNominations.
This implies that ::iter_keys().count() and ::iter().count() might return different
values for this map. Moreover, the main ::count() is aligned with the former, namely the
number of keys that exist.
Lastly, if any of the nominators become non-decodable, they can be chilled immediately via
[Call::chill_other] dispatchable by anyone.
TWOX-NOTE: SAFE since AccountId is a secure hash.
Sourcepub fn nominators(
&self,
_0: impl Borrow<Param0>,
) -> StaticAddress<StaticStorageKey<Param0>, Nominators, Yes, (), ()>
pub fn nominators( &self, _0: impl Borrow<Param0>, ) -> StaticAddress<StaticStorageKey<Param0>, Nominators, Yes, (), ()>
The map from nominator stash key to their nomination preferences, namely the validators that they wish to support.
Note that the keys of this storage map might become non-decodable in case the
account’s [NominationsQuota::MaxNominations] configuration is decreased.
In this rare case, these nominators
are still existent in storage, their key is correct and retrievable (i.e. contains_key
indicates that they exist), but their value cannot be decoded. Therefore, the non-decodable
nominators will effectively not-exist, until they re-submit their preferences such that it
is within the bounds of the newly set Config::MaxNominations.
This implies that ::iter_keys().count() and ::iter().count() might return different
values for this map. Moreover, the main ::count() is aligned with the former, namely the
number of keys that exist.
Lastly, if any of the nominators become non-decodable, they can be chilled immediately via
[Call::chill_other] dispatchable by anyone.
TWOX-NOTE: SAFE since AccountId is a secure hash.
Sourcepub fn counter_for_nominators(
&self,
) -> StaticAddress<(), CounterForNominators, Yes, Yes, ()>
pub fn counter_for_nominators( &self, ) -> StaticAddress<(), CounterForNominators, Yes, Yes, ()>
Counter for the related counted storage map
Sourcepub fn virtual_stakers_iter(
&self,
) -> StaticAddress<(), VirtualStakers, (), (), Yes>
pub fn virtual_stakers_iter( &self, ) -> StaticAddress<(), VirtualStakers, (), (), Yes>
Stakers whose funds are managed by other pallets.
This pallet does not apply any locks on them, therefore they are only virtually bonded. They are expected to be keyless accounts and hence should not be allowed to mutate their ledger directly via this pallet. Instead, these accounts are managed by other pallets and accessed via low level apis. We keep track of them to do minimal integrity checks.
Sourcepub fn virtual_stakers(
&self,
_0: impl Borrow<Param0>,
) -> StaticAddress<StaticStorageKey<Param0>, VirtualStakers, Yes, (), ()>
pub fn virtual_stakers( &self, _0: impl Borrow<Param0>, ) -> StaticAddress<StaticStorageKey<Param0>, VirtualStakers, Yes, (), ()>
Stakers whose funds are managed by other pallets.
This pallet does not apply any locks on them, therefore they are only virtually bonded. They are expected to be keyless accounts and hence should not be allowed to mutate their ledger directly via this pallet. Instead, these accounts are managed by other pallets and accessed via low level apis. We keep track of them to do minimal integrity checks.
Sourcepub fn counter_for_virtual_stakers(
&self,
) -> StaticAddress<(), CounterForVirtualStakers, Yes, Yes, ()>
pub fn counter_for_virtual_stakers( &self, ) -> StaticAddress<(), CounterForVirtualStakers, Yes, Yes, ()>
Counter for the related counted storage map
Sourcepub fn max_nominators_count(
&self,
) -> StaticAddress<(), MaxNominatorsCount, Yes, (), ()>
pub fn max_nominators_count( &self, ) -> StaticAddress<(), MaxNominatorsCount, Yes, (), ()>
The maximum nominator count before we stop allowing new validators to join.
When this value is not set, no limits are enforced.
Sourcepub fn current_era(&self) -> StaticAddress<(), CurrentEra, Yes, (), ()>
pub fn current_era(&self) -> StaticAddress<(), CurrentEra, Yes, (), ()>
The current era index.
This is the latest planned era, depending on how the Session pallet queues the validator set, it might be active or not.
Sourcepub fn active_era(&self) -> StaticAddress<(), ActiveEra, Yes, (), ()>
pub fn active_era(&self) -> StaticAddress<(), ActiveEra, Yes, (), ()>
The active era information, it holds index and start.
The active era is the era being currently rewarded. Validator set of this era must be
equal to [SessionInterface::validators].
Sourcepub fn eras_start_session_index_iter(
&self,
) -> StaticAddress<(), ErasStartSessionIndex, (), (), Yes>
pub fn eras_start_session_index_iter( &self, ) -> StaticAddress<(), ErasStartSessionIndex, (), (), Yes>
The session index at which the era start for the last [Config::HistoryDepth] eras.
Note: This tracks the starting session (i.e. session index when era start being active)
for the eras in [CurrentEra - HISTORY_DEPTH, CurrentEra].
Sourcepub fn eras_start_session_index(
&self,
_0: impl Borrow<Param0>,
) -> StaticAddress<StaticStorageKey<Param0>, ErasStartSessionIndex, Yes, (), ()>
pub fn eras_start_session_index( &self, _0: impl Borrow<Param0>, ) -> StaticAddress<StaticStorageKey<Param0>, ErasStartSessionIndex, Yes, (), ()>
The session index at which the era start for the last [Config::HistoryDepth] eras.
Note: This tracks the starting session (i.e. session index when era start being active)
for the eras in [CurrentEra - HISTORY_DEPTH, CurrentEra].
Sourcepub fn eras_stakers_iter(&self) -> StaticAddress<(), ErasStakers, (), Yes, Yes>
pub fn eras_stakers_iter(&self) -> StaticAddress<(), ErasStakers, (), Yes, Yes>
Exposure of validator at era.
This is keyed first by the era index to allow bulk deletion and then the stash account.
Is it removed after [Config::HistoryDepth] eras.
If stakers hasn’t been set or has been removed then empty exposure is returned.
Note: Deprecated since v14. Use EraInfo instead to work with exposures.
Sourcepub fn eras_stakers_iter1(
&self,
_0: impl Borrow<Param0>,
) -> StaticAddress<StaticStorageKey<Param0>, ErasStakers, (), Yes, Yes>
pub fn eras_stakers_iter1( &self, _0: impl Borrow<Param0>, ) -> StaticAddress<StaticStorageKey<Param0>, ErasStakers, (), Yes, Yes>
Exposure of validator at era.
This is keyed first by the era index to allow bulk deletion and then the stash account.
Is it removed after [Config::HistoryDepth] eras.
If stakers hasn’t been set or has been removed then empty exposure is returned.
Note: Deprecated since v14. Use EraInfo instead to work with exposures.
Sourcepub fn eras_stakers(
&self,
_0: impl Borrow<Param0>,
_1: impl Borrow<Param1>,
) -> StaticAddress<(StaticStorageKey<Param0>, StaticStorageKey<Param1>), ErasStakers, Yes, Yes, ()>
pub fn eras_stakers( &self, _0: impl Borrow<Param0>, _1: impl Borrow<Param1>, ) -> StaticAddress<(StaticStorageKey<Param0>, StaticStorageKey<Param1>), ErasStakers, Yes, Yes, ()>
Exposure of validator at era.
This is keyed first by the era index to allow bulk deletion and then the stash account.
Is it removed after [Config::HistoryDepth] eras.
If stakers hasn’t been set or has been removed then empty exposure is returned.
Note: Deprecated since v14. Use EraInfo instead to work with exposures.
Sourcepub fn eras_stakers_overview_iter(
&self,
) -> StaticAddress<(), ErasStakersOverview, (), (), Yes>
pub fn eras_stakers_overview_iter( &self, ) -> StaticAddress<(), ErasStakersOverview, (), (), Yes>
Summary of validator exposure at a given era.
This contains the total stake in support of the validator and their own stake. In addition, it can also be used to get the number of nominators backing this validator and the number of exposure pages they are divided into. The page count is useful to determine the number of pages of rewards that needs to be claimed.
This is keyed first by the era index to allow bulk deletion and then the stash account.
Should only be accessed through EraInfo.
Is it removed after [Config::HistoryDepth] eras.
If stakers hasn’t been set or has been removed then empty overview is returned.
Sourcepub fn eras_stakers_overview_iter1(
&self,
_0: impl Borrow<Param0>,
) -> StaticAddress<StaticStorageKey<Param0>, ErasStakersOverview, (), (), Yes>
pub fn eras_stakers_overview_iter1( &self, _0: impl Borrow<Param0>, ) -> StaticAddress<StaticStorageKey<Param0>, ErasStakersOverview, (), (), Yes>
Summary of validator exposure at a given era.
This contains the total stake in support of the validator and their own stake. In addition, it can also be used to get the number of nominators backing this validator and the number of exposure pages they are divided into. The page count is useful to determine the number of pages of rewards that needs to be claimed.
This is keyed first by the era index to allow bulk deletion and then the stash account.
Should only be accessed through EraInfo.
Is it removed after [Config::HistoryDepth] eras.
If stakers hasn’t been set or has been removed then empty overview is returned.
Sourcepub fn eras_stakers_overview(
&self,
_0: impl Borrow<Param0>,
_1: impl Borrow<Param1>,
) -> StaticAddress<(StaticStorageKey<Param0>, StaticStorageKey<Param1>), ErasStakersOverview, Yes, (), ()>
pub fn eras_stakers_overview( &self, _0: impl Borrow<Param0>, _1: impl Borrow<Param1>, ) -> StaticAddress<(StaticStorageKey<Param0>, StaticStorageKey<Param1>), ErasStakersOverview, Yes, (), ()>
Summary of validator exposure at a given era.
This contains the total stake in support of the validator and their own stake. In addition, it can also be used to get the number of nominators backing this validator and the number of exposure pages they are divided into. The page count is useful to determine the number of pages of rewards that needs to be claimed.
This is keyed first by the era index to allow bulk deletion and then the stash account.
Should only be accessed through EraInfo.
Is it removed after [Config::HistoryDepth] eras.
If stakers hasn’t been set or has been removed then empty overview is returned.
Sourcepub fn eras_stakers_clipped_iter(
&self,
) -> StaticAddress<(), ErasStakersClipped, (), Yes, Yes>
pub fn eras_stakers_clipped_iter( &self, ) -> StaticAddress<(), ErasStakersClipped, (), Yes, Yes>
Clipped Exposure of validator at era.
Note: This is deprecated, should be used as read-only and will be removed in the future.
New Exposures are stored in a paged manner in ErasStakersPaged instead.
This is similar to [ErasStakers] but number of nominators exposed is reduced to the
T::MaxExposurePageSize biggest stakers.
(Note: the field total and own of the exposure remains unchanged).
This is used to limit the i/o cost for the nominator payout.
This is keyed fist by the era index to allow bulk deletion and then the stash account.
It is removed after [Config::HistoryDepth] eras.
If stakers hasn’t been set or has been removed then empty exposure is returned.
Note: Deprecated since v14. Use EraInfo instead to work with exposures.
Sourcepub fn eras_stakers_clipped_iter1(
&self,
_0: impl Borrow<Param0>,
) -> StaticAddress<StaticStorageKey<Param0>, ErasStakersClipped, (), Yes, Yes>
pub fn eras_stakers_clipped_iter1( &self, _0: impl Borrow<Param0>, ) -> StaticAddress<StaticStorageKey<Param0>, ErasStakersClipped, (), Yes, Yes>
Clipped Exposure of validator at era.
Note: This is deprecated, should be used as read-only and will be removed in the future.
New Exposures are stored in a paged manner in ErasStakersPaged instead.
This is similar to [ErasStakers] but number of nominators exposed is reduced to the
T::MaxExposurePageSize biggest stakers.
(Note: the field total and own of the exposure remains unchanged).
This is used to limit the i/o cost for the nominator payout.
This is keyed fist by the era index to allow bulk deletion and then the stash account.
It is removed after [Config::HistoryDepth] eras.
If stakers hasn’t been set or has been removed then empty exposure is returned.
Note: Deprecated since v14. Use EraInfo instead to work with exposures.
Sourcepub fn eras_stakers_clipped(
&self,
_0: impl Borrow<Param0>,
_1: impl Borrow<Param1>,
) -> StaticAddress<(StaticStorageKey<Param0>, StaticStorageKey<Param1>), ErasStakersClipped, Yes, Yes, ()>
pub fn eras_stakers_clipped( &self, _0: impl Borrow<Param0>, _1: impl Borrow<Param1>, ) -> StaticAddress<(StaticStorageKey<Param0>, StaticStorageKey<Param1>), ErasStakersClipped, Yes, Yes, ()>
Clipped Exposure of validator at era.
Note: This is deprecated, should be used as read-only and will be removed in the future.
New Exposures are stored in a paged manner in ErasStakersPaged instead.
This is similar to [ErasStakers] but number of nominators exposed is reduced to the
T::MaxExposurePageSize biggest stakers.
(Note: the field total and own of the exposure remains unchanged).
This is used to limit the i/o cost for the nominator payout.
This is keyed fist by the era index to allow bulk deletion and then the stash account.
It is removed after [Config::HistoryDepth] eras.
If stakers hasn’t been set or has been removed then empty exposure is returned.
Note: Deprecated since v14. Use EraInfo instead to work with exposures.
Sourcepub fn eras_stakers_paged_iter(
&self,
) -> StaticAddress<(), ErasStakersPaged, (), (), Yes>
pub fn eras_stakers_paged_iter( &self, ) -> StaticAddress<(), ErasStakersPaged, (), (), Yes>
Paginated exposure of a validator at given era.
This is keyed first by the era index to allow bulk deletion, then stash account and finally
the page. Should only be accessed through EraInfo.
This is cleared after [Config::HistoryDepth] eras.
Sourcepub fn eras_stakers_paged_iter1(
&self,
_0: impl Borrow<Param0>,
) -> StaticAddress<StaticStorageKey<Param0>, ErasStakersPaged, (), (), Yes>
pub fn eras_stakers_paged_iter1( &self, _0: impl Borrow<Param0>, ) -> StaticAddress<StaticStorageKey<Param0>, ErasStakersPaged, (), (), Yes>
Paginated exposure of a validator at given era.
This is keyed first by the era index to allow bulk deletion, then stash account and finally
the page. Should only be accessed through EraInfo.
This is cleared after [Config::HistoryDepth] eras.
Sourcepub fn eras_stakers_paged_iter2(
&self,
_0: impl Borrow<Param0>,
_1: impl Borrow<Param1>,
) -> StaticAddress<(StaticStorageKey<Param0>, StaticStorageKey<Param1>), ErasStakersPaged, (), (), Yes>
pub fn eras_stakers_paged_iter2( &self, _0: impl Borrow<Param0>, _1: impl Borrow<Param1>, ) -> StaticAddress<(StaticStorageKey<Param0>, StaticStorageKey<Param1>), ErasStakersPaged, (), (), Yes>
Paginated exposure of a validator at given era.
This is keyed first by the era index to allow bulk deletion, then stash account and finally
the page. Should only be accessed through EraInfo.
This is cleared after [Config::HistoryDepth] eras.
Sourcepub fn eras_stakers_paged(
&self,
_0: impl Borrow<Param0>,
_1: impl Borrow<Param1>,
_2: impl Borrow<Param2>,
) -> StaticAddress<(StaticStorageKey<Param0>, StaticStorageKey<Param1>, StaticStorageKey<Param2>), ErasStakersPaged, Yes, (), ()>
pub fn eras_stakers_paged( &self, _0: impl Borrow<Param0>, _1: impl Borrow<Param1>, _2: impl Borrow<Param2>, ) -> StaticAddress<(StaticStorageKey<Param0>, StaticStorageKey<Param1>, StaticStorageKey<Param2>), ErasStakersPaged, Yes, (), ()>
Paginated exposure of a validator at given era.
This is keyed first by the era index to allow bulk deletion, then stash account and finally
the page. Should only be accessed through EraInfo.
This is cleared after [Config::HistoryDepth] eras.
Sourcepub fn claimed_rewards_iter(
&self,
) -> StaticAddress<(), ClaimedRewards, (), Yes, Yes>
pub fn claimed_rewards_iter( &self, ) -> StaticAddress<(), ClaimedRewards, (), Yes, Yes>
History of claimed paged rewards by era and validator.
This is keyed by era and validator stash which maps to the set of page indexes which have been claimed.
It is removed after [Config::HistoryDepth] eras.
Sourcepub fn claimed_rewards_iter1(
&self,
_0: impl Borrow<Param0>,
) -> StaticAddress<StaticStorageKey<Param0>, ClaimedRewards, (), Yes, Yes>
pub fn claimed_rewards_iter1( &self, _0: impl Borrow<Param0>, ) -> StaticAddress<StaticStorageKey<Param0>, ClaimedRewards, (), Yes, Yes>
History of claimed paged rewards by era and validator.
This is keyed by era and validator stash which maps to the set of page indexes which have been claimed.
It is removed after [Config::HistoryDepth] eras.
Sourcepub fn claimed_rewards(
&self,
_0: impl Borrow<Param0>,
_1: impl Borrow<Param1>,
) -> StaticAddress<(StaticStorageKey<Param0>, StaticStorageKey<Param1>), ClaimedRewards, Yes, Yes, ()>
pub fn claimed_rewards( &self, _0: impl Borrow<Param0>, _1: impl Borrow<Param1>, ) -> StaticAddress<(StaticStorageKey<Param0>, StaticStorageKey<Param1>), ClaimedRewards, Yes, Yes, ()>
History of claimed paged rewards by era and validator.
This is keyed by era and validator stash which maps to the set of page indexes which have been claimed.
It is removed after [Config::HistoryDepth] eras.
Sourcepub fn eras_validator_prefs_iter(
&self,
) -> StaticAddress<(), ErasValidatorPrefs, (), Yes, Yes>
pub fn eras_validator_prefs_iter( &self, ) -> StaticAddress<(), ErasValidatorPrefs, (), Yes, Yes>
Similar to ErasStakers, this holds the preferences of validators.
This is keyed first by the era index to allow bulk deletion and then the stash account.
Is it removed after [Config::HistoryDepth] eras.
Sourcepub fn eras_validator_prefs_iter1(
&self,
_0: impl Borrow<Param0>,
) -> StaticAddress<StaticStorageKey<Param0>, ErasValidatorPrefs, (), Yes, Yes>
pub fn eras_validator_prefs_iter1( &self, _0: impl Borrow<Param0>, ) -> StaticAddress<StaticStorageKey<Param0>, ErasValidatorPrefs, (), Yes, Yes>
Similar to ErasStakers, this holds the preferences of validators.
This is keyed first by the era index to allow bulk deletion and then the stash account.
Is it removed after [Config::HistoryDepth] eras.
Sourcepub fn eras_validator_prefs(
&self,
_0: impl Borrow<Param0>,
_1: impl Borrow<Param1>,
) -> StaticAddress<(StaticStorageKey<Param0>, StaticStorageKey<Param1>), ErasValidatorPrefs, Yes, Yes, ()>
pub fn eras_validator_prefs( &self, _0: impl Borrow<Param0>, _1: impl Borrow<Param1>, ) -> StaticAddress<(StaticStorageKey<Param0>, StaticStorageKey<Param1>), ErasValidatorPrefs, Yes, Yes, ()>
Similar to ErasStakers, this holds the preferences of validators.
This is keyed first by the era index to allow bulk deletion and then the stash account.
Is it removed after [Config::HistoryDepth] eras.
Sourcepub fn eras_validator_reward_iter(
&self,
) -> StaticAddress<(), ErasValidatorReward, (), (), Yes>
pub fn eras_validator_reward_iter( &self, ) -> StaticAddress<(), ErasValidatorReward, (), (), Yes>
The total validator era payout for the last [Config::HistoryDepth] eras.
Eras that haven’t finished yet or has been removed doesn’t have reward.
Sourcepub fn eras_validator_reward(
&self,
_0: impl Borrow<Param0>,
) -> StaticAddress<StaticStorageKey<Param0>, ErasValidatorReward, Yes, (), ()>
pub fn eras_validator_reward( &self, _0: impl Borrow<Param0>, ) -> StaticAddress<StaticStorageKey<Param0>, ErasValidatorReward, Yes, (), ()>
The total validator era payout for the last [Config::HistoryDepth] eras.
Eras that haven’t finished yet or has been removed doesn’t have reward.
Sourcepub fn eras_reward_points_iter(
&self,
) -> StaticAddress<(), ErasRewardPoints, (), Yes, Yes>
pub fn eras_reward_points_iter( &self, ) -> StaticAddress<(), ErasRewardPoints, (), Yes, Yes>
Rewards for the last [Config::HistoryDepth] eras.
If reward hasn’t been set or has been removed then 0 reward is returned.
Sourcepub fn eras_reward_points(
&self,
_0: impl Borrow<Param0>,
) -> StaticAddress<StaticStorageKey<Param0>, ErasRewardPoints, Yes, Yes, ()>
pub fn eras_reward_points( &self, _0: impl Borrow<Param0>, ) -> StaticAddress<StaticStorageKey<Param0>, ErasRewardPoints, Yes, Yes, ()>
Rewards for the last [Config::HistoryDepth] eras.
If reward hasn’t been set or has been removed then 0 reward is returned.
Sourcepub fn eras_total_stake_iter(
&self,
) -> StaticAddress<(), ErasTotalStake, (), Yes, Yes>
pub fn eras_total_stake_iter( &self, ) -> StaticAddress<(), ErasTotalStake, (), Yes, Yes>
The total amount staked for the last [Config::HistoryDepth] eras.
If total hasn’t been set or has been removed then 0 stake is returned.
Sourcepub fn eras_total_stake(
&self,
_0: impl Borrow<Param0>,
) -> StaticAddress<StaticStorageKey<Param0>, ErasTotalStake, Yes, Yes, ()>
pub fn eras_total_stake( &self, _0: impl Borrow<Param0>, ) -> StaticAddress<StaticStorageKey<Param0>, ErasTotalStake, Yes, Yes, ()>
The total amount staked for the last [Config::HistoryDepth] eras.
If total hasn’t been set or has been removed then 0 stake is returned.
Sourcepub fn max_staked_rewards(
&self,
) -> StaticAddress<(), MaxStakedRewards, Yes, (), ()>
pub fn max_staked_rewards( &self, ) -> StaticAddress<(), MaxStakedRewards, Yes, (), ()>
Maximum staked rewards, i.e. the percentage of the era inflation that is used for stake rewards. See Era payout.
Sourcepub fn slash_reward_fraction(
&self,
) -> StaticAddress<(), SlashRewardFraction, Yes, Yes, ()>
pub fn slash_reward_fraction( &self, ) -> StaticAddress<(), SlashRewardFraction, Yes, Yes, ()>
The percentage of the slash that is distributed to reporters.
The rest of the slashed value is handled by the Slash.
Sourcepub fn canceled_slash_payout(
&self,
) -> StaticAddress<(), CanceledSlashPayout, Yes, Yes, ()>
pub fn canceled_slash_payout( &self, ) -> StaticAddress<(), CanceledSlashPayout, Yes, Yes, ()>
The amount of currency given to reporters of a slash event which was canceled by extraordinary circumstances (e.g. governance).
Sourcepub fn unapplied_slashes_iter(
&self,
) -> StaticAddress<(), UnappliedSlashes, (), Yes, Yes>
pub fn unapplied_slashes_iter( &self, ) -> StaticAddress<(), UnappliedSlashes, (), Yes, Yes>
All unapplied slashes that are queued for later.
Sourcepub fn unapplied_slashes(
&self,
_0: impl Borrow<Param0>,
) -> StaticAddress<StaticStorageKey<Param0>, UnappliedSlashes, Yes, Yes, ()>
pub fn unapplied_slashes( &self, _0: impl Borrow<Param0>, ) -> StaticAddress<StaticStorageKey<Param0>, UnappliedSlashes, Yes, Yes, ()>
All unapplied slashes that are queued for later.
Sourcepub fn bonded_eras(&self) -> StaticAddress<(), BondedEras, Yes, Yes, ()>
pub fn bonded_eras(&self) -> StaticAddress<(), BondedEras, Yes, Yes, ()>
A mapping from still-bonded eras to the first session index of that era.
Must contains information for eras for the range:
[active_era - bounding_duration; active_era]
Sourcepub fn validator_slash_in_era_iter(
&self,
) -> StaticAddress<(), ValidatorSlashInEra, (), (), Yes>
pub fn validator_slash_in_era_iter( &self, ) -> StaticAddress<(), ValidatorSlashInEra, (), (), Yes>
All slashing events on validators, mapped by era to the highest slash proportion and slash value of the era.
Sourcepub fn validator_slash_in_era_iter1(
&self,
_0: impl Borrow<Param0>,
) -> StaticAddress<StaticStorageKey<Param0>, ValidatorSlashInEra, (), (), Yes>
pub fn validator_slash_in_era_iter1( &self, _0: impl Borrow<Param0>, ) -> StaticAddress<StaticStorageKey<Param0>, ValidatorSlashInEra, (), (), Yes>
All slashing events on validators, mapped by era to the highest slash proportion and slash value of the era.
Sourcepub fn validator_slash_in_era(
&self,
_0: impl Borrow<Param0>,
_1: impl Borrow<Param1>,
) -> StaticAddress<(StaticStorageKey<Param0>, StaticStorageKey<Param1>), ValidatorSlashInEra, Yes, (), ()>
pub fn validator_slash_in_era( &self, _0: impl Borrow<Param0>, _1: impl Borrow<Param1>, ) -> StaticAddress<(StaticStorageKey<Param0>, StaticStorageKey<Param1>), ValidatorSlashInEra, Yes, (), ()>
All slashing events on validators, mapped by era to the highest slash proportion and slash value of the era.
Sourcepub fn nominator_slash_in_era_iter(
&self,
) -> StaticAddress<(), NominatorSlashInEra, (), (), Yes>
pub fn nominator_slash_in_era_iter( &self, ) -> StaticAddress<(), NominatorSlashInEra, (), (), Yes>
All slashing events on nominators, mapped by era to the highest slash value of the era.
Sourcepub fn nominator_slash_in_era_iter1(
&self,
_0: impl Borrow<Param0>,
) -> StaticAddress<StaticStorageKey<Param0>, NominatorSlashInEra, (), (), Yes>
pub fn nominator_slash_in_era_iter1( &self, _0: impl Borrow<Param0>, ) -> StaticAddress<StaticStorageKey<Param0>, NominatorSlashInEra, (), (), Yes>
All slashing events on nominators, mapped by era to the highest slash value of the era.
Sourcepub fn nominator_slash_in_era(
&self,
_0: impl Borrow<Param0>,
_1: impl Borrow<Param1>,
) -> StaticAddress<(StaticStorageKey<Param0>, StaticStorageKey<Param1>), NominatorSlashInEra, Yes, (), ()>
pub fn nominator_slash_in_era( &self, _0: impl Borrow<Param0>, _1: impl Borrow<Param1>, ) -> StaticAddress<(StaticStorageKey<Param0>, StaticStorageKey<Param1>), NominatorSlashInEra, Yes, (), ()>
All slashing events on nominators, mapped by era to the highest slash value of the era.
Sourcepub fn slashing_spans_iter(
&self,
) -> StaticAddress<(), SlashingSpans, (), (), Yes>
pub fn slashing_spans_iter( &self, ) -> StaticAddress<(), SlashingSpans, (), (), Yes>
Slashing spans for stash accounts.
Sourcepub fn slashing_spans(
&self,
_0: impl Borrow<Param0>,
) -> StaticAddress<StaticStorageKey<Param0>, SlashingSpans, Yes, (), ()>
pub fn slashing_spans( &self, _0: impl Borrow<Param0>, ) -> StaticAddress<StaticStorageKey<Param0>, SlashingSpans, Yes, (), ()>
Slashing spans for stash accounts.
Sourcepub fn span_slash_iter(&self) -> StaticAddress<(), SpanSlash, (), Yes, Yes>
pub fn span_slash_iter(&self) -> StaticAddress<(), SpanSlash, (), Yes, Yes>
Records information about the maximum slash of a stash within a slashing span, as well as how much reward has been paid out.
Sourcepub fn span_slash_iter1(
&self,
_0: impl Borrow<Param0>,
) -> StaticAddress<StaticStorageKey<Param0>, SpanSlash, (), Yes, Yes>
pub fn span_slash_iter1( &self, _0: impl Borrow<Param0>, ) -> StaticAddress<StaticStorageKey<Param0>, SpanSlash, (), Yes, Yes>
Records information about the maximum slash of a stash within a slashing span, as well as how much reward has been paid out.
Sourcepub fn span_slash(
&self,
_0: impl Borrow<Param0>,
_1: impl Borrow<Param1>,
) -> StaticAddress<(StaticStorageKey<Param0>, StaticStorageKey<Param1>), SpanSlash, Yes, Yes, ()>
pub fn span_slash( &self, _0: impl Borrow<Param0>, _1: impl Borrow<Param1>, ) -> StaticAddress<(StaticStorageKey<Param0>, StaticStorageKey<Param1>), SpanSlash, Yes, Yes, ()>
Records information about the maximum slash of a stash within a slashing span, as well as how much reward has been paid out.
Sourcepub fn current_planned_session(
&self,
) -> StaticAddress<(), CurrentPlannedSession, Yes, Yes, ()>
pub fn current_planned_session( &self, ) -> StaticAddress<(), CurrentPlannedSession, Yes, Yes, ()>
The last planned session scheduled by the session pallet.
This is basically in sync with the call to [pallet_session::SessionManager::new_session].
Sourcepub fn disabled_validators(
&self,
) -> StaticAddress<(), DisabledValidators, Yes, Yes, ()>
pub fn disabled_validators( &self, ) -> StaticAddress<(), DisabledValidators, Yes, Yes, ()>
Indices of validators that have offended in the active era. The offenders are disabled for a
whole era. For this reason they are kept here - only staking pallet knows about eras. The
implementor of [DisablingStrategy] defines if a validator should be disabled which
implicitly means that the implementor also controls the max number of disabled validators.
The vec is always kept sorted so that we can find whether a given validator has previously offended using binary search.
Sourcepub fn chill_threshold(&self) -> StaticAddress<(), ChillThreshold, Yes, (), ()>
pub fn chill_threshold(&self) -> StaticAddress<(), ChillThreshold, Yes, (), ()>
The threshold for when users can start calling chill_other for other validators /
nominators. The threshold is compared to the actual number of validators / nominators
(CountFor*) in the system compared to the configured max (Max*Count).
Auto Trait Implementations§
impl Freeze for StorageApi
impl RefUnwindSafe for StorageApi
impl Send for StorageApi
impl Sync for StorageApi
impl Unpin for StorageApi
impl UnwindSafe for StorageApi
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
Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§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.Source§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.Source§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.Source§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.Source§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.Source§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.Source§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.Source§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.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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 moreSource§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§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 moreSource§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 moreSource§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
Source§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
Source§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.Source§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.Source§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.Source§impl<T> Tap for T
impl<T> Tap for T
Source§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 moreSource§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 moreSource§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 moreSource§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 moreSource§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 moreSource§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 moreSource§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.Source§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.Source§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.Source§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.Source§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.Source§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.Source§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.