diff --git a/packages/types-augment/src/registry.ts b/packages/types-augment/src/registry.ts index ef4004b26e..ef7926c21d 100644 --- a/packages/types-augment/src/registry.ts +++ b/packages/types-augment/src/registry.ts @@ -37,7 +37,7 @@ import type { ErrorMetadataLatest, ErrorMetadataV10, ErrorMetadataV11, ErrorMeta import type { MmrLeafProof } from '@polkadot/types/interfaces/mmr'; import type { StorageKind } from '@polkadot/types/interfaces/offchain'; import type { DeferredOffenceOf, Kind, OffenceDetails, Offender, OpaqueTimeSlot, ReportIdOf, Reporter } from '@polkadot/types/interfaces/offences'; -import type { AbridgedCandidateReceipt, AbridgedHostConfiguration, AbridgedHrmpChannel, AssignmentId, AssignmentKind, AttestedCandidate, AuctionIndex, AuthorityDiscoveryId, AvailabilityBitfield, AvailabilityBitfieldRecord, BackedCandidate, Bidder, BufferedSessionChange, CandidateCommitments, CandidateDescriptor, CandidateHash, CandidateInfo, CandidatePendingAvailability, CandidateReceipt, CollatorId, CollatorSignature, CommittedCandidateReceipt, CoreAssignment, CoreIndex, CoreOccupied, DisputeLocation, DisputeResult, DisputeState, DisputeStatement, DisputeStatementSet, DoubleVoteReport, DownwardMessage, ExplicitDisputeStatement, GlobalValidationData, GlobalValidationSchedule, GroupIndex, HeadData, HostConfiguration, HrmpChannel, HrmpChannelId, HrmpOpenChannelRequest, InboundDownwardMessage, InboundHrmpMessage, InboundHrmpMessages, IncomingParachain, IncomingParachainDeploy, IncomingParachainFixed, InvalidDisputeStatementKind, LeasePeriod, LeasePeriodOf, LocalValidationData, MessageIngestionType, MessageQueueChain, MessagingStateSnapshot, MessagingStateSnapshotEgressEntry, MultiDisputeStatementSet, NewBidder, OutboundHrmpMessage, ParaGenesisArgs, ParaId, ParaInfo, ParaLifecycle, ParaPastCodeMeta, ParaScheduling, ParaValidatorIndex, ParachainDispatchOrigin, ParachainInherentData, ParachainProposal, ParachainsInherentData, ParathreadClaim, ParathreadClaimQueue, ParathreadEntry, PersistedValidationData, QueuedParathread, RegisteredParachainInfo, RelayBlockNumber, RelayChainBlockNumber, RelayChainHash, RelayHash, Remark, ReplacementTimes, Retriable, Scheduling, ServiceQuality, SessionInfo, SessionInfoValidatorGroup, SignedAvailabilityBitfield, SignedAvailabilityBitfields, SigningContext, SlotRange, Statement, SubId, SystemInherentData, TransientValidationData, UpgradeGoAhead, UpgradeRestriction, UpwardMessage, ValidDisputeStatementKind, ValidationCode, ValidationCodeHash, ValidationData, ValidationDataType, ValidationFunctionParams, ValidatorSignature, ValidityAttestation, VecInboundHrmpMessage, WinnersData, WinnersDataTuple, WinningData, WinningDataEntry } from '@polkadot/types/interfaces/parachains'; +import type { AbridgedCandidateReceipt, AbridgedHostConfiguration, AbridgedHrmpChannel, AssignmentId, AssignmentKind, AttestedCandidate, AuctionIndex, AuthorityDiscoveryId, AvailabilityBitfield, AvailabilityBitfieldRecord, BackedCandidate, Bidder, BufferedSessionChange, CandidateCommitments, CandidateDescriptor, CandidateHash, CandidateInfo, CandidatePendingAvailability, CandidateReceipt, CollatorId, CollatorSignature, CommittedCandidateReceipt, CoreAssignment, CoreIndex, CoreOccupied, DisputeLocation, DisputeResult, DisputeState, DisputeStatement, DisputeStatementSet, DoubleVoteReport, DownwardMessage, ExplicitDisputeStatement, GlobalValidationData, GlobalValidationSchedule, GroupIndex, HeadData, HostConfiguration, HrmpChannel, HrmpChannelId, HrmpOpenChannelRequest, InboundDownwardMessage, InboundHrmpMessage, InboundHrmpMessages, IncomingParachain, IncomingParachainDeploy, IncomingParachainFixed, InvalidDisputeStatementKind, LeasePeriod, LeasePeriodOf, LocalValidationData, MessageIngestionType, MessageQueueChain, MessagingStateSnapshot, MessagingStateSnapshotEgressEntry, MultiDisputeStatementSet, NewBidder, OutboundHrmpMessage, ParaGenesisArgs, ParaId, ParaInfo, ParaLifecycle, ParaPastCodeMeta, ParaScheduling, ParaValidatorIndex, ParachainDispatchOrigin, ParachainInherentData, ParachainProposal, ParachainsInherentData, ParathreadClaim, ParathreadClaimQueue, ParathreadEntry, PersistedValidationData, QueuedParathread, RegisteredParachainInfo, RelayBlockNumber, RelayChainBlockNumber, RelayChainHash, RelayHash, Remark, ReplacementTimes, Retriable, Scheduling, ServiceQuality, SessionInfo, SessionInfoValidatorGroup, SignedAvailabilityBitfield, SignedAvailabilityBitfields, SigningContext, SlotRange, SlotRange10, Statement, SubId, SystemInherentData, TransientValidationData, UpgradeGoAhead, UpgradeRestriction, UpwardMessage, ValidDisputeStatementKind, ValidationCode, ValidationCodeHash, ValidationData, ValidationDataType, ValidationFunctionParams, ValidatorSignature, ValidityAttestation, VecInboundHrmpMessage, WinnersData, WinnersData10, WinnersDataTuple, WinnersDataTuple10, WinningData, WinningData10, WinningDataEntry } from '@polkadot/types/interfaces/parachains'; import type { FeeDetails, InclusionFee, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment'; import type { Approvals } from '@polkadot/types/interfaces/poll'; import type { ProxyAnnouncement, ProxyDefinition, ProxyType } from '@polkadot/types/interfaces/proxy'; @@ -907,6 +907,7 @@ declare module '@polkadot/types/types/registry' { Slot: Slot; SlotNumber: SlotNumber; SlotRange: SlotRange; + SlotRange10: SlotRange10; SocietyJudgement: SocietyJudgement; SocietyVote: SocietyVote; SolutionOrSnapshotSize: SolutionOrSnapshotSize; @@ -1073,8 +1074,11 @@ declare module '@polkadot/types/types/registry' { WildMultiAssetV1: WildMultiAssetV1; WildMultiAssetV2: WildMultiAssetV2; WinnersData: WinnersData; + WinnersData10: WinnersData10; WinnersDataTuple: WinnersDataTuple; + WinnersDataTuple10: WinnersDataTuple10; WinningData: WinningData; + WinningData10: WinningData10; WinningDataEntry: WinningDataEntry; WithdrawReasons: WithdrawReasons; Xcm: Xcm; diff --git a/packages/types/src/interfaces/parachains/slots.ts b/packages/types/src/interfaces/parachains/slots.ts index cf5a42f4c3..3e47da2fc9 100644 --- a/packages/types/src/interfaces/parachains/slots.ts +++ b/packages/types/src/interfaces/parachains/slots.ts @@ -6,7 +6,13 @@ import { objectSpread } from '@polkadot/util'; // order important in structs... :) /* eslint-disable sort-keys */ -const SLOT_RANGE_COUNT = 10; +const SlotRange10 = { + _enum: ['ZeroZero', 'ZeroOne', 'ZeroTwo', 'ZeroThree', 'OneOne', 'OneTwo', 'OneThree', 'TwoTwo', 'TwoThree', 'ThreeThree'] +}; + +const SlotRange = { + _enum: ['ZeroZero', 'ZeroOne', 'ZeroTwo', 'ZeroThree', 'ZeroFour', 'ZeroFive', 'ZeroSix', 'ZeroSeven', 'OneOne', 'OneTwo', 'OneThree', 'OneFour', 'OneFive', 'OneSix', 'OneSeven', 'TwoTwo', 'TwoThree', 'TwoFour', 'TwoFive', 'TwoSix', 'TwoSeven', 'ThreeThree', 'ThreeFour', 'ThreeFive', 'ThreeSix', 'ThreeSeven', 'FourFour', 'FourFive', 'FourSix', 'FourSeven', 'FiveFive', 'FiveSix', 'FiveSeven', 'SixSix', 'SixSeven', 'SevenSeven'] +}; const oldTypes = { Bidder: { @@ -42,11 +48,13 @@ export default objectSpread({}, oldTypes, { AuctionIndex: 'u32', LeasePeriod: 'BlockNumber', LeasePeriodOf: 'BlockNumber', - SlotRange: { - _enum: ['ZeroZero', 'ZeroOne', 'ZeroTwo', 'ZeroThree', 'OneOne', 'OneTwo', 'OneThree', 'TwoTwo', 'TwoThree', 'ThreeThree'] - }, - WinningData: `[WinningDataEntry; ${SLOT_RANGE_COUNT}]`, + SlotRange10, + SlotRange, + WinningData10: `[WinningDataEntry; ${SlotRange10._enum.length}]`, + WinningData: `[WinningDataEntry; ${SlotRange._enum.length}]`, WinningDataEntry: 'Option<(AccountId, ParaId, BalanceOf)>', + WinnersData10: 'Vec', WinnersData: 'Vec', + WinnersDataTuple10: '(AccountId, ParaId, BalanceOf, SlotRange10)', WinnersDataTuple: '(AccountId, ParaId, BalanceOf, SlotRange)' }); diff --git a/packages/types/src/interfaces/parachains/types.ts b/packages/types/src/interfaces/parachains/types.ts index d9827555fe..4817657e07 100644 --- a/packages/types/src/interfaces/parachains/types.ts +++ b/packages/types/src/interfaces/parachains/types.ts @@ -610,6 +610,47 @@ export interface SigningContext extends Struct { /** @name SlotRange */ export interface SlotRange extends Enum { + readonly isZeroZero: boolean; + readonly isZeroOne: boolean; + readonly isZeroTwo: boolean; + readonly isZeroThree: boolean; + readonly isZeroFour: boolean; + readonly isZeroFive: boolean; + readonly isZeroSix: boolean; + readonly isZeroSeven: boolean; + readonly isOneOne: boolean; + readonly isOneTwo: boolean; + readonly isOneThree: boolean; + readonly isOneFour: boolean; + readonly isOneFive: boolean; + readonly isOneSix: boolean; + readonly isOneSeven: boolean; + readonly isTwoTwo: boolean; + readonly isTwoThree: boolean; + readonly isTwoFour: boolean; + readonly isTwoFive: boolean; + readonly isTwoSix: boolean; + readonly isTwoSeven: boolean; + readonly isThreeThree: boolean; + readonly isThreeFour: boolean; + readonly isThreeFive: boolean; + readonly isThreeSix: boolean; + readonly isThreeSeven: boolean; + readonly isFourFour: boolean; + readonly isFourFive: boolean; + readonly isFourSix: boolean; + readonly isFourSeven: boolean; + readonly isFiveFive: boolean; + readonly isFiveSix: boolean; + readonly isFiveSeven: boolean; + readonly isSixSix: boolean; + readonly isSixSeven: boolean; + readonly isSevenSeven: boolean; + readonly type: 'ZeroZero' | 'ZeroOne' | 'ZeroTwo' | 'ZeroThree' | 'ZeroFour' | 'ZeroFive' | 'ZeroSix' | 'ZeroSeven' | 'OneOne' | 'OneTwo' | 'OneThree' | 'OneFour' | 'OneFive' | 'OneSix' | 'OneSeven' | 'TwoTwo' | 'TwoThree' | 'TwoFour' | 'TwoFive' | 'TwoSix' | 'TwoSeven' | 'ThreeThree' | 'ThreeFour' | 'ThreeFive' | 'ThreeSix' | 'ThreeSeven' | 'FourFour' | 'FourFive' | 'FourSix' | 'FourSeven' | 'FiveFive' | 'FiveSix' | 'FiveSeven' | 'SixSix' | 'SixSeven' | 'SevenSeven'; +} + +/** @name SlotRange10 */ +export interface SlotRange10 extends Enum { readonly isZeroZero: boolean; readonly isZeroOne: boolean; readonly isZeroTwo: boolean; @@ -721,12 +762,21 @@ export interface VecInboundHrmpMessage extends Vec {} /** @name WinnersData */ export interface WinnersData extends Vec {} +/** @name WinnersData10 */ +export interface WinnersData10 extends Vec {} + /** @name WinnersDataTuple */ export interface WinnersDataTuple extends ITuple<[AccountId, ParaId, BalanceOf, SlotRange]> {} +/** @name WinnersDataTuple10 */ +export interface WinnersDataTuple10 extends ITuple<[AccountId, ParaId, BalanceOf, SlotRange10]> {} + /** @name WinningData */ export interface WinningData extends Vec {} +/** @name WinningData10 */ +export interface WinningData10 extends Vec {} + /** @name WinningDataEntry */ export interface WinningDataEntry extends Option> {}