Skip to content

Commit

Permalink
Add WeightToFeeCoefficient type
Browse files Browse the repository at this point in the history
Added to support paritytech/substrate#6076
  • Loading branch information
danforbes committed May 20, 2020
1 parent 0531124 commit 344ced9
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/types/src/augment/registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import { FullIdentification, IdentificationTuple, Keys, MembershipProof, Session
import { Bid, BidKind, SocietyJudgement, SocietyVote, StrikeCount, VouchingStatus } from '@polkadot/types/interfaces/society';
import { ActiveEraInfo, CompactAssignments, CompactScore, ElectionCompute, ElectionResult, ElectionStatus, EraIndex, EraPoints, EraRewardPoints, EraRewards, Exposure, Forcing, IndividualExposure, KeyType, MomentOf, Nominations, NominatorIndex, OffchainAccuracy, PerU16, PhragmenScore, Points, ReleasesStaking, RewardDestination, RewardPoint, SlashJournalEntry, SlashingSpans, SlashingSpansTo204, SpanIndex, SpanRecord, StakingLedger, StakingLedgerTo223, StakingLedgerTo240, UnappliedSlash, UnappliedSlashOther, UnlockChunk, ValidatorIndex, ValidatorPrefs, ValidatorPrefsTo145, ValidatorPrefsTo196 } from '@polkadot/types/interfaces/staking';
import { ApiId, KeyValueOption, ReadProof, RuntimeVersion, RuntimeVersionApi, StorageChangeSet } from '@polkadot/types/interfaces/state';
import { WeightToFeeCoefficient } from '@polkadot/types/interfaces/support';
import { AccountInfo, ChainProperties, ChainType, DigestOf, DispatchError, DispatchErrorModule, DispatchErrorTo198, DispatchResult, DispatchResultOf, DispatchResultTo198, Event, EventId, EventIndex, EventRecord, EventRecordTo76, Health, Key, LastRuntimeUpgradeInfo, NetworkState, NetworkStatePeerset, NetworkStatePeersetInfo, NodeRole, NotConnectedPeer, Peer, PeerEndpoint, PeerEndpointAddr, PeerInfo, PeerPing, Phase, RefCount } from '@polkadot/types/interfaces/system';
import { OpenTip, OpenTipFinder, OpenTipTip, TreasuryProposal } from '@polkadot/types/interfaces/treasury';
import { Multiplier } from '@polkadot/types/interfaces/txpayment';
Expand Down Expand Up @@ -965,6 +966,9 @@ declare module '@polkadot/types/types/registry' {
ValidatorPrefsTo145: ValidatorPrefsTo145;
'Option<ValidatorPrefsTo145>': Option<ValidatorPrefsTo145>;
'Vec<ValidatorPrefsTo145>': Vec<ValidatorPrefsTo145>;
WeightToFeeCoefficient: WeightToFeeCoefficient;
'Option<WeightToFeeCoefficient>': Option<WeightToFeeCoefficient>;
'Vec<WeightToFeeCoefficient>': Vec<WeightToFeeCoefficient>;
AccountInfo: AccountInfo;
'Option<AccountInfo>': Option<AccountInfo>;
'Vec<AccountInfo>': Vec<AccountInfo>;
Expand Down
1 change: 1 addition & 0 deletions packages/types/src/interfaces/definitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export { default as scheduler } from './scheduler/definitions';
export { default as session } from './session/definitions';
export { default as society } from './society/definitions';
export { default as staking } from './staking/definitions';
export { default as support } from './support/definitions';
export { default as system } from './system/definitions';
export { default as treasury } from './treasury/definitions';
export { default as txpayment } from './txpayment/definitions';
Expand Down
20 changes: 20 additions & 0 deletions packages/types/src/interfaces/support/definitions.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Copyright 2017-2020 @polkadot/types authors & contributors
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.

// order important in structs... :)
/* eslint-disable sort-keys */

import { Definitions } from '../../types';

export default {
rpc: {},
types: {
WeightToFeeCoefficient: {
coeffInteger: 'Balance',
coeffFrac: 'Perbill',
negative: 'bool',
degree: 'u8'
}
}
} as Definitions;
4 changes: 4 additions & 0 deletions packages/types/src/interfaces/support/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
/* eslint-disable */

export * from './types';
16 changes: 16 additions & 0 deletions packages/types/src/interfaces/support/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
/* eslint-disable */

import { Struct } from '@polkadot/types/codec';
import { bool, u8 } from '@polkadot/types/primitive';
import { Balance, Perbill } from '@polkadot/types/interfaces/runtime';

/** @name WeightToFeeCoefficient */
export interface WeightToFeeCoefficient extends Struct {
readonly coeffInteger: Balance;
readonly coeffFrac: Perbill;
readonly negative: bool;
readonly degree: u8;
}

export type PHANTOM_SUPPORT = 'support';
1 change: 1 addition & 0 deletions packages/types/src/interfaces/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export * from './scheduler/types';
export * from './session/types';
export * from './society/types';
export * from './staking/types';
export * from './support/types';
export * from './system/types';
export * from './treasury/types';
export * from './txpayment/types';
Expand Down

0 comments on commit 344ced9

Please sign in to comment.