@@ -7,7 +7,7 @@ import type { BTreeMap, Bytes, Null, Option, U8aFixed, Vec, WrapperKeepOpaque, W
77import type { AnyNumber , ITuple } from '@polkadot/types-codec/types' ;
88import type { EthereumAddress } from '@polkadot/types/interfaces/eth' ;
99import type { AccountId32 , Call , H256 , Perbill , Percent } from '@polkadot/types/interfaces/runtime' ;
10- import type { FrameSupportWeightsPerDispatchClassU64 , FrameSystemAccountInfo , FrameSystemEventRecord , FrameSystemLastRuntimeUpgradeInfo , FrameSystemPhase , KusamaRuntimeSessionKeys , PalletAuthorshipUncleEntryItem , PalletBagsListListBag , PalletBagsListListNode , PalletBalancesAccountData , PalletBalancesBalanceLock , PalletBalancesReleases , PalletBalancesReserveData , PalletBountiesBounty , PalletCollectiveVotes , PalletDemocracyPreimageStatus , PalletDemocracyReferendumInfo , PalletDemocracyReleases , PalletDemocracyVoteThreshold , PalletDemocracyVoteVoting , PalletElectionProviderMultiPhasePhase , PalletElectionProviderMultiPhaseReadySolution , PalletElectionProviderMultiPhaseRoundSnapshot , PalletElectionProviderMultiPhaseSignedSignedSubmission , PalletElectionProviderMultiPhaseSolutionOrSnapshotSize , PalletElectionsPhragmenSeatHolder , PalletElectionsPhragmenVoter , PalletGiltActiveGilt , PalletGiltActiveGiltsTotal , PalletGiltGiltBid , PalletGrandpaStoredPendingChange , PalletGrandpaStoredState , PalletIdentityRegistrarInfo , PalletIdentityRegistration , PalletImOnlineBoundedOpaqueNetworkState , PalletImOnlineSr25519AppSr25519Public , PalletMultisigMultisig , PalletPreimageRequestStatus , PalletProxyAnnouncement , PalletProxyProxyDefinition , PalletRecoveryActiveRecovery , PalletRecoveryRecoveryConfig , PalletSchedulerReleases , PalletSchedulerScheduledV3 , PalletSocietyBid , PalletSocietyBidKind , PalletSocietyVote , PalletSocietyVouchingStatus , PalletStakingActiveEraInfo , PalletStakingEraRewardPoints , PalletStakingExposure , PalletStakingForcing , PalletStakingNominations , PalletStakingReleases , PalletStakingRewardDestination , PalletStakingSlashingSlashingSpans , PalletStakingSlashingSpanRecord , PalletStakingStakingLedger , PalletStakingUnappliedSlash , PalletStakingValidatorPrefs , PalletTipsOpenTip , PalletTransactionPaymentReleases , PalletTreasuryProposal , PalletVestingReleases , PalletVestingVestingInfo , PalletXcmQueryStatus , PalletXcmVersionMigrationStage , PolkadotCorePrimitivesInboundDownwardMessage , PolkadotCorePrimitivesInboundHrmpMessage , PolkadotParachainPrimitivesHrmpChannelId , PolkadotPrimitivesV0ValidatorAppPublic , PolkadotPrimitivesV1AssignmentAppPublic , PolkadotPrimitivesV1CandidateCommitments , PolkadotPrimitivesV1CoreOccupied , PolkadotPrimitivesV1DisputeState , PolkadotPrimitivesV1ScrapedOnChainVotes , PolkadotPrimitivesV1UpgradeGoAhead , PolkadotPrimitivesV1UpgradeRestriction , PolkadotPrimitivesV2SessionInfo , PolkadotRuntimeCommonClaimsStatementKind , PolkadotRuntimeCommonCrowdloanFundInfo , PolkadotRuntimeCommonParasRegistrarParaInfo , PolkadotRuntimeParachainsConfigurationHostConfiguration , PolkadotRuntimeParachainsConfigurationMigrationV1HostConfiguration , PolkadotRuntimeParachainsHrmpHrmpChannel , PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest , PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord , PolkadotRuntimeParachainsInclusionCandidatePendingAvailability , PolkadotRuntimeParachainsInitializerBufferedSessionChange , PolkadotRuntimeParachainsParasParaGenesisArgs , PolkadotRuntimeParachainsParasParaLifecycle , PolkadotRuntimeParachainsParasParaPastCodeMeta , PolkadotRuntimeParachainsParasPvfCheckActiveVoteState , PolkadotRuntimeParachainsSchedulerCoreAssignment , PolkadotRuntimeParachainsSchedulerParathreadClaimQueue , SpConsensusBabeAppPublic , SpConsensusBabeBabeEpochConfiguration , SpConsensusBabeDigestsNextConfigDescriptor , SpCoreCryptoKeyTypeId , SpRuntimeDigest , SpStakingOffenceOffenceDetails , XcmVersionedMultiLocation } from '@polkadot/types/lookup' ;
10+ import type { FrameSupportWeightsPerDispatchClassU64 , FrameSystemAccountInfo , FrameSystemEventRecord , FrameSystemLastRuntimeUpgradeInfo , FrameSystemPhase , KusamaRuntimeSessionKeys , PalletAuthorshipUncleEntryItem , PalletBagsListListBag , PalletBagsListListNode , PalletBalancesAccountData , PalletBalancesBalanceLock , PalletBalancesReleases , PalletBalancesReserveData , PalletBountiesBounty , PalletCollectiveVotes , PalletDemocracyPreimageStatus , PalletDemocracyReferendumInfo , PalletDemocracyReleases , PalletDemocracyVoteThreshold , PalletDemocracyVoteVoting , PalletElectionProviderMultiPhasePhase , PalletElectionProviderMultiPhaseReadySolution , PalletElectionProviderMultiPhaseRoundSnapshot , PalletElectionProviderMultiPhaseSignedSignedSubmission , PalletElectionProviderMultiPhaseSolutionOrSnapshotSize , PalletElectionsPhragmenSeatHolder , PalletElectionsPhragmenVoter , PalletGiltActiveGilt , PalletGiltActiveGiltsTotal , PalletGiltGiltBid , PalletGrandpaStoredPendingChange , PalletGrandpaStoredState , PalletIdentityRegistrarInfo , PalletIdentityRegistration , PalletImOnlineBoundedOpaqueNetworkState , PalletImOnlineSr25519AppSr25519Public , PalletMultisigMultisig , PalletPreimageRequestStatus , PalletProxyAnnouncement , PalletProxyProxyDefinition , PalletRecoveryActiveRecovery , PalletRecoveryRecoveryConfig , PalletSchedulerScheduledV3 , PalletSocietyBid , PalletSocietyBidKind , PalletSocietyVote , PalletSocietyVouchingStatus , PalletStakingActiveEraInfo , PalletStakingEraRewardPoints , PalletStakingExposure , PalletStakingForcing , PalletStakingNominations , PalletStakingReleases , PalletStakingRewardDestination , PalletStakingSlashingSlashingSpans , PalletStakingSlashingSpanRecord , PalletStakingStakingLedger , PalletStakingUnappliedSlash , PalletStakingValidatorPrefs , PalletTipsOpenTip , PalletTransactionPaymentReleases , PalletTreasuryProposal , PalletVestingReleases , PalletVestingVestingInfo , PalletXcmQueryStatus , PalletXcmVersionMigrationStage , PolkadotCorePrimitivesInboundDownwardMessage , PolkadotCorePrimitivesInboundHrmpMessage , PolkadotParachainPrimitivesHrmpChannelId , PolkadotPrimitivesV0ValidatorAppPublic , PolkadotPrimitivesV1AssignmentAppPublic , PolkadotPrimitivesV1CandidateCommitments , PolkadotPrimitivesV1CoreOccupied , PolkadotPrimitivesV1DisputeState , PolkadotPrimitivesV1ScrapedOnChainVotes , PolkadotPrimitivesV1UpgradeGoAhead , PolkadotPrimitivesV1UpgradeRestriction , PolkadotPrimitivesV2SessionInfo , PolkadotRuntimeCommonClaimsStatementKind , PolkadotRuntimeCommonCrowdloanFundInfo , PolkadotRuntimeCommonParasRegistrarParaInfo , PolkadotRuntimeParachainsConfigurationHostConfiguration , PolkadotRuntimeParachainsConfigurationMigrationV1HostConfiguration , PolkadotRuntimeParachainsHrmpHrmpChannel , PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest , PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord , PolkadotRuntimeParachainsInclusionCandidatePendingAvailability , PolkadotRuntimeParachainsInitializerBufferedSessionChange , PolkadotRuntimeParachainsParasParaGenesisArgs , PolkadotRuntimeParachainsParasParaLifecycle , PolkadotRuntimeParachainsParasParaPastCodeMeta , PolkadotRuntimeParachainsParasPvfCheckActiveVoteState , PolkadotRuntimeParachainsSchedulerCoreAssignment , PolkadotRuntimeParachainsSchedulerParathreadClaimQueue , SpConsensusBabeAppPublic , SpConsensusBabeBabeEpochConfiguration , SpConsensusBabeDigestsNextConfigDescriptor , SpCoreCryptoKeyTypeId , SpRuntimeDigest , SpStakingOffenceOffenceDetails , XcmVersionedMultiLocation } from '@polkadot/types/lookup' ;
1111import type { Observable } from '@polkadot/types/types' ;
1212
1313declare module '@polkadot/api-base/types/storage' {
@@ -185,8 +185,29 @@ declare module '@polkadot/api-base/types/storage' {
185185 } ;
186186 balances : {
187187 /**
188- * The balance of an account.
188+ * The Balances pallet example of storing the balance of an account.
189189 *
190+ * # Example
191+ *
192+ * ```nocompile
193+ * impl pallet_balances::Config for Runtime {
194+ * type AccountStore = StorageMapShim<Self::Account<Runtime>, frame_system::Provider<Runtime>, AccountId, Self::AccountData<Balance>>
195+ * }
196+ * ```
197+ *
198+ * You can also store the balance of an account in the `System` pallet.
199+ *
200+ * # Example
201+ *
202+ * ```nocompile
203+ * impl pallet_balances::Config for Runtime {
204+ * type AccountStore = System
205+ * }
206+ * ```
207+ *
208+ * But this comes with tradeoffs, storing account balances in the system pallet stores
209+ * `frame_system` data alongside the account data contrary to storing account balances in the
210+ * `Balances` pallet, which uses a `StorageMap` to store balances data only.
190211 * NOTE: This is only used in the case that this pallet is used to store balances.
191212 **/
192213 account : AugmentedQuery < ApiType , ( arg : AccountId32 | string | Uint8Array ) => Observable < PalletBalancesAccountData > , [ AccountId32 ] > & QueryableStorageEntry < ApiType , [ AccountId32 ] > ;
@@ -1222,12 +1243,6 @@ declare module '@polkadot/api-base/types/storage' {
12221243 * Lookup from identity to the block number and index of the task.
12231244 **/
12241245 lookup : AugmentedQuery < ApiType , ( arg : Bytes | string | Uint8Array ) => Observable < Option < ITuple < [ u32 , u32 ] > > > , [ Bytes ] > & QueryableStorageEntry < ApiType , [ Bytes ] > ;
1225- /**
1226- * Storage version of the pallet.
1227- *
1228- * New networks start with last version.
1229- **/
1230- storageVersion : AugmentedQuery < ApiType , ( ) => Observable < PalletSchedulerReleases > , [ ] > & QueryableStorageEntry < ApiType , [ ] > ;
12311246 /**
12321247 * Generic query
12331248 **/
@@ -1533,7 +1548,22 @@ declare module '@polkadot/api-base/types/storage' {
15331548 **/
15341549 minValidatorBond : AugmentedQuery < ApiType , ( ) => Observable < u128 > , [ ] > & QueryableStorageEntry < ApiType , [ ] > ;
15351550 /**
1536- * The map from nominator stash key to the set of stash keys of all validators to nominate.
1551+ * The map from nominator stash key to their nomination preferences, namely the validators that
1552+ * they wish to support.
1553+ *
1554+ * Note that the keys of this storage map might become non-decodable in case the
1555+ * [`Config::MaxNominations`] configuration is decreased. In this rare case, these nominators
1556+ * are still existent in storage, their key is correct and retrievable (i.e. `contains_key`
1557+ * indicates that they exist), but their value cannot be decoded. Therefore, the non-decodable
1558+ * nominators will effectively not-exist, until they re-submit their preferences such that it
1559+ * is within the bounds of the newly set `Config::MaxNominations`.
1560+ *
1561+ * This implies that `::iter_keys().count()` and `::iter().count()` might return different
1562+ * values for this map. Moreover, the main `::count()` is aligned with the former, namely the
1563+ * number of keys that exist.
1564+ *
1565+ * Lastly, if any of the nominators become non-decodable, they can be chilled immediately via
1566+ * [`Call::chill_other`] dispatchable by anyone.
15371567 **/
15381568 nominators : AugmentedQuery < ApiType , ( arg : AccountId32 | string | Uint8Array ) => Observable < Option < PalletStakingNominations > > , [ AccountId32 ] > & QueryableStorageEntry < ApiType , [ AccountId32 ] > ;
15391569 /**
0 commit comments