Known Kusama update (slight upgrades rework) (#2567)
* Known Kusama update (slight upgrades rework) * linting
This commit is contained in:
@@ -3,16 +3,30 @@
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { ChainUpgrades } from '@polkadot/types/types';
|
||||
import { ChainUpgradesRaw } from './types';
|
||||
|
||||
import BN from 'bn.js';
|
||||
import { hexToU8a } from '@polkadot/util';
|
||||
|
||||
import kusama from './kusama';
|
||||
import polkadot from './polkadot';
|
||||
import westend from './westend';
|
||||
|
||||
function rawToFinal ({ genesisHash, versions }: ChainUpgradesRaw): ChainUpgrades {
|
||||
return {
|
||||
genesisHash: hexToU8a(genesisHash),
|
||||
versions: versions.map(([blockNumber, specVersion]) => ({
|
||||
blockNumber: new BN(blockNumber),
|
||||
specVersion: new BN(specVersion)
|
||||
}))
|
||||
};
|
||||
}
|
||||
|
||||
// Type overrides for specific spec types & versions as given in runtimeVersion
|
||||
const upgrades: ChainUpgrades[] = [
|
||||
kusama,
|
||||
polkadot,
|
||||
westend
|
||||
rawToFinal(kusama),
|
||||
rawToFinal(polkadot),
|
||||
rawToFinal(westend)
|
||||
];
|
||||
|
||||
export default upgrades;
|
||||
|
||||
@@ -2,13 +2,10 @@
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { ChainUpgrades } from '@polkadot/types/types';
|
||||
import { ChainUpgradesRaw } from './types';
|
||||
|
||||
import BN from 'bn.js';
|
||||
import { hexToU8a } from '@polkadot/util';
|
||||
|
||||
const upgrades: ChainUpgrades = {
|
||||
genesisHash: hexToU8a('0xb0a8d493285c2df73290dfb7e61f870f17b41801197a149ca93654499ea3dafe'),
|
||||
const upgrades: ChainUpgradesRaw = {
|
||||
genesisHash: '0xb0a8d493285c2df73290dfb7e61f870f17b41801197a149ca93654499ea3dafe',
|
||||
versions: [
|
||||
[0, 1020], [26669, 1021], [38245, 1022], [54248, 1023], [59659, 1024],
|
||||
[67651, 1025], [82191, 1027], [83238, 1028], [101503, 1029], [203466, 1030],
|
||||
@@ -16,11 +13,9 @@ const upgrades: ChainUpgrades = {
|
||||
[653183, 1040], [693488, 1042], [901442, 1045], [1375086, 1050], [1445458, 1051],
|
||||
[1472960, 1052], [1475648, 1053], [1491596, 1054], [1574408, 1055], [2064961, 1058],
|
||||
[2201991, 1062], [2671528, 2005], [2704202, 2007], [2728002, 2008], [2832534, 2011],
|
||||
[2962294, 2012], [3240000, 2013], [3274408, 2015], [3323565, 2019], [3534175, 2022]
|
||||
].map(([blockNumber, specVersion]) => ({
|
||||
blockNumber: new BN(blockNumber),
|
||||
specVersion: new BN(specVersion)
|
||||
}))
|
||||
[2962294, 2012], [3240000, 2013], [3274408, 2015], [3323565, 2019], [3534175, 2022],
|
||||
[3860281, 2023]
|
||||
]
|
||||
};
|
||||
|
||||
export default upgrades;
|
||||
|
||||
@@ -2,22 +2,16 @@
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { ChainUpgrades } from '@polkadot/types/types';
|
||||
import { ChainUpgradesRaw } from './types';
|
||||
|
||||
import BN from 'bn.js';
|
||||
import { hexToU8a } from '@polkadot/util';
|
||||
|
||||
const upgrades: ChainUpgrades = {
|
||||
genesisHash: hexToU8a('0x91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3'),
|
||||
const upgrades: ChainUpgradesRaw = {
|
||||
genesisHash: '0x91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3',
|
||||
versions: [
|
||||
[0, 0], [29231, 1], [188836, 5], [199405, 6], [214264, 7],
|
||||
[244358, 8], [303079, 9], [314201, 10], [342400, 11], [443963, 12],
|
||||
[528470, 13], [687751, 14], [746085, 15], [787923, 16], [799302, 17],
|
||||
[1205128, 18]
|
||||
].map(([blockNumber, specVersion]) => ({
|
||||
blockNumber: new BN(blockNumber),
|
||||
specVersion: new BN(specVersion)
|
||||
}))
|
||||
]
|
||||
};
|
||||
|
||||
export default upgrades;
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
// Copyright 2017-2020 @polkadot/types-known authors & contributors
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
export interface ChainUpgradesRaw {
|
||||
genesisHash: string;
|
||||
versions: [number, number][];
|
||||
}
|
||||
@@ -2,22 +2,16 @@
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { ChainUpgrades } from '@polkadot/types/types';
|
||||
import { ChainUpgradesRaw } from './types';
|
||||
|
||||
import BN from 'bn.js';
|
||||
import { hexToU8a } from '@polkadot/util';
|
||||
|
||||
const upgrades: ChainUpgrades = {
|
||||
genesisHash: hexToU8a('0xe143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e'),
|
||||
const upgrades: ChainUpgradesRaw = {
|
||||
genesisHash: '0xe143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e',
|
||||
versions: [
|
||||
[214356, 4], [392764, 7], [409740, 8], [809976, 20], [877581, 24],
|
||||
[879238, 25], [889472, 26], [902937, 27], [932751, 28], [991142, 29],
|
||||
[1030162, 31], [1119657, 32], [1199282, 33], [1342534, 34], [1392263, 35],
|
||||
[1431703, 36], [1433369, 37], [1490972, 41]
|
||||
].map(([blockNumber, specVersion]) => ({
|
||||
blockNumber: new BN(blockNumber),
|
||||
specVersion: new BN(specVersion)
|
||||
}))
|
||||
]
|
||||
};
|
||||
|
||||
export default upgrades;
|
||||
|
||||
Reference in New Issue
Block a user