Reset/Revert v1 of runtime query_info (w/ detect) (#5342)
* Reset/Revert v1 of runtime quety_info (w/ detect) * Add V2 struct
This commit is contained in:
@@ -46,7 +46,7 @@ import type { NpApiError } from '@polkadot/types/interfaces/nompools';
|
||||
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, CandidateEvent, CandidateHash, CandidateInfo, CandidatePendingAvailability, CandidateReceipt, CollatorId, CollatorSignature, CommittedCandidateReceipt, CoreAssignment, CoreIndex, CoreOccupied, CoreState, DisputeLocation, DisputeResult, DisputeState, DisputeStatement, DisputeStatementSet, DoubleVoteReport, DownwardMessage, ExplicitDisputeStatement, GlobalValidationData, GlobalValidationSchedule, GroupIndex, GroupRotationInfo, HeadData, HostConfiguration, HrmpChannel, HrmpChannelId, HrmpOpenChannelRequest, InboundDownwardMessage, InboundHrmpMessage, InboundHrmpMessages, IncomingParachain, IncomingParachainDeploy, IncomingParachainFixed, InvalidDisputeStatementKind, LeasePeriod, LeasePeriodOf, LocalValidationData, MessageIngestionType, MessageQueueChain, MessagingStateSnapshot, MessagingStateSnapshotEgressEntry, MultiDisputeStatementSet, NewBidder, OccupiedCore, OccupiedCoreAssumption, OldV1SessionInfo, OutboundHrmpMessage, ParaGenesisArgs, ParaId, ParaInfo, ParaLifecycle, ParaPastCodeMeta, ParaScheduling, ParaValidatorIndex, ParachainDispatchOrigin, ParachainInherentData, ParachainProposal, ParachainsInherentData, ParathreadClaim, ParathreadClaimQueue, ParathreadEntry, PersistedValidationData, PvfCheckStatement, QueuedParathread, RegisteredParachainInfo, RelayBlockNumber, RelayChainBlockNumber, RelayChainHash, RelayHash, Remark, ReplacementTimes, Retriable, ScheduledCore, Scheduling, ScrapedOnChainVotes, 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, RuntimeDispatchInfoV1 } from '@polkadot/types/interfaces/payment';
|
||||
import type { FeeDetails, InclusionFee, RuntimeDispatchInfo, RuntimeDispatchInfoV1, RuntimeDispatchInfoV2 } from '@polkadot/types/interfaces/payment';
|
||||
import type { Approvals } from '@polkadot/types/interfaces/poll';
|
||||
import type { ProxyAnnouncement, ProxyDefinition, ProxyType } from '@polkadot/types/interfaces/proxy';
|
||||
import type { AccountStatus, AccountValidity } from '@polkadot/types/interfaces/purchase';
|
||||
@@ -878,6 +878,7 @@ declare module '@polkadot/types/types/registry' {
|
||||
RuntimeDbWeight: RuntimeDbWeight;
|
||||
RuntimeDispatchInfo: RuntimeDispatchInfo;
|
||||
RuntimeDispatchInfoV1: RuntimeDispatchInfoV1;
|
||||
RuntimeDispatchInfoV2: RuntimeDispatchInfoV2;
|
||||
RuntimeVersion: RuntimeVersion;
|
||||
RuntimeVersionApi: RuntimeVersionApi;
|
||||
RuntimeVersionPartial: RuntimeVersionPartial;
|
||||
|
||||
@@ -32,6 +32,11 @@ export default {
|
||||
weight: 'WeightV1',
|
||||
class: 'DispatchClass',
|
||||
partialFee: 'Balance'
|
||||
},
|
||||
RuntimeDispatchInfoV2: {
|
||||
weight: 'WeightV2',
|
||||
class: 'DispatchClass',
|
||||
partialFee: 'Balance'
|
||||
}
|
||||
}
|
||||
} as Definitions;
|
||||
|
||||
@@ -74,7 +74,10 @@ export const runtime: DefinitionsCall = {
|
||||
type: 'u32'
|
||||
}
|
||||
],
|
||||
type: 'RuntimeDispatchInfoV1'
|
||||
// NOTE: _Should_ be V1 (as per current Substrate), however the interface was changed mid-flight between
|
||||
// versions. So we have some of each depending on runtime. (We do detect the weight type, so correct)
|
||||
// type: 'RuntimeDispatchInfoV1'
|
||||
type: 'RuntimeDispatchInfo'
|
||||
}
|
||||
}, V1_V2_SHARED_PAY),
|
||||
version: 1
|
||||
@@ -114,7 +117,10 @@ export const runtime: DefinitionsCall = {
|
||||
type: 'u32'
|
||||
}
|
||||
],
|
||||
type: 'RuntimeDispatchInfoV1'
|
||||
// NOTE: _Should_ be V1 (as per current Substrate), however the interface was changed mid-flight between
|
||||
// versions. So we have some of each depending on runtime. (We do detect the weight type, so correct)
|
||||
// type: 'RuntimeDispatchInfoV1'
|
||||
type: 'RuntimeDispatchInfo'
|
||||
}
|
||||
}, V1_V2_SHARED_CALL),
|
||||
version: 1
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/* eslint-disable */
|
||||
|
||||
import type { Option, Struct } from '@polkadot/types-codec';
|
||||
import type { Balance, Weight, WeightV1 } from '@polkadot/types/interfaces/runtime';
|
||||
import type { Balance, Weight, WeightV1, WeightV2 } from '@polkadot/types/interfaces/runtime';
|
||||
import type { DispatchClass } from '@polkadot/types/interfaces/system';
|
||||
|
||||
/** @name FeeDetails */
|
||||
@@ -31,4 +31,11 @@ export interface RuntimeDispatchInfoV1 extends Struct {
|
||||
readonly partialFee: Balance;
|
||||
}
|
||||
|
||||
/** @name RuntimeDispatchInfoV2 */
|
||||
export interface RuntimeDispatchInfoV2 extends Struct {
|
||||
readonly weight: WeightV2;
|
||||
readonly class: DispatchClass;
|
||||
readonly partialFee: Balance;
|
||||
}
|
||||
|
||||
export type PHANTOM_PAYMENT = 'payment';
|
||||
|
||||
Reference in New Issue
Block a user