Swap releases type to shared enum (#2388)

* Swap releases type to u8

* Shared enum for releases

* Update metadata for new names
This commit is contained in:
Jaco Greeff
2020-06-23 17:40:15 +02:00
committed by GitHub
parent 4b55f1be93
commit 877eb11717
14 changed files with 40 additions and 78 deletions
+8 -17
View File
@@ -8,14 +8,14 @@ import { RawAuraPreDigest } from '@polkadot/types/interfaces/aura';
import { ExtrinsicOrHash, ExtrinsicStatus } from '@polkadot/types/interfaces/author';
import { UncleEntryItem } from '@polkadot/types/interfaces/authorship';
import { AllowedSlots, BabeAuthorityWeight, BabeBlockWeight, BabeEquivocationProof, BabeWeight, EpochAuthorship, MaybeRandomness, MaybeVrf, NextConfigDescriptor, NextConfigDescriptorV1, Randomness, RawBabePreDigest, RawBabePreDigestCompat, RawBabePreDigestPrimary, RawBabePreDigestPrimaryTo159, RawBabePreDigestSecondaryPlain, RawBabePreDigestSecondaryTo159, RawBabePreDigestSecondaryVRF, RawBabePreDigestTo159, SlotNumber, VrfData, VrfOutput, VrfProof } from '@polkadot/types/interfaces/babe';
import { AccountData, BalanceLock, BalanceLockTo212, BalanceStatus, Reasons, ReleasesBalances, VestingSchedule, WithdrawReasons } from '@polkadot/types/interfaces/balances';
import { AccountData, BalanceLock, BalanceLockTo212, BalanceStatus, Reasons, VestingSchedule, WithdrawReasons } from '@polkadot/types/interfaces/balances';
import { BlockHash } from '@polkadot/types/interfaces/chain';
import { PrefixedStorageKey } from '@polkadot/types/interfaces/childstate';
import { EthereumAddress, StatementKind } from '@polkadot/types/interfaces/claims';
import { MemberCount, ProposalIndex, Votes, VotesTo230 } from '@polkadot/types/interfaces/collective';
import { AuthorityId, RawVRFOutput } from '@polkadot/types/interfaces/consensus';
import { AliveContractInfo, CodeHash, ContractCallRequest, ContractExecResult, ContractExecResultSuccess, ContractInfo, ContractStorageKey, Gas, PrefabWasmModule, PrefabWasmModuleReserved, Schedule, ScheduleTo212, SeedOf, TombstoneContractInfo, TrieId } from '@polkadot/types/interfaces/contracts';
import { AccountVote, AccountVoteSplit, AccountVoteStandard, Conviction, Delegations, PreimageStatus, PreimageStatusAvailable, PriorLock, PropIndex, Proposal, ProxyState, ReferendumIndex, ReferendumInfo, ReferendumInfoFinished, ReferendumInfoTo239, ReferendumStatus, ReleasesDemocracy, Tally, Voting, VotingDelegating, VotingDirect, VotingDirectVote } from '@polkadot/types/interfaces/democracy';
import { AccountVote, AccountVoteSplit, AccountVoteStandard, Conviction, Delegations, PreimageStatus, PreimageStatusAvailable, PriorLock, PropIndex, Proposal, ProxyState, ReferendumIndex, ReferendumInfo, ReferendumInfoFinished, ReferendumInfoTo239, ReferendumStatus, Tally, Voting, VotingDelegating, VotingDirect, VotingDirectVote } from '@polkadot/types/interfaces/democracy';
import { ApprovalFlag, DefunctVoter, Renouncing, SetIndex, Vote, VoteIndex, VoteThreshold, VoterInfo } from '@polkadot/types/interfaces/elections';
import { CreatedBlock, ImportedAux } from '@polkadot/types/interfaces/engine';
import { Account, Log, Vicinity } from '@polkadot/types/interfaces/evm';
@@ -31,16 +31,16 @@ import { AbridgedCandidateReceipt, AttestedCandidate, AuctionIndex, Bidder, Cand
import { RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment';
import { ActiveRecovery, RecoveryConfig } from '@polkadot/types/interfaces/recovery';
import { RpcMethods } from '@polkadot/types/interfaces/rpc';
import { AccountId, AccountIdOf, AccountIndex, Address, AssetId, Balance, BalanceOf, Block, BlockNumber, Call, ChangesTrieConfiguration, Consensus, ConsensusEngineId, Digest, DigestItem, ExtrinsicsWeight, Fixed128, Fixed64, H160, H256, H512, Hash, Header, Index, Justification, KeyTypeId, KeyValue, LockIdentifier, LookupSource, LookupTarget, ModuleId, Moment, Origin, Pays, Perbill, Percent, Permill, Perquintill, Phantom, PhantomData, PreRuntime, ProxyType, RuntimeDbWeight, Seal, SealV0, SignedBlock, StorageData, ValidatorId, Weight, WeightMultiplier } from '@polkadot/types/interfaces/runtime';
import { AccountId, AccountIdOf, AccountIndex, Address, AssetId, Balance, BalanceOf, Block, BlockNumber, Call, ChangesTrieConfiguration, Consensus, ConsensusEngineId, Digest, DigestItem, ExtrinsicsWeight, Fixed128, Fixed64, H160, H256, H512, Hash, Header, Index, Justification, KeyTypeId, KeyValue, LockIdentifier, LookupSource, LookupTarget, ModuleId, Moment, Origin, Pays, Perbill, Percent, Permill, Perquintill, Phantom, PhantomData, PreRuntime, ProxyType, Releases, RuntimeDbWeight, Seal, SealV0, SignedBlock, StorageData, ValidatorId, Weight, WeightMultiplier } from '@polkadot/types/interfaces/runtime';
import { Period, Priority, SchedulePeriod, SchedulePriority, Scheduled, TaskAddress } from '@polkadot/types/interfaces/scheduler';
import { FullIdentification, IdentificationTuple, Keys, MembershipProof, SessionIndex, SessionKeys1, SessionKeys2, SessionKeys3, SessionKeys4, SessionKeys5, SessionKeys6, ValidatorCount } from '@polkadot/types/interfaces/session';
import { Bid, BidKind, SocietyJudgement, SocietyVote, StrikeCount, VouchingStatus } from '@polkadot/types/interfaces/society';
import { ActiveEraInfo, CompactAssignments, CompactScore, ElectionCompute, ElectionResult, ElectionScore, ElectionSize, 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 { ActiveEraInfo, CompactAssignments, CompactScore, ElectionCompute, ElectionResult, ElectionScore, ElectionSize, ElectionStatus, EraIndex, EraPoints, EraRewardPoints, EraRewards, Exposure, Forcing, IndividualExposure, KeyType, MomentOf, Nominations, NominatorIndex, OffchainAccuracy, PerU16, PhragmenScore, Points, 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, ApplyExtrinsicResult, ChainProperties, ChainType, DigestOf, DispatchClass, DispatchError, DispatchErrorModule, DispatchErrorTo198, DispatchInfo, DispatchInfoTo190, DispatchInfoTo244, DispatchOutcome, DispatchResult, DispatchResultOf, DispatchResultTo198, Event, EventId, EventIndex, EventRecord, EventRecordTo76, Health, InvalidTransaction, Key, LastRuntimeUpgradeInfo, NetworkState, NetworkStatePeerset, NetworkStatePeersetInfo, NodeRole, NotConnectedPeer, Peer, PeerEndpoint, PeerEndpointAddr, PeerInfo, PeerPing, Phase, RefCount, TransactionValidityError, UnknownTransaction } from '@polkadot/types/interfaces/system';
import { OpenTip, OpenTipFinder, OpenTipTip, TreasuryProposal } from '@polkadot/types/interfaces/treasury';
import { Multiplier, PaymentReleases } from '@polkadot/types/interfaces/txpayment';
import { Multiplier } from '@polkadot/types/interfaces/txpayment';
import { CallHash, Multisig, Timepoint } from '@polkadot/types/interfaces/utility';
import { VestingInfo } from '@polkadot/types/interfaces/vesting';
@@ -256,6 +256,9 @@ declare module '@polkadot/types/types/registry' {
ProxyType: ProxyType;
'Option<ProxyType>': Option<ProxyType>;
'Vec<ProxyType>': Vec<ProxyType>;
Releases: Releases;
'Option<Releases>': Option<Releases>;
'Vec<Releases>': Vec<Releases>;
RuntimeDbWeight: RuntimeDbWeight;
'Option<RuntimeDbWeight>': Option<RuntimeDbWeight>;
'Vec<RuntimeDbWeight>': Vec<RuntimeDbWeight>;
@@ -378,9 +381,6 @@ declare module '@polkadot/types/types/registry' {
BalanceStatus: BalanceStatus;
'Option<BalanceStatus>': Option<BalanceStatus>;
'Vec<BalanceStatus>': Vec<BalanceStatus>;
ReleasesBalances: ReleasesBalances;
'Option<ReleasesBalances>': Option<ReleasesBalances>;
'Vec<ReleasesBalances>': Vec<ReleasesBalances>;
Reasons: Reasons;
'Option<Reasons>': Option<Reasons>;
'Vec<Reasons>': Vec<Reasons>;
@@ -506,9 +506,6 @@ declare module '@polkadot/types/types/registry' {
ReferendumStatus: ReferendumStatus;
'Option<ReferendumStatus>': Option<ReferendumStatus>;
'Vec<ReferendumStatus>': Vec<ReferendumStatus>;
ReleasesDemocracy: ReleasesDemocracy;
'Option<ReleasesDemocracy>': Option<ReleasesDemocracy>;
'Vec<ReleasesDemocracy>': Vec<ReleasesDemocracy>;
Tally: Tally;
'Option<Tally>': Option<Tally>;
'Vec<Tally>': Vec<Tally>;
@@ -936,9 +933,6 @@ declare module '@polkadot/types/types/registry' {
PhragmenScore: PhragmenScore;
'Option<PhragmenScore>': Option<PhragmenScore>;
'Vec<PhragmenScore>': Vec<PhragmenScore>;
ReleasesStaking: ReleasesStaking;
'Option<ReleasesStaking>': Option<ReleasesStaking>;
'Vec<ReleasesStaking>': Vec<ReleasesStaking>;
RewardDestination: RewardDestination;
'Option<RewardDestination>': Option<RewardDestination>;
'Vec<RewardDestination>': Vec<RewardDestination>;
@@ -1130,9 +1124,6 @@ declare module '@polkadot/types/types/registry' {
Multiplier: Multiplier;
'Option<Multiplier>': Option<Multiplier>;
'Vec<Multiplier>': Vec<Multiplier>;
PaymentReleases: PaymentReleases;
'Option<PaymentReleases>': Option<PaymentReleases>;
'Vec<PaymentReleases>': Vec<PaymentReleases>;
CallHash: CallHash;
'Option<CallHash>': Option<CallHash>;
'Vec<CallHash>': Vec<CallHash>;
@@ -30,9 +30,6 @@ export default {
BalanceStatus: {
_enum: ['Free', 'Reserved']
},
ReleasesBalances: {
_enum: ['V1_0_0', 'V2_0_0']
},
Reasons: {
_enum: ['Fee', 'Misc', 'All']
},
@@ -40,12 +40,6 @@ export interface Reasons extends Enum {
readonly isAll: boolean;
}
/** @name ReleasesBalances */
export interface ReleasesBalances extends Enum {
readonly isV100: boolean;
readonly isV200: boolean;
}
/** @name VestingSchedule */
export interface VestingSchedule extends Struct {
readonly offset: Balance;
@@ -96,9 +96,6 @@ export default {
delay: 'BlockNumber',
tally: 'Tally'
},
ReleasesDemocracy: {
_enum: ['V1']
},
Tally: {
ayes: 'Balance',
nays: 'Balance',
@@ -112,11 +112,6 @@ export interface ReferendumStatus extends Struct {
readonly tally: Tally;
}
/** @name ReleasesDemocracy */
export interface ReleasesDemocracy extends Enum {
readonly isV1: boolean;
}
/** @name Tally */
export interface Tally extends Struct {
readonly ayes: Balance;
@@ -78,6 +78,9 @@ export default {
ProxyType: {
_enum: ['Any', 'NonTransfer', 'Governance', 'Staking']
},
Releases: {
_enum: ['V1', 'V2', 'V3', 'V4', 'V5', 'V6', 'V7', 'V8', 'V9', 'V10']
},
RuntimeDbWeight: {
read: 'Weight',
write: 'Weight'
@@ -171,6 +171,20 @@ export interface ProxyType extends Enum {
readonly isStaking: boolean;
}
/** @name Releases */
export interface Releases extends Enum {
readonly isV1: boolean;
readonly isV2: boolean;
readonly isV3: boolean;
readonly isV4: boolean;
readonly isV5: boolean;
readonly isV6: boolean;
readonly isV7: boolean;
readonly isV8: boolean;
readonly isV9: boolean;
readonly isV10: boolean;
}
/** @name RuntimeDbWeight */
export interface RuntimeDbWeight extends Struct {
readonly read: Weight;
@@ -100,9 +100,6 @@ export default {
PerU16: 'u16',
PhragmenScore: '[u128; 3]',
Points: 'u32',
ReleasesStaking: {
_enum: ['V1_0_0', 'V2_0_0', 'V3_0_0', 'V4_0_0']
},
RewardDestination: {
_enum: [
'Staked',
@@ -136,14 +136,6 @@ export interface PhragmenScore extends Vec<u128> {}
/** @name Points */
export interface Points extends u32 {}
/** @name ReleasesStaking */
export interface ReleasesStaking extends Enum {
readonly isV100: boolean;
readonly isV200: boolean;
readonly isV300: boolean;
readonly isV400: boolean;
}
/** @name RewardDestination */
export interface RewardDestination extends Enum {
readonly isStaked: boolean;
@@ -7,9 +7,6 @@ import { Definitions } from '../../types';
export default {
rpc: {},
types: {
Multiplier: 'Fixed128',
PaymentReleases: {
_enum: ['V1Ancient', 'V2']
}
Multiplier: 'Fixed128'
}
} as Definitions;
@@ -1,16 +1,9 @@
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
/* eslint-disable */
import { Enum } from '@polkadot/types/codec';
import { Fixed128 } from '@polkadot/types/interfaces/runtime';
/** @name Multiplier */
export interface Multiplier extends Fixed128 {}
/** @name PaymentReleases */
export interface PaymentReleases extends Enum {
readonly isV1Ancient: boolean;
readonly isV2: boolean;
}
export type PHANTOM_TXPAYMENT = 'txpayment';