Skip to content

Commit

Permalink
Update Augmented type for kusama 1002006 (#5928)
Browse files Browse the repository at this point in the history
  • Loading branch information
TarikGul committed Jul 1, 2024
1 parent 9ead1a8 commit 436bd95
Show file tree
Hide file tree
Showing 13 changed files with 19,114 additions and 22,846 deletions.
71 changes: 0 additions & 71 deletions packages/api-augment/src/kusama/consts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -370,47 +370,6 @@ declare module '@polkadot/api-base/types/consts' {
**/
[key: string]: Codec;
};
identity: {
/**
* The amount held on deposit for a registered identity.
**/
basicDeposit: u128 & AugmentedConst<ApiType>;
/**
* The amount held on deposit per encoded byte for a registered identity.
**/
byteDeposit: u128 & AugmentedConst<ApiType>;
/**
* Maxmimum number of registrars allowed in the system. Needed to bound the complexity
* of, e.g., updating judgements.
**/
maxRegistrars: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of sub-accounts allowed per identified account.
**/
maxSubAccounts: u32 & AugmentedConst<ApiType>;
/**
* The maximum length of a suffix.
**/
maxSuffixLength: u32 & AugmentedConst<ApiType>;
/**
* The maximum length of a username, including its suffix and any system-added delimiters.
**/
maxUsernameLength: u32 & AugmentedConst<ApiType>;
/**
* The number of blocks within which a username grant must be accepted.
**/
pendingUsernameExpiration: u32 & AugmentedConst<ApiType>;
/**
* The amount held on deposit for a registered subaccount. This should account for the fact
* that one storage item's value will increase by the size of an account ID, and there will
* be another trie item whose value is the size of an account ID plus 32 bytes.
**/
subAccountDeposit: u128 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
indices: {
/**
* The deposit needed for reserving an index.
Expand Down Expand Up @@ -887,36 +846,6 @@ declare module '@polkadot/api-base/types/consts' {
**/
[key: string]: Codec;
};
stateTrieMigration: {
/**
* Maximal number of bytes that a key can have.
*
* FRAME itself does not limit the key length.
* The concrete value must therefore depend on your storage usage.
* A [`frame_support::storage::StorageNMap`] for example can have an arbitrary number of
* keys which are then hashed and concatenated, resulting in arbitrarily long keys.
*
* Use the *state migration RPC* to retrieve the length of the longest key in your
* storage: <https://github.com/paritytech/substrate/issues/11642>
*
* The migration will halt with a `Halted` event if this value is too small.
* Since there is no real penalty from over-estimating, it is advised to use a large
* value. The default is 512 byte.
*
* Some key lengths for reference:
* - [`frame_support::storage::StorageValue`]: 32 byte
* - [`frame_support::storage::StorageMap`]: 64 byte
* - [`frame_support::storage::StorageDoubleMap`]: 96 byte
*
* For more info see
* <https://www.shawntabrizi.com/blog/substrate/querying-substrate-storage-via-rpc/>
**/
maxKeyLen: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
system: {
/**
* Maximum number of block number to block hash mappings to keep (oldest pruned first).
Expand Down
150 changes: 4 additions & 146 deletions packages/api-augment/src/kusama/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -783,116 +783,6 @@ declare module '@polkadot/api-base/types/errors' {
**/
[key: string]: AugmentedError<ApiType>;
};
identity: {
/**
* Account ID is already named.
**/
AlreadyClaimed: AugmentedError<ApiType>;
/**
* Empty index.
**/
EmptyIndex: AugmentedError<ApiType>;
/**
* Fee is changed.
**/
FeeChanged: AugmentedError<ApiType>;
/**
* The index is invalid.
**/
InvalidIndex: AugmentedError<ApiType>;
/**
* Invalid judgement.
**/
InvalidJudgement: AugmentedError<ApiType>;
/**
* The signature on a username was not valid.
**/
InvalidSignature: AugmentedError<ApiType>;
/**
* The provided suffix is too long.
**/
InvalidSuffix: AugmentedError<ApiType>;
/**
* The target is invalid.
**/
InvalidTarget: AugmentedError<ApiType>;
/**
* The username does not meet the requirements.
**/
InvalidUsername: AugmentedError<ApiType>;
/**
* The provided judgement was for a different identity.
**/
JudgementForDifferentIdentity: AugmentedError<ApiType>;
/**
* Judgement given.
**/
JudgementGiven: AugmentedError<ApiType>;
/**
* Error that occurs when there is an issue paying for judgement.
**/
JudgementPaymentFailed: AugmentedError<ApiType>;
/**
* The authority cannot allocate any more usernames.
**/
NoAllocation: AugmentedError<ApiType>;
/**
* No identity found.
**/
NoIdentity: AugmentedError<ApiType>;
/**
* The username cannot be forcefully removed because it can still be accepted.
**/
NotExpired: AugmentedError<ApiType>;
/**
* Account isn't found.
**/
NotFound: AugmentedError<ApiType>;
/**
* Account isn't named.
**/
NotNamed: AugmentedError<ApiType>;
/**
* Sub-account isn't owned by sender.
**/
NotOwned: AugmentedError<ApiType>;
/**
* Sender is not a sub-account.
**/
NotSub: AugmentedError<ApiType>;
/**
* The sender does not have permission to issue a username.
**/
NotUsernameAuthority: AugmentedError<ApiType>;
/**
* The requested username does not exist.
**/
NoUsername: AugmentedError<ApiType>;
/**
* Setting this username requires a signature, but none was provided.
**/
RequiresSignature: AugmentedError<ApiType>;
/**
* Sticky judgement.
**/
StickyJudgement: AugmentedError<ApiType>;
/**
* Maximum amount of registrars reached. Cannot add any more.
**/
TooManyRegistrars: AugmentedError<ApiType>;
/**
* Too many subs-accounts.
**/
TooManySubAccounts: AugmentedError<ApiType>;
/**
* The username is already taken.
**/
UsernameTaken: AugmentedError<ApiType>;
/**
* Generic error
**/
[key: string]: AugmentedError<ApiType>;
};
indices: {
/**
* The index was not available.
Expand Down Expand Up @@ -2106,6 +1996,10 @@ declare module '@polkadot/api-base/types/errors' {
* The user has enough bond and thus cannot be chilled forcefully by an external person.
**/
CannotChillOther: AugmentedError<ApiType>;
/**
* Cannot reset a ledger.
**/
CannotRestoreLedger: AugmentedError<ApiType>;
/**
* Commission is too low. Must be at least `MinCommission`.
**/
Expand Down Expand Up @@ -2195,42 +2089,6 @@ declare module '@polkadot/api-base/types/errors' {
**/
[key: string]: AugmentedError<ApiType>;
};
stateTrieMigration: {
/**
* Bad child root provided.
**/
BadChildRoot: AugmentedError<ApiType>;
/**
* Bad witness data provided.
**/
BadWitness: AugmentedError<ApiType>;
/**
* A key was longer than the configured maximum.
*
* This means that the migration halted at the current [`Progress`] and
* can be resumed with a larger [`crate::Config::MaxKeyLen`] value.
* Retrying with the same [`crate::Config::MaxKeyLen`] value will not work.
* The value should only be increased to avoid a storage migration for the currently
* stored [`crate::Progress::LastKey`].
**/
KeyTooLong: AugmentedError<ApiType>;
/**
* Max signed limits not respected.
**/
MaxSignedLimits: AugmentedError<ApiType>;
/**
* submitter does not have enough funds.
**/
NotEnoughFunds: AugmentedError<ApiType>;
/**
* Signed migration is not allowed because the maximum limit is not set yet.
**/
SignedMigrationNotAllowed: AugmentedError<ApiType>;
/**
* Generic error
**/
[key: string]: AugmentedError<ApiType>;
};
system: {
/**
* The origin filter prevent the call to be dispatched.
Expand Down
107 changes: 6 additions & 101 deletions packages/api-augment/src/kusama/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import type { Bytes, Null, Option, Result, U8aFixed, Vec, bool, u128, u16, u32,
import type { ITuple } from '@polkadot/types-codec/types';
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
import type { AccountId32, H256, Perbill, Perquintill } from '@polkadot/types/interfaces/runtime';
import type { FrameSupportDispatchDispatchInfo, FrameSupportDispatchPostDispatchInfo, FrameSupportMessagesProcessMessageError, FrameSupportPreimagesBounded, FrameSupportTokensMiscBalanceStatus, PalletConvictionVotingTally, PalletElectionProviderMultiPhaseElectionCompute, PalletElectionProviderMultiPhasePhase, PalletMultisigTimepoint, PalletNominationPoolsCommissionChangeRate, PalletNominationPoolsCommissionClaimPermission, PalletNominationPoolsPoolState, PalletRankedCollectiveTally, PalletRankedCollectiveVoteRecord, PalletSocietyGroupParams, PalletStakingForcing, PalletStakingRewardDestination, PalletStakingValidatorPrefs, PalletStateTrieMigrationError, PalletStateTrieMigrationMigrationCompute, PolkadotParachainPrimitivesPrimitivesHrmpChannelId, PolkadotPrimitivesV6CandidateReceipt, PolkadotRuntimeCommonImplsVersionedLocatableAsset, PolkadotRuntimeParachainsDisputesDisputeLocation, PolkadotRuntimeParachainsDisputesDisputeResult, PolkadotRuntimeParachainsInclusionAggregateMessageOrigin, SpConsensusGrandpaAppPublic, SpNposElectionsElectionScore, SpRuntimeDispatchError, SpRuntimeDispatchErrorWithPostInfo, SpWeightsWeightV2Weight, StagingKusamaRuntimeProxyType, StagingXcmV4AssetAssets, StagingXcmV4Location, StagingXcmV4Response, StagingXcmV4TraitsOutcome, StagingXcmV4Xcm, XcmV3TraitsError, XcmVersionedAssets, XcmVersionedLocation } from '@polkadot/types/lookup';
import type { FrameSupportDispatchDispatchInfo, FrameSupportDispatchPostDispatchInfo, FrameSupportMessagesProcessMessageError, FrameSupportPreimagesBounded, FrameSupportTokensMiscBalanceStatus, PalletConvictionVotingTally, PalletElectionProviderMultiPhaseElectionCompute, PalletElectionProviderMultiPhasePhase, PalletMultisigTimepoint, PalletNominationPoolsCommissionChangeRate, PalletNominationPoolsCommissionClaimPermission, PalletNominationPoolsPoolState, PalletRankedCollectiveTally, PalletRankedCollectiveVoteRecord, PalletSocietyGroupParams, PalletStakingForcing, PalletStakingRewardDestination, PalletStakingValidatorPrefs, PolkadotParachainPrimitivesPrimitivesHrmpChannelId, PolkadotPrimitivesV6CandidateReceipt, PolkadotRuntimeCommonImplsVersionedLocatableAsset, PolkadotRuntimeParachainsDisputesDisputeLocation, PolkadotRuntimeParachainsDisputesDisputeResult, PolkadotRuntimeParachainsInclusionAggregateMessageOrigin, SpConsensusGrandpaAppPublic, SpNposElectionsElectionScore, SpRuntimeDispatchError, SpRuntimeDispatchErrorWithPostInfo, SpWeightsWeightV2Weight, StagingKusamaRuntimeProxyType, StagingXcmV4AssetAssets, StagingXcmV4Location, StagingXcmV4Response, StagingXcmV4TraitsOutcome, StagingXcmV4Xcm, XcmV3TraitsError, XcmVersionedAssets, XcmVersionedLocation } from '@polkadot/types/lookup';

export type __AugmentedEvent<ApiType extends ApiTypes> = AugmentedEvent<ApiType>;

Expand Down Expand Up @@ -502,7 +502,7 @@ declare module '@polkadot/api-base/types/events' {
**/
HrmpChannelForceOpened: AugmentedEvent<ApiType, [sender: u32, recipient: u32, proposedMaxCapacity: u32, proposedMaxMessageSize: u32], { sender: u32, recipient: u32, proposedMaxCapacity: u32, proposedMaxMessageSize: u32 }>;
/**
* An HRMP channel was opened between two system chains.
* An HRMP channel was opened with a system chain.
**/
HrmpSystemChannelOpened: AugmentedEvent<ApiType, [sender: u32, recipient: u32, proposedMaxCapacity: u32, proposedMaxMessageSize: u32], { sender: u32, recipient: u32, proposedMaxCapacity: u32, proposedMaxMessageSize: u32 }>;
/**
Expand All @@ -526,82 +526,6 @@ declare module '@polkadot/api-base/types/events' {
**/
[key: string]: AugmentedEvent<ApiType>;
};
identity: {
/**
* A username authority was added.
**/
AuthorityAdded: AugmentedEvent<ApiType, [authority: AccountId32], { authority: AccountId32 }>;
/**
* A username authority was removed.
**/
AuthorityRemoved: AugmentedEvent<ApiType, [authority: AccountId32], { authority: AccountId32 }>;
/**
* A dangling username (as in, a username corresponding to an account that has removed its
* identity) has been removed.
**/
DanglingUsernameRemoved: AugmentedEvent<ApiType, [who: AccountId32, username: Bytes], { who: AccountId32, username: Bytes }>;
/**
* A name was cleared, and the given balance returned.
**/
IdentityCleared: AugmentedEvent<ApiType, [who: AccountId32, deposit: u128], { who: AccountId32, deposit: u128 }>;
/**
* A name was removed and the given balance slashed.
**/
IdentityKilled: AugmentedEvent<ApiType, [who: AccountId32, deposit: u128], { who: AccountId32, deposit: u128 }>;
/**
* A name was set or reset (which will remove all judgements).
**/
IdentitySet: AugmentedEvent<ApiType, [who: AccountId32], { who: AccountId32 }>;
/**
* A judgement was given by a registrar.
**/
JudgementGiven: AugmentedEvent<ApiType, [target: AccountId32, registrarIndex: u32], { target: AccountId32, registrarIndex: u32 }>;
/**
* A judgement was asked from a registrar.
**/
JudgementRequested: AugmentedEvent<ApiType, [who: AccountId32, registrarIndex: u32], { who: AccountId32, registrarIndex: u32 }>;
/**
* A judgement request was retracted.
**/
JudgementUnrequested: AugmentedEvent<ApiType, [who: AccountId32, registrarIndex: u32], { who: AccountId32, registrarIndex: u32 }>;
/**
* A queued username passed its expiration without being claimed and was removed.
**/
PreapprovalExpired: AugmentedEvent<ApiType, [whose: AccountId32], { whose: AccountId32 }>;
/**
* A username was set as a primary and can be looked up from `who`.
**/
PrimaryUsernameSet: AugmentedEvent<ApiType, [who: AccountId32, username: Bytes], { who: AccountId32, username: Bytes }>;
/**
* A registrar was added.
**/
RegistrarAdded: AugmentedEvent<ApiType, [registrarIndex: u32], { registrarIndex: u32 }>;
/**
* A sub-identity was added to an identity and the deposit paid.
**/
SubIdentityAdded: AugmentedEvent<ApiType, [sub: AccountId32, main: AccountId32, deposit: u128], { sub: AccountId32, main: AccountId32, deposit: u128 }>;
/**
* A sub-identity was removed from an identity and the deposit freed.
**/
SubIdentityRemoved: AugmentedEvent<ApiType, [sub: AccountId32, main: AccountId32, deposit: u128], { sub: AccountId32, main: AccountId32, deposit: u128 }>;
/**
* A sub-identity was cleared, and the given deposit repatriated from the
* main identity account to the sub-identity account.
**/
SubIdentityRevoked: AugmentedEvent<ApiType, [sub: AccountId32, main: AccountId32, deposit: u128], { sub: AccountId32, main: AccountId32, deposit: u128 }>;
/**
* A username was queued, but `who` must accept it prior to `expiration`.
**/
UsernameQueued: AugmentedEvent<ApiType, [who: AccountId32, username: Bytes, expiration: u32], { who: AccountId32, username: Bytes, expiration: u32 }>;
/**
* A username was set for `who`.
**/
UsernameSet: AugmentedEvent<ApiType, [who: AccountId32, username: Bytes], { who: AccountId32, username: Bytes }>;
/**
* Generic event
**/
[key: string]: AugmentedEvent<ApiType>;
};
indices: {
/**
* A account index was assigned.
Expand Down Expand Up @@ -1296,6 +1220,10 @@ declare module '@polkadot/api-base/types/events' {
* An account has stopped participating as either a validator or nominator.
**/
Chilled: AugmentedEvent<ApiType, [stash: AccountId32], { stash: AccountId32 }>;
/**
* Report of a controller batch deprecation.
**/
ControllerBatchDeprecated: AugmentedEvent<ApiType, [failures: u32], { failures: u32 }>;
/**
* The era payout has been set; the first balance is the validator-payout; the second is
* the remainder from the maximum amount of reward.
Expand Down Expand Up @@ -1365,29 +1293,6 @@ declare module '@polkadot/api-base/types/events' {
**/
[key: string]: AugmentedEvent<ApiType>;
};
stateTrieMigration: {
/**
* The auto migration task finished.
**/
AutoMigrationFinished: AugmentedEvent<ApiType, []>;
/**
* Migration got halted due to an error or miss-configuration.
**/
Halted: AugmentedEvent<ApiType, [error: PalletStateTrieMigrationError], { error: PalletStateTrieMigrationError }>;
/**
* Given number of `(top, child)` keys were migrated respectively, with the given
* `compute`.
**/
Migrated: AugmentedEvent<ApiType, [top: u32, child: u32, compute: PalletStateTrieMigrationMigrationCompute], { top: u32, child: u32, compute: PalletStateTrieMigrationMigrationCompute }>;
/**
* Some account got slashed by the given amount.
**/
Slashed: AugmentedEvent<ApiType, [who: AccountId32, amount: u128], { who: AccountId32, amount: u128 }>;
/**
* Generic event
**/
[key: string]: AugmentedEvent<ApiType>;
};
system: {
/**
* `:code` was updated.
Expand Down
Loading

0 comments on commit 436bd95

Please sign in to comment.