Update metadata for current Polkadot/Substrate (#1999)
* Remove old Polkadot metadata (current only, Substrate tests cover) * Substrate & Polkadot metadata * VotesTo230
This commit is contained in:
@@ -7,9 +7,9 @@ import { BlockAttestations, IncludedBlocks, MoreAttestations } from '@polkadot/t
|
||||
import { RawAuraPreDigest } from '@polkadot/types/interfaces/aura';
|
||||
import { UncleEntryItem } from '@polkadot/types/interfaces/authorship';
|
||||
import { BabeAuthorityWeight, BabeBlockWeight, BabeWeight, MaybeVrf, RawBabePreDigest, RawBabePreDigestCompat, RawBabePreDigestPrimary, RawBabePreDigestPrimaryTo159, RawBabePreDigestSecondary, RawBabePreDigestSecondaryTo159, RawBabePreDigestTo159, SlotNumber, VrfData, VrfProof } from '@polkadot/types/interfaces/babe';
|
||||
import { AccountData, BalanceLock, BalanceLockTo212, Reasons, VestingSchedule, WithdrawReasons } from '@polkadot/types/interfaces/balances';
|
||||
import { AccountData, BalanceLock, BalanceLockTo212, Reasons, ReleasesBalances, VestingSchedule, WithdrawReasons } from '@polkadot/types/interfaces/balances';
|
||||
import { EthereumAddress } from '@polkadot/types/interfaces/claims';
|
||||
import { MemberCount, ProposalIndex, Votes } from '@polkadot/types/interfaces/collective';
|
||||
import { MemberCount, ProposalIndex, Votes, VotesTo230 } from '@polkadot/types/interfaces/collective';
|
||||
import { AuthorityId } 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 { Conviction, PropIndex, Proposal, ProxyState, ReferendumIndex, ReferendumInfo } from '@polkadot/types/interfaces/democracy';
|
||||
@@ -29,7 +29,7 @@ import { ApiId, BlockHash, ChainProperties, ExtrinsicOrHash, ExtrinsicStatus, He
|
||||
import { AccountId, AccountIdOf, AccountIndex, Address, AssetId, Balance, BalanceOf, Block, BlockNumber, Call, ChangesTrieConfiguration, Consensus, ConsensusEngineId, Digest, DigestItem, DispatchClass, DispatchInfo, DispatchInfoTo190, Fixed64, H160, H256, H512, Hash, Header, Index, Justification, KeyTypeId, KeyValue, LockIdentifier, LookupSource, LookupTarget, Moment, Origin, Perbill, Percent, Permill, Perquintill, Phantom, PhantomData, PreRuntime, Seal, SealV0, SignedBlock, StorageData, ValidatorId, Weight, WeightMultiplier } from '@polkadot/types/interfaces/runtime';
|
||||
import { FullIdentification, IdentificationTuple, Keys, SessionIndex, SessionKeys1, SessionKeys2, SessionKeys3, SessionKeys4, SessionKeys5, SessionKeys6 } from '@polkadot/types/interfaces/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, PhragmenScore, Points, RewardDestination, RewardPoint, SlashJournalEntry, SlashingSpans, SlashingSpansTo204, SpanIndex, SpanRecord, StakingLedger, StakingLedgerTo223, UnappliedSlash, UnappliedSlashOther, UnlockChunk, ValidatorIndex, ValidatorPrefs, ValidatorPrefsTo145, ValidatorPrefsTo196 } from '@polkadot/types/interfaces/staking';
|
||||
import { ActiveEraInfo, CompactAssignments, CompactScore, ElectionCompute, ElectionResult, ElectionStatus, EraIndex, EraPoints, EraRewardPoints, EraRewards, Exposure, Forcing, IndividualExposure, KeyType, MomentOf, Nominations, PhragmenScore, Points, ReleasesStaking, RewardDestination, RewardPoint, SlashJournalEntry, SlashingSpans, SlashingSpansTo204, SpanIndex, SpanRecord, StakingLedger, StakingLedgerTo223, UnappliedSlash, UnappliedSlashOther, UnlockChunk, ValidatorIndex, ValidatorPrefs, ValidatorPrefsTo145, ValidatorPrefsTo196 } from '@polkadot/types/interfaces/staking';
|
||||
import { AccountInfo, DigestOf, DispatchError, DispatchErrorModule, DispatchErrorTo198, DispatchResult, DispatchResultOf, DispatchResultTo198, Event, EventId, EventIndex, EventRecord, EventRecordTo76, Key, Phase, RefCount } from '@polkadot/types/interfaces/system';
|
||||
import { OpenTip, OpenTipFinder, OpenTipTip, TreasuryProposal } from '@polkadot/types/interfaces/treasury';
|
||||
import { Multiplier } from '@polkadot/types/interfaces/txpayment';
|
||||
@@ -331,6 +331,9 @@ declare module '@polkadot/types/types/registry' {
|
||||
BalanceLock: BalanceLock;
|
||||
'Option<BalanceLock>': Option<BalanceLock>;
|
||||
'Vec<BalanceLock>': Vec<BalanceLock>;
|
||||
ReleasesBalances: ReleasesBalances;
|
||||
'Option<ReleasesBalances>': Option<ReleasesBalances>;
|
||||
'Vec<ReleasesBalances>': Vec<ReleasesBalances>;
|
||||
Reasons: Reasons;
|
||||
'Option<Reasons>': Option<Reasons>;
|
||||
'Vec<Reasons>': Vec<Reasons>;
|
||||
@@ -348,6 +351,9 @@ declare module '@polkadot/types/types/registry' {
|
||||
'Compact<ProposalIndex>': Compact<ProposalIndex>;
|
||||
'Option<ProposalIndex>': Option<ProposalIndex>;
|
||||
'Vec<ProposalIndex>': Vec<ProposalIndex>;
|
||||
VotesTo230: VotesTo230;
|
||||
'Option<VotesTo230>': Option<VotesTo230>;
|
||||
'Vec<VotesTo230>': Vec<VotesTo230>;
|
||||
Votes: Votes;
|
||||
'Option<Votes>': Option<Votes>;
|
||||
'Vec<Votes>': Vec<Votes>;
|
||||
@@ -747,6 +753,9 @@ 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>;
|
||||
|
||||
@@ -21,6 +21,9 @@ export default {
|
||||
amount: 'Balance',
|
||||
reasons: 'Reasons'
|
||||
},
|
||||
ReleasesBalances: {
|
||||
_enum: ['V1_0_0', 'V2_0_0']
|
||||
},
|
||||
Reasons: {
|
||||
_enum: ['Fee', 'Misc', 'All']
|
||||
},
|
||||
|
||||
@@ -34,6 +34,12 @@ 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;
|
||||
|
||||
@@ -6,11 +6,18 @@ export default {
|
||||
types: {
|
||||
MemberCount: 'u32',
|
||||
ProposalIndex: 'u32',
|
||||
Votes: {
|
||||
VotesTo230: {
|
||||
index: 'ProposalIndex',
|
||||
threshold: 'MemberCount',
|
||||
ayes: 'Vec<AccountId>',
|
||||
nays: 'Vec<AccountId>'
|
||||
},
|
||||
Votes: {
|
||||
index: 'ProposalIndex',
|
||||
threshold: 'MemberCount',
|
||||
ayes: 'Vec<AccountId>',
|
||||
nays: 'Vec<AccountId>',
|
||||
end: 'BlockNumber'
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
import { Struct, Vec } from '@polkadot/types/codec';
|
||||
import { u32 } from '@polkadot/types/primitive';
|
||||
import { AccountId } from '@polkadot/types/interfaces/runtime';
|
||||
import { AccountId, BlockNumber } from '@polkadot/types/interfaces/runtime';
|
||||
|
||||
/** @name MemberCount */
|
||||
export interface MemberCount extends u32 {}
|
||||
@@ -17,4 +17,13 @@ export interface Votes extends Struct {
|
||||
readonly threshold: MemberCount;
|
||||
readonly ayes: Vec<AccountId>;
|
||||
readonly nays: Vec<AccountId>;
|
||||
readonly end: BlockNumber;
|
||||
}
|
||||
|
||||
/** @name VotesTo230 */
|
||||
export interface VotesTo230 extends Struct {
|
||||
readonly index: ProposalIndex;
|
||||
readonly threshold: MemberCount;
|
||||
readonly ayes: Vec<AccountId>;
|
||||
readonly nays: Vec<AccountId>;
|
||||
}
|
||||
|
||||
@@ -86,6 +86,9 @@ export default {
|
||||
},
|
||||
PhragmenScore: '[u128; 3]',
|
||||
Points: 'u32',
|
||||
ReleasesStaking: {
|
||||
_enum: ['V1_0_0', 'V2_0_0']
|
||||
},
|
||||
RewardDestination: {
|
||||
_enum: [
|
||||
'Staked',
|
||||
|
||||
@@ -118,6 +118,12 @@ 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;
|
||||
}
|
||||
|
||||
/** @name RewardDestination */
|
||||
export interface RewardDestination extends Enum {
|
||||
readonly isStaked: boolean;
|
||||
|
||||
@@ -12,6 +12,9 @@ const TYPES_MODULES: Record<string, OverrideModuleType> = {
|
||||
AccountInfo: 'ContractAccountInfo'
|
||||
},
|
||||
// current from here on
|
||||
balances: {
|
||||
Releases: 'ReleasesBalances'
|
||||
},
|
||||
contracts: {
|
||||
StorageKey: 'ContractStorageKey'
|
||||
},
|
||||
@@ -26,7 +29,8 @@ const TYPES_MODULES: Record<string, OverrideModuleType> = {
|
||||
Vote: 'SocietyVote'
|
||||
},
|
||||
staking: {
|
||||
Compact: 'CompactAssignments'
|
||||
Compact: 'CompactAssignments',
|
||||
Releases: 'ReleasesStaking'
|
||||
},
|
||||
treasury: {
|
||||
Proposal: 'TreasuryProposal'
|
||||
@@ -44,7 +48,8 @@ const TYPES_POLKADOT_VERSIONED: OverrideVersionedType[] = [
|
||||
Address: 'GenericAddress',
|
||||
BalanceLock: 'BalanceLockTo212',
|
||||
Keys: 'SessionKeys5',
|
||||
StakingLedger: 'StakingLedgerTo223'
|
||||
StakingLedger: 'StakingLedgerTo223',
|
||||
Votes: 'VotesTo230'
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -67,7 +72,8 @@ const TYPES_KUSAMA_VERSIONED: OverrideVersionedType[] = [
|
||||
DispatchError: 'DispatchErrorTo198',
|
||||
Keys: 'SessionKeys5',
|
||||
SlashingSpans: 'SlashingSpansTo204',
|
||||
StakingLedger: 'StakingLedgerTo223'
|
||||
StakingLedger: 'StakingLedgerTo223',
|
||||
Votes: 'VotesTo230'
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -77,7 +83,8 @@ const TYPES_KUSAMA_VERSIONED: OverrideVersionedType[] = [
|
||||
BalanceLock: 'BalanceLockTo212',
|
||||
Keys: 'SessionKeys5',
|
||||
SlashingSpans: 'SlashingSpansTo204',
|
||||
StakingLedger: 'StakingLedgerTo223'
|
||||
StakingLedger: 'StakingLedgerTo223',
|
||||
Votes: 'VotesTo230'
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -86,7 +93,8 @@ const TYPES_KUSAMA_VERSIONED: OverrideVersionedType[] = [
|
||||
Address: 'GenericAddress',
|
||||
BalanceLock: 'BalanceLockTo212',
|
||||
Keys: 'SessionKeys5',
|
||||
StakingLedger: 'StakingLedgerTo223'
|
||||
StakingLedger: 'StakingLedgerTo223',
|
||||
Votes: 'VotesTo230'
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user