ValidatorPrefs with commission: Perbill (#1618)
* ValidatorPrefs with commission: Perbill * Update naming for old interfaces * Compact commission
This commit is contained in:
@@ -21,7 +21,8 @@ const TYPES_POLKADOT_VERSIONED: VersionedType[] = [
|
||||
{
|
||||
minmax: [0, 1018], // CC2
|
||||
types: {
|
||||
Keys: 'SessionKeys4'
|
||||
Keys: 'SessionKeys4',
|
||||
ValidatorPrefs: 'ValidatorPrefsTo196'
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -46,8 +47,8 @@ const TYPES_META: VersionedType[] = [
|
||||
types: {
|
||||
BlockNumber: 'u64',
|
||||
Index: 'u64',
|
||||
EventRecord: 'EventRecord0to76',
|
||||
ValidatorPrefs: 'ValidatorPrefs0to145'
|
||||
EventRecord: 'EventRecordTo76',
|
||||
ValidatorPrefs: 'ValidatorPrefsTo145'
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
@@ -19,8 +19,8 @@ import { AuthorityIndex, AuthorityList, AuthorityWeight, NextAuthority, PendingP
|
||||
import { AuthIndex, AuthoritySignature, Heartbeat, OpaqueMultiaddr, OpaqueNetworkState, OpaquePeerId } from '@polkadot/types/interfaces/imOnline';
|
||||
import { Kind, OffenceDetails, Offender, OpaqueTimeSlot, ReportIdOf, Reporter } from '@polkadot/types/interfaces/offences';
|
||||
import { FullIdentification, IdentificationTuple, Keys, SessionIndex, SessionKeys1, SessionKeys2, SessionKeys3, SessionKeys4, SessionKeys5, SessionKeys6 } from '@polkadot/types/interfaces/session';
|
||||
import { EraIndex, EraPoints, EraRewards, Exposure, Forcing, IndividualExposure, MomentOf, Nominations, Points, RewardDestination, SlashJournalEntry, SlashingSpans, SpanIndex, SpanRecord, StakingLedger, UnappliedSlash, UnappliedSlashOther, UnlockChunk, ValidatorPrefs, ValidatorPrefs0to145 } from '@polkadot/types/interfaces/staking';
|
||||
import { DigestOf, DispatchError, Event, EventId, EventIndex, EventRecord, EventRecord0to76, Key, Phase } from '@polkadot/types/interfaces/system';
|
||||
import { EraIndex, EraPoints, EraRewards, Exposure, Forcing, IndividualExposure, MomentOf, Nominations, Points, RewardDestination, SlashJournalEntry, SlashingSpans, SpanIndex, SpanRecord, StakingLedger, UnappliedSlash, UnappliedSlashOther, UnlockChunk, ValidatorPrefs, ValidatorPrefsTo145, ValidatorPrefsTo196 } from '@polkadot/types/interfaces/staking';
|
||||
import { DigestOf, DispatchError, Event, EventId, EventIndex, EventRecord, EventRecordTo76, Key, Phase } from '@polkadot/types/interfaces/system';
|
||||
import { TreasuryProposal } from '@polkadot/types/interfaces/treasury';
|
||||
import { Multiplier } from '@polkadot/types/interfaces/txpayment';
|
||||
import { DispatchResult, DispatchResultOf } from '@polkadot/types/interfaces/utility';
|
||||
@@ -662,9 +662,12 @@ export interface InterfaceRegistry {
|
||||
ValidatorPrefs: ValidatorPrefs;
|
||||
'Option<ValidatorPrefs>': Option<ValidatorPrefs>;
|
||||
'Vec<ValidatorPrefs>': Vec<ValidatorPrefs>;
|
||||
ValidatorPrefs0to145: ValidatorPrefs0to145;
|
||||
'Option<ValidatorPrefs0to145>': Option<ValidatorPrefs0to145>;
|
||||
'Vec<ValidatorPrefs0to145>': Vec<ValidatorPrefs0to145>;
|
||||
ValidatorPrefsTo196: ValidatorPrefsTo196;
|
||||
'Option<ValidatorPrefsTo196>': Option<ValidatorPrefsTo196>;
|
||||
'Vec<ValidatorPrefsTo196>': Vec<ValidatorPrefsTo196>;
|
||||
ValidatorPrefsTo145: ValidatorPrefsTo145;
|
||||
'Option<ValidatorPrefsTo145>': Option<ValidatorPrefsTo145>;
|
||||
'Vec<ValidatorPrefsTo145>': Vec<ValidatorPrefsTo145>;
|
||||
DigestOf: DigestOf;
|
||||
'Option<DigestOf>': Option<DigestOf>;
|
||||
'Vec<DigestOf>': Vec<DigestOf>;
|
||||
@@ -684,9 +687,9 @@ export interface InterfaceRegistry {
|
||||
EventRecord: EventRecord;
|
||||
'Option<EventRecord>': Option<EventRecord>;
|
||||
'Vec<EventRecord>': Vec<EventRecord>;
|
||||
EventRecord0to76: EventRecord0to76;
|
||||
'Option<EventRecord0to76>': Option<EventRecord0to76>;
|
||||
'Vec<EventRecord0to76>': Vec<EventRecord0to76>;
|
||||
EventRecordTo76: EventRecordTo76;
|
||||
'Option<EventRecordTo76>': Option<EventRecordTo76>;
|
||||
'Vec<EventRecordTo76>': Vec<EventRecordTo76>;
|
||||
Key: Key;
|
||||
'Option<Key>': Option<Key>;
|
||||
'Vec<Key>': Vec<Key>;
|
||||
|
||||
@@ -78,9 +78,12 @@ export default {
|
||||
era: 'Compact<BlockNumber>'
|
||||
},
|
||||
ValidatorPrefs: {
|
||||
commission: 'Compact<Perbill>'
|
||||
},
|
||||
ValidatorPrefsTo196: {
|
||||
validatorPayment: 'Compact<Balance>'
|
||||
},
|
||||
ValidatorPrefs0to145: {
|
||||
ValidatorPrefsTo145: {
|
||||
unstakeThreshold: 'Compact<u32>',
|
||||
validatorPayment: 'Compact<Balance>'
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
import { ITuple } from '@polkadot/types/types';
|
||||
import { Compact, Enum, Struct, Vec } from '@polkadot/types/codec';
|
||||
import { bool, u32 } from '@polkadot/types/primitive';
|
||||
import { AccountId, Balance, BlockNumber, Moment } from '@polkadot/types/interfaces/runtime';
|
||||
import { AccountId, Balance, BlockNumber, Moment, Perbill } from '@polkadot/types/interfaces/runtime';
|
||||
|
||||
/** u32 */
|
||||
export interface EraIndex extends u32 {}
|
||||
@@ -151,14 +151,20 @@ export interface UnlockChunk extends Struct {
|
||||
|
||||
/** Struct */
|
||||
export interface ValidatorPrefs extends Struct {
|
||||
/** Compact<Balance> */
|
||||
readonly validatorPayment: Compact<Balance>;
|
||||
/** Compact<Perbill> */
|
||||
readonly commission: Compact<Perbill>;
|
||||
}
|
||||
|
||||
/** Struct */
|
||||
export interface ValidatorPrefs0to145 extends Struct {
|
||||
export interface ValidatorPrefsTo145 extends Struct {
|
||||
/** Compact<u32> */
|
||||
readonly unstakeThreshold: Compact<u32>;
|
||||
/** Compact<Balance> */
|
||||
readonly validatorPayment: Compact<Balance>;
|
||||
}
|
||||
|
||||
/** Struct */
|
||||
export interface ValidatorPrefsTo196 extends Struct {
|
||||
/** Compact<Balance> */
|
||||
readonly validatorPayment: Compact<Balance>;
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ export default {
|
||||
event: 'Event',
|
||||
topics: 'Vec<Hash>'
|
||||
},
|
||||
EventRecord0to76: {
|
||||
EventRecordTo76: {
|
||||
phase: 'Phase',
|
||||
event: 'Event'
|
||||
},
|
||||
|
||||
@@ -37,7 +37,7 @@ export interface EventRecord extends Struct {
|
||||
}
|
||||
|
||||
/** Struct */
|
||||
export interface EventRecord0to76 extends Struct {
|
||||
export interface EventRecordTo76 extends Struct {
|
||||
/** Phase */
|
||||
readonly phase: Phase;
|
||||
/** Event */
|
||||
|
||||
Reference in New Issue
Block a user