Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Substrate Metadata to latest #5896

Merged
merged 2 commits into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/api-augment/src/substrate/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2873,6 +2873,10 @@ declare module '@polkadot/api-base/types/errors' {
* staking settings to keep things safe for the runtime.
**/
TooManyValidators: AugmentedError<ApiType>;
/**
* Operation not allowed for virtual stakers.
**/
VirtualStakerNotAllowed: AugmentedError<ApiType>;
/**
* Generic error
**/
Expand Down
16 changes: 16 additions & 0 deletions packages/api-augment/src/substrate/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,10 @@ declare module '@polkadot/api-base/types/events' {
* Some asset class was created.
**/
Created: AugmentedEvent<ApiType, [assetId: u32, creator: AccountId32, owner: AccountId32], { assetId: u32, creator: AccountId32, owner: AccountId32 }>;
/**
* Some assets were deposited (e.g. for transaction fees).
**/
Deposited: AugmentedEvent<ApiType, [assetId: u32, who: AccountId32, amount: u128], { assetId: u32, who: AccountId32, amount: u128 }>;
/**
* An asset class was destroyed.
**/
Expand Down Expand Up @@ -272,6 +276,10 @@ declare module '@polkadot/api-base/types/events' {
* the approved `delegate`.
**/
TransferredApproved: AugmentedEvent<ApiType, [assetId: u32, owner: AccountId32, delegate: AccountId32, destination: AccountId32, amount: u128], { assetId: u32, owner: AccountId32, delegate: AccountId32, destination: AccountId32, amount: u128 }>;
/**
* Some assets were withdrawn from the account (e.g. for transaction fees).
**/
Withdrawn: AugmentedEvent<ApiType, [assetId: u32, who: AccountId32, amount: u128], { assetId: u32, who: AccountId32, amount: u128 }>;
/**
* Generic event
**/
Expand Down Expand Up @@ -1558,6 +1566,10 @@ declare module '@polkadot/api-base/types/events' {
* Some asset class was created.
**/
Created: AugmentedEvent<ApiType, [assetId: u32, creator: AccountId32, owner: AccountId32], { assetId: u32, creator: AccountId32, owner: AccountId32 }>;
/**
* Some assets were deposited (e.g. for transaction fees).
**/
Deposited: AugmentedEvent<ApiType, [assetId: u32, who: AccountId32, amount: u128], { assetId: u32, who: AccountId32, amount: u128 }>;
/**
* An asset class was destroyed.
**/
Expand Down Expand Up @@ -1611,6 +1623,10 @@ declare module '@polkadot/api-base/types/events' {
* the approved `delegate`.
**/
TransferredApproved: AugmentedEvent<ApiType, [assetId: u32, owner: AccountId32, delegate: AccountId32, destination: AccountId32, amount: u128], { assetId: u32, owner: AccountId32, delegate: AccountId32, destination: AccountId32, amount: u128 }>;
/**
* Some assets were withdrawn from the account (e.g. for transaction fees).
**/
Withdrawn: AugmentedEvent<ApiType, [assetId: u32, who: AccountId32, amount: u128], { assetId: u32, who: AccountId32, amount: u128 }>;
/**
* Generic event
**/
Expand Down
22 changes: 10 additions & 12 deletions packages/api-augment/src/substrate/query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1888,6 +1888,16 @@ declare module '@polkadot/api-base/types/storage' {
* This is basically in sync with the call to [`pallet_session::SessionManager::new_session`].
**/
currentPlannedSession: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
/**
* 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.
**/
disabledValidators: AugmentedQuery<ApiType, () => Observable<Vec<u32>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Rewards for the last [`Config::HistoryDepth`] eras.
* If reward hasn't been set or has been removed then 0 reward is returned.
Expand Down Expand Up @@ -2056,18 +2066,6 @@ declare module '@polkadot/api-base/types/storage' {
* All slashing events on nominators, mapped by era to the highest slash value of the era.
**/
nominatorSlashInEra: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: AccountId32 | string | Uint8Array) => Observable<Option<u128>>, [u32, AccountId32]> & QueryableStorageEntry<ApiType, [u32, AccountId32]>;
/**
* Indices of validators that have offended in the active era and whether they are currently
* disabled.
*
* This value should be a superset of disabled validators since not all offences lead to the
* validator being disabled (if there was no slash). This is needed to track the percentage of
* validators that have offended in the current era, ensuring a new era is forced if
* `OffendingValidatorsThreshold` is reached. The vec is always kept sorted so that we can find
* whether a given validator has previously offended using binary search. It gets cleared when
* the era ends.
**/
offendingValidators: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[u32, bool]>>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Where the reward payment should be made. Keyed by stash.
*
Expand Down
20 changes: 16 additions & 4 deletions packages/api-augment/src/substrate/tx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import type { Data } from '@polkadot/types';
import type { Bytes, Compact, Option, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
import type { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types';
import type { AccountId32, Call, H256, MultiAddress, Perbill, Percent, Perquintill } from '@polkadot/types/interfaces/runtime';
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';
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';

export type __AugmentedSubmittable = AugmentedSubmittable<() => unknown>;
export type __SubmittableExtrinsic<ApiType extends ApiTypes> = SubmittableExtrinsic<ApiType>;
Expand Down Expand Up @@ -893,6 +893,16 @@ declare module '@polkadot/api-base/types/submittable' {
[key: string]: SubmittableExtrinsicFunction<ApiType>;
};
balances: {
/**
* Burn the specified liquid free balance from the origin account.
*
* If the origin's account ends up below the existential deposit as a result
* of the burn and `keep_alive` is false, the account will be reaped.
*
* Unlike sending funds to a _burn_ address, which merely makes the funds inaccessible,
* this `burn` operation will reduce total issuance by the amount _burned_.
**/
burn: AugmentedSubmittable<(value: Compact<u128> | AnyNumber | Uint8Array, keepAlive: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u128>, bool]>;
/**
* Adjust the total issuance in a saturating way.
*
Expand Down Expand Up @@ -978,7 +988,7 @@ declare module '@polkadot/api-base/types/submittable' {
* against the extracted offender. If both are valid, the offence
* will be reported.
**/
reportEquivocation: AugmentedSubmittable<(equivocationProof: SpConsensusBeefyEquivocationProof | { first?: any; second?: any } | string | Uint8Array, keyOwnerProof: SpSessionMembershipProof | { session?: any; trieNodes?: any; validatorCount?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [SpConsensusBeefyEquivocationProof, SpSessionMembershipProof]>;
reportEquivocation: AugmentedSubmittable<(equivocationProof: SpConsensusBeefyDoubleVotingProof | { first?: any; second?: any } | string | Uint8Array, keyOwnerProof: SpSessionMembershipProof | { session?: any; trieNodes?: any; validatorCount?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [SpConsensusBeefyDoubleVotingProof, SpSessionMembershipProof]>;
/**
* Report voter equivocation/misbehavior. This method will verify the
* equivocation proof and validate the given key ownership proof
Expand All @@ -990,7 +1000,7 @@ declare module '@polkadot/api-base/types/submittable' {
* if the block author is defined it will be defined as the equivocation
* reporter.
**/
reportEquivocationUnsigned: AugmentedSubmittable<(equivocationProof: SpConsensusBeefyEquivocationProof | { first?: any; second?: any } | string | Uint8Array, keyOwnerProof: SpSessionMembershipProof | { session?: any; trieNodes?: any; validatorCount?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [SpConsensusBeefyEquivocationProof, SpSessionMembershipProof]>;
reportEquivocationUnsigned: AugmentedSubmittable<(equivocationProof: SpConsensusBeefyDoubleVotingProof | { first?: any; second?: any } | string | Uint8Array, keyOwnerProof: SpSessionMembershipProof | { session?: any; trieNodes?: any; validatorCount?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [SpConsensusBeefyDoubleVotingProof, SpSessionMembershipProof]>;
/**
* Reset BEEFY consensus by setting a new BEEFY genesis at `delay_in_blocks` blocks in the
* future.
Expand Down Expand Up @@ -5737,7 +5747,8 @@ declare module '@polkadot/api-base/types/submittable' {
* - Three extra DB entries.
*
* NOTE: Two of the storage writes (`Self::bonded`, `Self::payee`) are _never_ cleaned
* unless the `origin` falls below _existential deposit_ and gets removed as dust.
* unless the `origin` falls below _existential deposit_ (or equal to 0) and gets removed
* as dust.
**/
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]>;
/**
Expand Down Expand Up @@ -5958,6 +5969,7 @@ declare module '@polkadot/api-base/types/submittable' {
*
* 1. the `total_balance` of the stash is below existential deposit.
* 2. or, the `ledger.total` of the stash is below existential deposit.
* 3. or, existential deposit is zero and either `total_balance` or `ledger.total` is zero.
*
* The former can happen in cases like a slash; the latter when a fully unbonded account
* is still receiving staking rewards in `RewardDestination::Staked`.
Expand Down
7 changes: 7 additions & 0 deletions packages/types-augment/src/lookup/polkadot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2261,6 +2261,13 @@ export default {
Para: 'u32'
}
},
/**
* Lookup451: sp_consensus_beefy::EquivocationProof<Number, sp_consensus_beefy::ecdsa_crypto::Public, sp_consensus_beefy::ecdsa_crypto::Signature>
**/
SpConsensusBeefyEquivocationProof: {
first: 'SpConsensusBeefyVoteMessage',
second: 'SpConsensusBeefyVoteMessage'
},
/**
* Lookup466: polkadot_runtime_common::claims::pallet::Event<T>
**/
Expand Down
Loading
Loading