Skip to content

Commit f78a00c

Browse files
authored
Update Substrate Metadata to latest (#5896)
* Update Substrate Metadata to latest * import
1 parent e55c9d2 commit f78a00c

File tree

13 files changed

+1456
-1256
lines changed

13 files changed

+1456
-1256
lines changed

packages/api-augment/src/substrate/errors.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2873,6 +2873,10 @@ declare module '@polkadot/api-base/types/errors' {
28732873
* staking settings to keep things safe for the runtime.
28742874
**/
28752875
TooManyValidators: AugmentedError<ApiType>;
2876+
/**
2877+
* Operation not allowed for virtual stakers.
2878+
**/
2879+
VirtualStakerNotAllowed: AugmentedError<ApiType>;
28762880
/**
28772881
* Generic error
28782882
**/

packages/api-augment/src/substrate/events.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,10 @@ declare module '@polkadot/api-base/types/events' {
219219
* Some asset class was created.
220220
**/
221221
Created: AugmentedEvent<ApiType, [assetId: u32, creator: AccountId32, owner: AccountId32], { assetId: u32, creator: AccountId32, owner: AccountId32 }>;
222+
/**
223+
* Some assets were deposited (e.g. for transaction fees).
224+
**/
225+
Deposited: AugmentedEvent<ApiType, [assetId: u32, who: AccountId32, amount: u128], { assetId: u32, who: AccountId32, amount: u128 }>;
222226
/**
223227
* An asset class was destroyed.
224228
**/
@@ -272,6 +276,10 @@ declare module '@polkadot/api-base/types/events' {
272276
* the approved `delegate`.
273277
**/
274278
TransferredApproved: AugmentedEvent<ApiType, [assetId: u32, owner: AccountId32, delegate: AccountId32, destination: AccountId32, amount: u128], { assetId: u32, owner: AccountId32, delegate: AccountId32, destination: AccountId32, amount: u128 }>;
279+
/**
280+
* Some assets were withdrawn from the account (e.g. for transaction fees).
281+
**/
282+
Withdrawn: AugmentedEvent<ApiType, [assetId: u32, who: AccountId32, amount: u128], { assetId: u32, who: AccountId32, amount: u128 }>;
275283
/**
276284
* Generic event
277285
**/
@@ -1558,6 +1566,10 @@ declare module '@polkadot/api-base/types/events' {
15581566
* Some asset class was created.
15591567
**/
15601568
Created: AugmentedEvent<ApiType, [assetId: u32, creator: AccountId32, owner: AccountId32], { assetId: u32, creator: AccountId32, owner: AccountId32 }>;
1569+
/**
1570+
* Some assets were deposited (e.g. for transaction fees).
1571+
**/
1572+
Deposited: AugmentedEvent<ApiType, [assetId: u32, who: AccountId32, amount: u128], { assetId: u32, who: AccountId32, amount: u128 }>;
15611573
/**
15621574
* An asset class was destroyed.
15631575
**/
@@ -1611,6 +1623,10 @@ declare module '@polkadot/api-base/types/events' {
16111623
* the approved `delegate`.
16121624
**/
16131625
TransferredApproved: AugmentedEvent<ApiType, [assetId: u32, owner: AccountId32, delegate: AccountId32, destination: AccountId32, amount: u128], { assetId: u32, owner: AccountId32, delegate: AccountId32, destination: AccountId32, amount: u128 }>;
1626+
/**
1627+
* Some assets were withdrawn from the account (e.g. for transaction fees).
1628+
**/
1629+
Withdrawn: AugmentedEvent<ApiType, [assetId: u32, who: AccountId32, amount: u128], { assetId: u32, who: AccountId32, amount: u128 }>;
16141630
/**
16151631
* Generic event
16161632
**/

packages/api-augment/src/substrate/query.ts

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1888,6 +1888,16 @@ declare module '@polkadot/api-base/types/storage' {
18881888
* This is basically in sync with the call to [`pallet_session::SessionManager::new_session`].
18891889
**/
18901890
currentPlannedSession: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
1891+
/**
1892+
* Indices of validators that have offended in the active era. The offenders are disabled for a
1893+
* whole era. For this reason they are kept here - only staking pallet knows about eras. The
1894+
* implementor of [`DisablingStrategy`] defines if a validator should be disabled which
1895+
* implicitly means that the implementor also controls the max number of disabled validators.
1896+
*
1897+
* The vec is always kept sorted so that we can find whether a given validator has previously
1898+
* offended using binary search.
1899+
**/
1900+
disabledValidators: AugmentedQuery<ApiType, () => Observable<Vec<u32>>, []> & QueryableStorageEntry<ApiType, []>;
18911901
/**
18921902
* Rewards for the last [`Config::HistoryDepth`] eras.
18931903
* If reward hasn't been set or has been removed then 0 reward is returned.
@@ -2056,18 +2066,6 @@ declare module '@polkadot/api-base/types/storage' {
20562066
* All slashing events on nominators, mapped by era to the highest slash value of the era.
20572067
**/
20582068
nominatorSlashInEra: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: AccountId32 | string | Uint8Array) => Observable<Option<u128>>, [u32, AccountId32]> & QueryableStorageEntry<ApiType, [u32, AccountId32]>;
2059-
/**
2060-
* Indices of validators that have offended in the active era and whether they are currently
2061-
* disabled.
2062-
*
2063-
* This value should be a superset of disabled validators since not all offences lead to the
2064-
* validator being disabled (if there was no slash). This is needed to track the percentage of
2065-
* validators that have offended in the current era, ensuring a new era is forced if
2066-
* `OffendingValidatorsThreshold` is reached. The vec is always kept sorted so that we can find
2067-
* whether a given validator has previously offended using binary search. It gets cleared when
2068-
* the era ends.
2069-
**/
2070-
offendingValidators: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[u32, bool]>>>, []> & QueryableStorageEntry<ApiType, []>;
20712069
/**
20722070
* Where the reward payment should be made. Keyed by stash.
20732071
*

packages/api-augment/src/substrate/tx.ts

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import type { Data } from '@polkadot/types';
1010
import type { Bytes, Compact, Option, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
1111
import type { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types';
1212
import type { AccountId32, Call, H256, MultiAddress, Perbill, Percent, Perquintill } from '@polkadot/types/interfaces/runtime';
13-
import type { FrameSupportPreimagesBounded, FrameSupportScheduleDispatchTime, FrameSupportTokensFungibleUnionOfNativeOrWithId, KitchensinkRuntimeOriginCaller, KitchensinkRuntimeProxyType, KitchensinkRuntimeRuntimeParameters, KitchensinkRuntimeSessionKeys, PalletAllianceCid, PalletAllianceDisbandWitness, PalletAllianceUnscrupulousItem, PalletBalancesAdjustmentDirection, PalletBrokerConfigRecord, PalletBrokerCoreMask, PalletBrokerFinality, PalletBrokerRegionId, PalletBrokerScheduleItem, PalletContractsWasmDeterminism, PalletConvictionVotingConviction, PalletConvictionVotingVoteAccountVote, PalletCoreFellowshipParamsType, PalletCoreFellowshipWish, PalletDemocracyConviction, PalletDemocracyMetadataOwner, PalletDemocracyVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenRenouncing, PalletIdentityJudgement, PalletIdentityLegacyIdentityInfo, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMigrationsHistoricCleanupSelector, PalletMigrationsMigrationCursor, PalletMixnetRegistration, PalletMultisigTimepoint, PalletNftsAttributeNamespace, PalletNftsCancelAttributesApprovalWitness, PalletNftsCollectionConfig, PalletNftsDestroyWitness, PalletNftsItemConfig, PalletNftsItemTip, PalletNftsMintSettings, PalletNftsMintWitness, PalletNftsPreSignedAttributes, PalletNftsPreSignedMint, PalletNftsPriceWithDirection, PalletNominationPoolsBondExtra, PalletNominationPoolsClaimPermission, PalletNominationPoolsCommissionChangeRate, PalletNominationPoolsCommissionClaimPermission, PalletNominationPoolsConfigOpAccountId32, PalletNominationPoolsConfigOpPerbill, PalletNominationPoolsConfigOpU128, PalletNominationPoolsConfigOpU32, PalletNominationPoolsPoolState, PalletStakingPalletConfigOpPerbill, PalletStakingPalletConfigOpPercent, PalletStakingPalletConfigOpU128, PalletStakingPalletConfigOpU32, PalletStakingRewardDestination, PalletStakingUnlockChunk, PalletStakingValidatorPrefs, PalletStateTrieMigrationMigrationLimits, PalletStateTrieMigrationMigrationTask, PalletStateTrieMigrationProgress, PalletUniquesDestroyWitness, PalletVestingVestingInfo, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBeefyEquivocationProof, SpConsensusGrandpaEquivocationProof, SpConsensusSlotsEquivocationProof, SpMixnetAppSignature, SpNposElectionsElectionScore, SpNposElectionsSupport, SpRuntimeMultiSignature, SpSessionMembershipProof, SpTransactionStorageProofTransactionStorageProof, SpWeightsWeightV2Weight } from '@polkadot/types/lookup';
13+
import type { FrameSupportPreimagesBounded, FrameSupportScheduleDispatchTime, FrameSupportTokensFungibleUnionOfNativeOrWithId, KitchensinkRuntimeOriginCaller, KitchensinkRuntimeProxyType, KitchensinkRuntimeRuntimeParameters, KitchensinkRuntimeSessionKeys, PalletAllianceCid, PalletAllianceDisbandWitness, PalletAllianceUnscrupulousItem, PalletBalancesAdjustmentDirection, PalletBrokerConfigRecord, PalletBrokerCoreMask, PalletBrokerFinality, PalletBrokerRegionId, PalletBrokerScheduleItem, PalletContractsWasmDeterminism, PalletConvictionVotingConviction, PalletConvictionVotingVoteAccountVote, PalletCoreFellowshipParamsType, PalletCoreFellowshipWish, PalletDemocracyConviction, PalletDemocracyMetadataOwner, PalletDemocracyVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenRenouncing, PalletIdentityJudgement, PalletIdentityLegacyIdentityInfo, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMigrationsHistoricCleanupSelector, PalletMigrationsMigrationCursor, PalletMixnetRegistration, PalletMultisigTimepoint, PalletNftsAttributeNamespace, PalletNftsCancelAttributesApprovalWitness, PalletNftsCollectionConfig, PalletNftsDestroyWitness, PalletNftsItemConfig, PalletNftsItemTip, PalletNftsMintSettings, PalletNftsMintWitness, PalletNftsPreSignedAttributes, PalletNftsPreSignedMint, PalletNftsPriceWithDirection, PalletNominationPoolsBondExtra, PalletNominationPoolsClaimPermission, PalletNominationPoolsCommissionChangeRate, PalletNominationPoolsCommissionClaimPermission, PalletNominationPoolsConfigOpAccountId32, PalletNominationPoolsConfigOpPerbill, PalletNominationPoolsConfigOpU128, PalletNominationPoolsConfigOpU32, PalletNominationPoolsPoolState, PalletStakingPalletConfigOpPerbill, PalletStakingPalletConfigOpPercent, PalletStakingPalletConfigOpU128, PalletStakingPalletConfigOpU32, PalletStakingRewardDestination, PalletStakingUnlockChunk, PalletStakingValidatorPrefs, PalletStateTrieMigrationMigrationLimits, PalletStateTrieMigrationMigrationTask, PalletStateTrieMigrationProgress, PalletUniquesDestroyWitness, PalletVestingVestingInfo, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBeefyDoubleVotingProof, SpConsensusGrandpaEquivocationProof, SpConsensusSlotsEquivocationProof, SpMixnetAppSignature, SpNposElectionsElectionScore, SpNposElectionsSupport, SpRuntimeMultiSignature, SpSessionMembershipProof, SpTransactionStorageProofTransactionStorageProof, SpWeightsWeightV2Weight } from '@polkadot/types/lookup';
1414

1515
export type __AugmentedSubmittable = AugmentedSubmittable<() => unknown>;
1616
export type __SubmittableExtrinsic<ApiType extends ApiTypes> = SubmittableExtrinsic<ApiType>;
@@ -893,6 +893,16 @@ declare module '@polkadot/api-base/types/submittable' {
893893
[key: string]: SubmittableExtrinsicFunction<ApiType>;
894894
};
895895
balances: {
896+
/**
897+
* Burn the specified liquid free balance from the origin account.
898+
*
899+
* If the origin's account ends up below the existential deposit as a result
900+
* of the burn and `keep_alive` is false, the account will be reaped.
901+
*
902+
* Unlike sending funds to a _burn_ address, which merely makes the funds inaccessible,
903+
* this `burn` operation will reduce total issuance by the amount _burned_.
904+
**/
905+
burn: AugmentedSubmittable<(value: Compact<u128> | AnyNumber | Uint8Array, keepAlive: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u128>, bool]>;
896906
/**
897907
* Adjust the total issuance in a saturating way.
898908
*
@@ -978,7 +988,7 @@ declare module '@polkadot/api-base/types/submittable' {
978988
* against the extracted offender. If both are valid, the offence
979989
* will be reported.
980990
**/
981-
reportEquivocation: AugmentedSubmittable<(equivocationProof: SpConsensusBeefyEquivocationProof | { first?: any; second?: any } | string | Uint8Array, keyOwnerProof: SpSessionMembershipProof | { session?: any; trieNodes?: any; validatorCount?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [SpConsensusBeefyEquivocationProof, SpSessionMembershipProof]>;
991+
reportEquivocation: AugmentedSubmittable<(equivocationProof: SpConsensusBeefyDoubleVotingProof | { first?: any; second?: any } | string | Uint8Array, keyOwnerProof: SpSessionMembershipProof | { session?: any; trieNodes?: any; validatorCount?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [SpConsensusBeefyDoubleVotingProof, SpSessionMembershipProof]>;
982992
/**
983993
* Report voter equivocation/misbehavior. This method will verify the
984994
* equivocation proof and validate the given key ownership proof
@@ -990,7 +1000,7 @@ declare module '@polkadot/api-base/types/submittable' {
9901000
* if the block author is defined it will be defined as the equivocation
9911001
* reporter.
9921002
**/
993-
reportEquivocationUnsigned: AugmentedSubmittable<(equivocationProof: SpConsensusBeefyEquivocationProof | { first?: any; second?: any } | string | Uint8Array, keyOwnerProof: SpSessionMembershipProof | { session?: any; trieNodes?: any; validatorCount?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [SpConsensusBeefyEquivocationProof, SpSessionMembershipProof]>;
1003+
reportEquivocationUnsigned: AugmentedSubmittable<(equivocationProof: SpConsensusBeefyDoubleVotingProof | { first?: any; second?: any } | string | Uint8Array, keyOwnerProof: SpSessionMembershipProof | { session?: any; trieNodes?: any; validatorCount?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [SpConsensusBeefyDoubleVotingProof, SpSessionMembershipProof]>;
9941004
/**
9951005
* Reset BEEFY consensus by setting a new BEEFY genesis at `delay_in_blocks` blocks in the
9961006
* future.
@@ -5737,7 +5747,8 @@ declare module '@polkadot/api-base/types/submittable' {
57375747
* - Three extra DB entries.
57385748
*
57395749
* NOTE: Two of the storage writes (`Self::bonded`, `Self::payee`) are _never_ cleaned
5740-
* unless the `origin` falls below _existential deposit_ and gets removed as dust.
5750+
* unless the `origin` falls below _existential deposit_ (or equal to 0) and gets removed
5751+
* as dust.
57415752
**/
57425753
bond: AugmentedSubmittable<(value: Compact<u128> | AnyNumber | Uint8Array, payee: PalletStakingRewardDestination | { Staked: any } | { Stash: any } | { Controller: any } | { Account: any } | { None: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u128>, PalletStakingRewardDestination]>;
57435754
/**
@@ -5958,6 +5969,7 @@ declare module '@polkadot/api-base/types/submittable' {
59585969
*
59595970
* 1. the `total_balance` of the stash is below existential deposit.
59605971
* 2. or, the `ledger.total` of the stash is below existential deposit.
5972+
* 3. or, existential deposit is zero and either `total_balance` or `ledger.total` is zero.
59615973
*
59625974
* The former can happen in cases like a slash; the latter when a fully unbonded account
59635975
* is still receiving staking rewards in `RewardDestination::Staked`.

packages/types-augment/src/lookup/polkadot.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2261,6 +2261,13 @@ export default {
22612261
Para: 'u32'
22622262
}
22632263
},
2264+
/**
2265+
* Lookup451: sp_consensus_beefy::EquivocationProof<Number, sp_consensus_beefy::ecdsa_crypto::Public, sp_consensus_beefy::ecdsa_crypto::Signature>
2266+
**/
2267+
SpConsensusBeefyEquivocationProof: {
2268+
first: 'SpConsensusBeefyVoteMessage',
2269+
second: 'SpConsensusBeefyVoteMessage'
2270+
},
22642271
/**
22652272
* Lookup466: polkadot_runtime_common::claims::pallet::Event<T>
22662273
**/

0 commit comments

Comments
 (0)