diff --git a/packages/api/src/base/Init.ts b/packages/api/src/base/Init.ts index 20508bb2a6..d8492e3e0e 100644 --- a/packages/api/src/base/Init.ts +++ b/packages/api/src/base/Init.ts @@ -31,7 +31,8 @@ const TYPES_FOR_POLKADOT: Record = { const TYPES_SUBSTRATE_1 = { BlockNumber: 'u64', Index: 'u64', - EventRecord: 'EventRecord0to76' + EventRecord: 'EventRecord0to76', + ValidatorPrefs: 'ValidatorPrefs0to145' }; // Type overrides for specific node types diff --git a/packages/types/src/interfaceRegistry.ts b/packages/types/src/interfaceRegistry.ts index d6d63f5a53..8ea9cf0f2d 100644 --- a/packages/types/src/interfaceRegistry.ts +++ b/packages/types/src/interfaceRegistry.ts @@ -19,7 +19,7 @@ import { AuthorityWeight, NextAuthority, PendingPause, PendingResume, StoredPend import { AuthIndex, AuthoritySignature, Heartbeat, OpaqueMultiaddr, OpaqueNetworkState, OpaquePeerId } from './interfaces/imOnline'; import { Kind, OffenceDetails, Offender, OpaqueTimeSlot, ReportIdOf, Reporter } from './interfaces/offences'; import { FullIdentification, IdentificationTuple, Keys, SessionIndex, SessionKeysPolkadot, SessionKeysSubstrate } from './interfaces/session'; -import { EraIndex, EraRewards, Exposure, Forcing, IndividualExposure, MomentOf, RewardDestination, SlashJournalEntry, StakingLedger, UnlockChunk, ValidatorPrefs } from './interfaces/staking'; +import { EraIndex, EraRewards, Exposure, Forcing, IndividualExposure, MomentOf, RewardDestination, SlashJournalEntry, StakingLedger, UnlockChunk, ValidatorPrefs, ValidatorPrefs0to145 } from './interfaces/staking'; import { DigestOf, Event, EventId, EventIndex, EventRecord, EventRecord0to76, Key, Phase } from './interfaces/system'; import { TreasuryProposal } from './interfaces/treasury'; import { BlockAttestations, IncludedBlocks, MoreAttestations } from './interfaces/attestations'; @@ -532,6 +532,9 @@ export interface InterfaceRegistry { ValidatorPrefs: ValidatorPrefs; 'Option': Option; 'Vec': Vec; + ValidatorPrefs0to145: ValidatorPrefs0to145; + 'Option': Option; + 'Vec': Vec; DigestOf: DigestOf; 'Option': Option; 'Vec': Vec; diff --git a/packages/types/src/interfaces/staking/definitions.ts b/packages/types/src/interfaces/staking/definitions.ts index e847f57d29..b4c2abdfa7 100644 --- a/packages/types/src/interfaces/staking/definitions.ts +++ b/packages/types/src/interfaces/staking/definitions.ts @@ -49,6 +49,9 @@ export default { era: 'Compact' }, ValidatorPrefs: { + validatorPayment: 'Compact' + }, + ValidatorPrefs0to145: { unstakeThreshold: 'Compact', validatorPayment: 'Compact' } diff --git a/packages/types/src/interfaces/staking/types.ts b/packages/types/src/interfaces/staking/types.ts index dead9b9e23..1f856a9596 100644 --- a/packages/types/src/interfaces/staking/types.ts +++ b/packages/types/src/interfaces/staking/types.ts @@ -89,6 +89,12 @@ export interface UnlockChunk extends Struct { /** Struct */ export interface ValidatorPrefs extends Struct { + /** Compact */ + readonly validatorPayment: Compact; +} + +/** Struct */ +export interface ValidatorPrefs0to145 extends Struct { /** Compact */ readonly unstakeThreshold: Compact; /** Compact */