From 16e9a6494131880a53631372ce611b88bca451d8 Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Sat, 23 Jan 2021 12:16:10 +0100 Subject: [PATCH] Allow multiples in system.properties (decimals, tokens) (#3093) * Allow multiples in syste.propertis (decimals, tokens) * registry.chain{Decimals, Token} returns array values * Bump common * AbstractInt format with first decimal/token * Adjust ss58Format consistency * u8 decimals/format * cleanups * More slight weidness * Adjust all t u32 * Cleanup properties format from Codec --- packages/api-contract/package.json | 2 +- packages/api-derive/package.json | 6 +- packages/api/package.json | 6 +- packages/metadata/package.json | 6 +- packages/rpc-core/package.json | 4 +- packages/rpc-provider/package.json | 10 +- packages/typegen/package.json | 2 +- packages/types-known/package.json | 2 +- packages/types/package.json | 6 +- packages/types/src/codec/AbstractInt.ts | 4 +- packages/types/src/codec/Json.ts | 10 +- packages/types/src/create/registry.ts | 28 ++-- .../types/src/generic/ChainProperties.spec.ts | 87 +++++++++++ packages/types/src/generic/ChainProperties.ts | 84 +++++++++++ packages/types/src/generic/index.ts | 1 + .../interfaces/system/ChainProperties.spec.ts | 34 ----- .../src/interfaces/system/definitions.ts | 6 +- packages/types/src/interfaces/system/types.ts | 8 +- packages/types/src/types/registry.ts | 4 +- yarn.lock | 136 +++++++++--------- 20 files changed, 298 insertions(+), 148 deletions(-) create mode 100644 packages/types/src/generic/ChainProperties.spec.ts create mode 100644 packages/types/src/generic/ChainProperties.ts delete mode 100644 packages/types/src/interfaces/system/ChainProperties.spec.ts diff --git a/packages/api-contract/package.json b/packages/api-contract/package.json index 1e5a3d5035..cdde7a1e22 100644 --- a/packages/api-contract/package.json +++ b/packages/api-contract/package.json @@ -16,7 +16,7 @@ "@babel/runtime": "^7.12.5", "@polkadot/api": "3.5.2-10", "@polkadot/types": "3.5.2-10", - "@polkadot/util": "^5.3.2-7", + "@polkadot/util": "^5.3.2-8", "@polkadot/x-rxjs": "3.5.2-1", "bn.js": "^4.11.9" } diff --git a/packages/api-derive/package.json b/packages/api-derive/package.json index 52053327ed..e7b9e91b4d 100644 --- a/packages/api-derive/package.json +++ b/packages/api-derive/package.json @@ -17,13 +17,13 @@ "@polkadot/api": "3.5.2-10", "@polkadot/rpc-core": "3.5.2-10", "@polkadot/types": "3.5.2-10", - "@polkadot/util": "^5.3.2-7", - "@polkadot/util-crypto": "^5.3.2-7", + "@polkadot/util": "^5.3.2-8", + "@polkadot/util-crypto": "^5.3.2-8", "@polkadot/x-rxjs": "3.5.2-1", "bn.js": "^4.11.9" }, "devDependencies": { - "@polkadot/keyring": "^5.3.2-7", + "@polkadot/keyring": "^5.3.2-8", "@polkadot/rpc-provider": "3.5.2-10" } } diff --git a/packages/api/package.json b/packages/api/package.json index bd6b12f555..0fc688723a 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -18,14 +18,14 @@ "dependencies": { "@babel/runtime": "^7.12.5", "@polkadot/api-derive": "3.5.2-10", - "@polkadot/keyring": "^5.3.2-7", + "@polkadot/keyring": "^5.3.2-8", "@polkadot/metadata": "3.5.2-10", "@polkadot/rpc-core": "3.5.2-10", "@polkadot/rpc-provider": "3.5.2-10", "@polkadot/types": "3.5.2-10", "@polkadot/types-known": "3.5.2-10", - "@polkadot/util": "^5.3.2-7", - "@polkadot/util-crypto": "^5.3.2-7", + "@polkadot/util": "^5.3.2-8", + "@polkadot/util-crypto": "^5.3.2-8", "@polkadot/x-rxjs": "3.5.2-1", "bn.js": "^4.11.9", "eventemitter3": "^4.0.7" diff --git a/packages/metadata/package.json b/packages/metadata/package.json index 614ae9aca4..b7aa0d3996 100644 --- a/packages/metadata/package.json +++ b/packages/metadata/package.json @@ -19,11 +19,11 @@ "@babel/runtime": "^7.12.5", "@polkadot/types": "3.5.2-10", "@polkadot/types-known": "3.5.2-10", - "@polkadot/util": "^5.3.2-7", - "@polkadot/util-crypto": "^5.3.2-7", + "@polkadot/util": "^5.3.2-8", + "@polkadot/util-crypto": "^5.3.2-8", "bn.js": "^4.11.9" }, "devDependencies": { - "@polkadot/keyring": "^5.3.2-7" + "@polkadot/keyring": "^5.3.2-8" } } diff --git a/packages/rpc-core/package.json b/packages/rpc-core/package.json index 02a52200b2..12b23e15ff 100644 --- a/packages/rpc-core/package.json +++ b/packages/rpc-core/package.json @@ -17,10 +17,10 @@ "@polkadot/metadata": "3.5.2-10", "@polkadot/rpc-provider": "3.5.2-10", "@polkadot/types": "3.5.2-10", - "@polkadot/util": "^5.3.2-7", + "@polkadot/util": "^5.3.2-8", "@polkadot/x-rxjs": "3.5.2-1" }, "devDependencies": { - "@polkadot/keyring": "^5.3.2-7" + "@polkadot/keyring": "^5.3.2-8" } } diff --git a/packages/rpc-provider/package.json b/packages/rpc-provider/package.json index 3613b8ef87..c6ea9d0dee 100644 --- a/packages/rpc-provider/package.json +++ b/packages/rpc-provider/package.json @@ -15,15 +15,15 @@ "dependencies": { "@babel/runtime": "^7.12.5", "@polkadot/types": "3.5.2-10", - "@polkadot/util": "^5.3.2-7", - "@polkadot/util-crypto": "^5.3.2-7", - "@polkadot/x-fetch": "^5.3.2-7", - "@polkadot/x-ws": "^5.3.2-7", + "@polkadot/util": "^5.3.2-8", + "@polkadot/util-crypto": "^5.3.2-8", + "@polkadot/x-fetch": "^5.3.2-8", + "@polkadot/x-ws": "^5.3.2-8", "bn.js": "^4.11.9", "eventemitter3": "^4.0.7" }, "devDependencies": { - "@polkadot/keyring": "^5.3.2-7", + "@polkadot/keyring": "^5.3.2-8", "@polkadot/metadata": "3.5.2-10", "mock-socket": "^9.0.3", "nock": "^13.0.5" diff --git a/packages/typegen/package.json b/packages/typegen/package.json index 1976518952..3480c26baa 100644 --- a/packages/typegen/package.json +++ b/packages/typegen/package.json @@ -27,7 +27,7 @@ "@polkadot/metadata": "3.5.2-10", "@polkadot/rpc-provider": "3.5.2-10", "@polkadot/types": "3.5.2-10", - "@polkadot/util": "^5.3.2-7", + "@polkadot/util": "^5.3.2-8", "handlebars": "^4.7.6", "websocket": "^1.0.33", "yargs": "^16.2.0" diff --git a/packages/types-known/package.json b/packages/types-known/package.json index 574d7f09c7..62b94e27ac 100644 --- a/packages/types-known/package.json +++ b/packages/types-known/package.json @@ -15,7 +15,7 @@ "dependencies": { "@babel/runtime": "^7.12.5", "@polkadot/types": "3.5.2-10", - "@polkadot/util": "^5.3.2-7", + "@polkadot/util": "^5.3.2-8", "bn.js": "^4.11.9" }, "devDependencies": { diff --git a/packages/types/package.json b/packages/types/package.json index cbe2570627..bd6239198f 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -18,13 +18,13 @@ "dependencies": { "@babel/runtime": "^7.12.5", "@polkadot/metadata": "3.5.2-10", - "@polkadot/util": "^5.3.2-7", - "@polkadot/util-crypto": "^5.3.2-7", + "@polkadot/util": "^5.3.2-8", + "@polkadot/util-crypto": "^5.3.2-8", "@polkadot/x-rxjs": "3.5.2-1", "@types/bn.js": "^4.11.6", "bn.js": "^4.11.9" }, "devDependencies": { - "@polkadot/keyring": "^5.3.2-7" + "@polkadot/keyring": "^5.3.2-8" } } diff --git a/packages/types/src/codec/AbstractInt.ts b/packages/types/src/codec/AbstractInt.ts index f2dbf565d9..4c24813705 100644 --- a/packages/types/src/codec/AbstractInt.ts +++ b/packages/types/src/codec/AbstractInt.ts @@ -179,7 +179,9 @@ export abstract class AbstractInt extends BN implements Codec { if (rawType === 'Balance') { return this.isMax() ? 'everything' - : formatBalance(this, { decimals: this.registry.chainDecimals, withSi: true, withUnit: this.registry.chainToken }); + // FIXME In the case of multiples we need some way of detecting which instance this belongs + // to. as it stands we will always format (incorrectly) against the first token defined + : formatBalance(this, { decimals: this.registry.chainDecimals[0], withSi: true, withUnit: this.registry.chainToken[0] }); } const [, divisor] = FORMATTERS.find(([type]) => type === rawType) || []; diff --git a/packages/types/src/codec/Json.ts b/packages/types/src/codec/Json.ts index 72c0dcb5e5..0d8c2ae268 100644 --- a/packages/types/src/codec/Json.ts +++ b/packages/types/src/codec/Json.ts @@ -4,7 +4,7 @@ import type { H256 } from '../interfaces/runtime'; import type { AnyJson, Codec, Registry } from '../types'; -import { isUndefined } from '@polkadot/util'; +import { isFunction, isUndefined } from '@polkadot/util'; import { compareMap } from './utils'; @@ -79,7 +79,13 @@ export class Json extends Map implements Codec { * @description Converts the Object to to a human-friendly JSON, with additional fields, expansion and formatting of information */ public toHuman (): Record { - return this.toJSON(); + return [...this.entries()].reduce((json: Record, [key, value]): Record => { + json[key] = isFunction((value as Codec).toHuman) + ? (value as Codec).toHuman() + : value as AnyJson; + + return json; + }, {}); } /** diff --git a/packages/types/src/create/registry.ts b/packages/types/src/create/registry.ts index eaea5c8226..a2573da4ab 100644 --- a/packages/types/src/create/registry.ts +++ b/packages/types/src/create/registry.ts @@ -160,10 +160,16 @@ export class TypeRegistry implements Registry { return this; } - public get chainDecimals (): number { - return this.#chainProperties?.tokenDecimals.isSome - ? this.#chainProperties.tokenDecimals.unwrap().toNumber() - : 12; + public get chainDecimals (): number[] { + if (this.#chainProperties?.tokenDecimals.isSome) { + const allDecimals = this.#chainProperties.tokenDecimals.unwrap(); + + if (allDecimals.length) { + return allDecimals.map((b) => b.toNumber()); + } + } + + return [12]; } public get chainSS58 (): number | undefined { @@ -172,10 +178,16 @@ export class TypeRegistry implements Registry { : undefined; } - public get chainToken (): string { - return this.#chainProperties?.tokenSymbol.isSome - ? this.#chainProperties.tokenSymbol.unwrap().toString() - : formatBalance.getDefaults().unit; + public get chainToken (): string[] { + if (this.#chainProperties?.tokenSymbol.isSome) { + const allTokens = this.#chainProperties.tokenSymbol.unwrap(); + + if (allTokens.length) { + return allTokens.map((s) => s.toString()); + } + } + + return [formatBalance.getDefaults().unit]; } public get knownTypes (): RegisteredTypes { diff --git a/packages/types/src/generic/ChainProperties.spec.ts b/packages/types/src/generic/ChainProperties.spec.ts new file mode 100644 index 0000000000..ae567b8bfb --- /dev/null +++ b/packages/types/src/generic/ChainProperties.spec.ts @@ -0,0 +1,87 @@ +// Copyright 2017-2021 @polkadot/types authors & contributors +// SPDX-License-Identifier: Apache-2.0 + +import { TypeRegistry } from '../create'; + +describe('ChainProperties', (): void => { + const registry = new TypeRegistry(); + + it('decodes from a null value (setting defaults)', (): void => { + expect( + [...registry.createType('ChainProperties', null).keys()] + ).toEqual(['ss58Format', 'tokenDecimals', 'tokenSymbol']); + }); + + it('decodes from an actual object', (): void => { + const { ss58Format, tokenDecimals, tokenSymbol } = registry.createType('ChainProperties', { + ss58Format: 2, + tokenDecimals: 15, + tokenSymbol: 'KSM' + }); + + expect(ss58Format.unwrap().eq(2)).toBe(true); + expect(tokenDecimals.unwrap().eq([15])).toBe(true); + expect(tokenSymbol.unwrap().eq(['KSM'])).toBe(true); + }); + + it('decodes from an actual object (multiple tokens)', (): void => { + const { ss58Format, tokenDecimals, tokenSymbol } = registry.createType('ChainProperties', { + ss58Format: 27, + tokenDecimals: [10, 12], + tokenSymbol: ['pDOT', 'pKSM'] + }); + + expect(ss58Format.unwrap().eq(27)).toBe(true); + expect(tokenDecimals.unwrap().eq([10, 12])).toBe(true); + expect(tokenSymbol.unwrap().eq(['pDOT', 'pKSM'])).toBe(true); + }); + + it('decodes from an object, flagged for non-existent ss58Format', (): void => { + const { ss58Format, tokenDecimals, tokenSymbol } = registry.createType('ChainProperties', { tokenSymbol: 'DEV' }); + + expect(ss58Format.isNone).toBe(true); + expect(tokenDecimals.isNone).toBe(true); + expect(tokenSymbol.isSome).toBe(true); + }); + + it('decodes from a ChainProperties object', (): void => { + const original = registry.createType('ChainProperties', { + ss58Format: 2, + tokenDecimals: 15, + tokenSymbol: 'KSM' + }); + const { ss58Format, tokenDecimals, tokenSymbol } = registry.createType('ChainProperties', original); + + expect(ss58Format.unwrap().eq(2)).toBe(true); + expect(tokenDecimals.unwrap().eq([15])).toBe(true); + expect(tokenSymbol.unwrap().eq(['KSM'])).toBe(true); + }); + + it('has a sane toHuman', (): void => { + expect( + registry.createType('ChainProperties', { + ss58Format: 42, + tokenDecimals: registry.createType('u32', 9), + tokenSymbol: ['Unit', 'Aux1'] + }).toHuman() + ).toEqual({ + ss58Format: '42', + tokenDecimals: ['9'], + tokenSymbol: ['Unit', 'Aux1'] + }); + }); + + it('has a sane toHuman', (): void => { + expect( + registry.createType('ChainProperties', { + ss58Format: 2, + tokenDecimals: [registry.createType('u32', 12), 8], + tokenSymbol: ['KSM', 'BTC'] + }).toHuman() + ).toEqual({ + ss58Format: '2', + tokenDecimals: ['12', '8'], + tokenSymbol: ['KSM', 'BTC'] + }); + }); +}); diff --git a/packages/types/src/generic/ChainProperties.ts b/packages/types/src/generic/ChainProperties.ts new file mode 100644 index 0000000000..3b7029878a --- /dev/null +++ b/packages/types/src/generic/ChainProperties.ts @@ -0,0 +1,84 @@ +// Copyright 2017-2021 @polkadot/types authors & contributors +// SPDX-License-Identifier: Apache-2.0 + +import type { Codec, Registry } from '../types'; + +import { isFunction, isNull } from '@polkadot/util'; + +import { Json } from '../codec/Json'; +import { Option } from '../codec/Option'; +import { Vec } from '../codec/Vec'; +import { Text } from '../primitive/Text'; +import { u32 } from '../primitive/U32'; + +function createValue (registry: Registry, type: string, value: unknown, asArray = true): Codec { + // We detect codec here as well - when found, generally this is constructed from itself + if (isFunction((value as Codec).toHuman) && (isFunction((value as Option).unwrapOrDefault) || (!asArray || Array.isArray(value)))) { + return value as Codec; + } + + return registry.createType( + type as 'Option', + asArray + ? isNull(value) + ? null + : Array.isArray(value) + ? value + : [value] + : value + ); +} + +function decodeValue (registry: Registry, key: string, value: unknown): unknown { + return key === 'ss58Format' + ? createValue(registry, 'Option', value, false) + : key === 'tokenDecimals' + ? createValue(registry, 'Option>' as 'Vec', value) + : key === 'tokenSymbol' + ? createValue(registry, 'Option>' as 'Vec', value) + : value; +} + +function decode (registry: Registry, value?: Map | Record | null): Record { + return ( + // allow decoding from a map as well (ourselves) + value && isFunction((value as Map).entries) + ? [...(value as Map).entries()] + : Object.entries(value || {}) + ).reduce((all: Record, [key, value]) => { + all[key] = decodeValue(registry, key, value); + + return all; + }, { + ss58Format: registry.createType('Option'), + tokenDecimals: registry.createType('Option>' as 'Vec'), + tokenSymbol: registry.createType('Option>' as 'Vec') + }); +} + +export class GenericChainProperties extends Json { + constructor (registry: Registry, value?: Map | Record | null) { + super(registry, decode(registry, value)); + } + + /** + * @description The chain ss58Format + */ + public get ss58Format (): Option { + return this.get('ss58Format') as Option; + } + + /** + * @description The decimals for each of the tokens + */ + public get tokenDecimals (): Option> { + return this.get('tokenDecimals') as Option>; + } + + /** + * @description The symbols for the tokens + */ + public get tokenSymbol (): Option> { + return this.get('tokenSymbol') as Option>; + } +} diff --git a/packages/types/src/generic/index.ts b/packages/types/src/generic/index.ts index c0fc3670e6..b9a0738d83 100644 --- a/packages/types/src/generic/index.ts +++ b/packages/types/src/generic/index.ts @@ -7,6 +7,7 @@ export { GenericAccountId } from './AccountId'; export { GenericAccountIndex } from './AccountIndex'; export { GenericBlock } from './Block'; export { GenericCall } from './Call'; +export { GenericChainProperties } from './ChainProperties'; export { GenericConsensusEngineId } from './ConsensusEngineId'; export { GenericEvent, GenericEventData } from './Event'; export { GenericLookupSource } from './LookupSource'; diff --git a/packages/types/src/interfaces/system/ChainProperties.spec.ts b/packages/types/src/interfaces/system/ChainProperties.spec.ts deleted file mode 100644 index 7e91d594e0..0000000000 --- a/packages/types/src/interfaces/system/ChainProperties.spec.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright 2017-2021 @polkadot/types authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import { TypeRegistry } from '../../create'; - -describe('ChainProperties', (): void => { - const registry = new TypeRegistry(); - - it('decodes from a null value', (): void => { - expect( - [...registry.createType('ChainProperties', null).entries()] - ).toEqual([]); - }); - - it('decodes from an actual object', (): void => { - const { ss58Format, tokenDecimals, tokenSymbol } = registry.createType('ChainProperties', { - ss58Format: 2, - tokenDecimals: 15, - tokenSymbol: 'KSM' - }); - - expect(ss58Format.unwrap().eq(2)).toBe(true); - expect(tokenDecimals.unwrap().eq(15)).toBe(true); - expect(tokenSymbol.unwrap().eq('KSM')).toBe(true); - }); - - it('decodes from an object, flagged for non-existent ss58Format', (): void => { - const { ss58Format, tokenDecimals, tokenSymbol } = registry.createType('ChainProperties', { tokenSymbol: 'DEV' }); - - expect(ss58Format.isNone).toBe(true); - expect(tokenDecimals.isNone).toBe(true); - expect(tokenSymbol.isSome).toBe(true); - }); -}); diff --git a/packages/types/src/interfaces/system/definitions.ts b/packages/types/src/interfaces/system/definitions.ts index 5926a17290..fba79e8727 100644 --- a/packages/types/src/interfaces/system/definitions.ts +++ b/packages/types/src/interfaces/system/definitions.ts @@ -154,11 +154,7 @@ export default { maxBlock: 'Weight', perClass: 'PerDispatchClass' }, - ChainProperties: { - ss58Format: 'Option', - tokenDecimals: 'Option', - tokenSymbol: 'Option' - }, + ChainProperties: 'GenericChainProperties', ChainType: { _enum: { Development: 'Null', diff --git a/packages/types/src/interfaces/system/types.ts b/packages/types/src/interfaces/system/types.ts index fec192dc92..4224f28d10 100644 --- a/packages/types/src/interfaces/system/types.ts +++ b/packages/types/src/interfaces/system/types.ts @@ -1,7 +1,7 @@ // Auto-generated via `yarn polkadot-types-from-defs`, do not edit /* eslint-disable */ -import type { Bytes, Compact, Enum, GenericEvent, HashMap, Option, Result, Struct, Text, U8aFixed, Vec, bool, i32, u32, u64, u8 } from '@polkadot/types'; +import type { Bytes, Compact, Enum, GenericChainProperties, GenericEvent, HashMap, Option, Result, Struct, Text, U8aFixed, Vec, bool, i32, u32, u64, u8 } from '@polkadot/types'; import type { ITuple } from '@polkadot/types/types'; import type { AccountData } from '@polkadot/types/interfaces/balances'; import type { AccountId, BlockNumber, Digest, Hash, Index, Pays, Weight } from '@polkadot/types/interfaces/runtime'; @@ -45,11 +45,7 @@ export interface BlockWeights extends Struct { } /** @name ChainProperties */ -export interface ChainProperties extends Struct { - readonly ss58Format: Option; - readonly tokenDecimals: Option; - readonly tokenSymbol: Option; -} +export interface ChainProperties extends GenericChainProperties {} /** @name ChainType */ export interface ChainType extends Enum { diff --git a/packages/types/src/types/registry.ts b/packages/types/src/types/registry.ts index ee0d494475..7eb971cb05 100644 --- a/packages/types/src/types/registry.ts +++ b/packages/types/src/types/registry.ts @@ -82,9 +82,9 @@ export interface RegisteredTypes { } export interface Registry { - readonly chainDecimals: number; + readonly chainDecimals: number[]; readonly chainSS58: number | undefined; - readonly chainToken: string; + readonly chainToken: string[]; readonly knownTypes: RegisteredTypes; readonly signedExtensions: string[]; diff --git a/yarn.lock b/yarn.lock index f9026353b1..d92f3ad016 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1624,7 +1624,7 @@ __metadata: "@babel/runtime": ^7.12.5 "@polkadot/api": 3.5.2-10 "@polkadot/types": 3.5.2-10 - "@polkadot/util": ^5.3.2-7 + "@polkadot/util": ^5.3.2-8 "@polkadot/x-rxjs": 3.5.2-1 bn.js: ^4.11.9 languageName: unknown @@ -1636,12 +1636,12 @@ __metadata: dependencies: "@babel/runtime": ^7.12.5 "@polkadot/api": 3.5.2-10 - "@polkadot/keyring": ^5.3.2-7 + "@polkadot/keyring": ^5.3.2-8 "@polkadot/rpc-core": 3.5.2-10 "@polkadot/rpc-provider": 3.5.2-10 "@polkadot/types": 3.5.2-10 - "@polkadot/util": ^5.3.2-7 - "@polkadot/util-crypto": ^5.3.2-7 + "@polkadot/util": ^5.3.2-8 + "@polkadot/util-crypto": ^5.3.2-8 "@polkadot/x-rxjs": 3.5.2-1 bn.js: ^4.11.9 languageName: unknown @@ -1653,14 +1653,14 @@ __metadata: dependencies: "@babel/runtime": ^7.12.5 "@polkadot/api-derive": 3.5.2-10 - "@polkadot/keyring": ^5.3.2-7 + "@polkadot/keyring": ^5.3.2-8 "@polkadot/metadata": 3.5.2-10 "@polkadot/rpc-core": 3.5.2-10 "@polkadot/rpc-provider": 3.5.2-10 "@polkadot/types": 3.5.2-10 "@polkadot/types-known": 3.5.2-10 - "@polkadot/util": ^5.3.2-7 - "@polkadot/util-crypto": ^5.3.2-7 + "@polkadot/util": ^5.3.2-8 + "@polkadot/util-crypto": ^5.3.2-8 "@polkadot/x-rxjs": 3.5.2-1 bn.js: ^4.11.9 eventemitter3: ^4.0.7 @@ -1758,17 +1758,17 @@ __metadata: languageName: node linkType: hard -"@polkadot/keyring@npm:^5.3.2-7": - version: 5.3.2-7 - resolution: "@polkadot/keyring@npm:5.3.2-7" +"@polkadot/keyring@npm:^5.3.2-8": + version: 5.3.2-8 + resolution: "@polkadot/keyring@npm:5.3.2-8" dependencies: "@babel/runtime": ^7.12.5 - "@polkadot/util": 5.3.2-7 - "@polkadot/util-crypto": 5.3.2-7 + "@polkadot/util": 5.3.2-8 + "@polkadot/util-crypto": 5.3.2-8 peerDependencies: - "@polkadot/util": 5.3.2-7 - "@polkadot/util-crypto": 5.3.2-7 - checksum: 3ec3422dc7b00ef73bbfed45bff18b2d979c8e9d53a9b93980ed488937018c42bfe33f335e888ecc7faf3ec3543112c7786fe0ca86a00e0a74927afff2b4fd7b + "@polkadot/util": 5.3.2-8 + "@polkadot/util-crypto": 5.3.2-8 + checksum: 6884b5f73f3a442208f19fe023176130e70886a7be507fbb6608677a7f66564d8c80408b0bc3824204aa47f3a8bfd447efb0eae6909a68c7440638cb5086a6c3 languageName: node linkType: hard @@ -1777,21 +1777,21 @@ __metadata: resolution: "@polkadot/metadata@workspace:packages/metadata" dependencies: "@babel/runtime": ^7.12.5 - "@polkadot/keyring": ^5.3.2-7 + "@polkadot/keyring": ^5.3.2-8 "@polkadot/types": 3.5.2-10 "@polkadot/types-known": 3.5.2-10 - "@polkadot/util": ^5.3.2-7 - "@polkadot/util-crypto": ^5.3.2-7 + "@polkadot/util": ^5.3.2-8 + "@polkadot/util-crypto": ^5.3.2-8 bn.js: ^4.11.9 languageName: unknown linkType: soft -"@polkadot/networks@npm:5.3.2-7": - version: 5.3.2-7 - resolution: "@polkadot/networks@npm:5.3.2-7" +"@polkadot/networks@npm:5.3.2-8": + version: 5.3.2-8 + resolution: "@polkadot/networks@npm:5.3.2-8" dependencies: "@babel/runtime": ^7.12.5 - checksum: 4bd6193b653dfb1f7fd0e3b59e201ccc53c85da37a090bcbe06de1a4ab9fa64364057b372335158a3d4e522a8fb716deb592f8bbdbbf5654410b0fc91dde7b26 + checksum: 227a5730193f059171d0840f7c6852ce2f28fb7d41e4efe0ca400faaf73798b3c1c7ac3f5a0243f984058b1758e6d2295066e358c5f17b1971ef773ccbb2b8c5 languageName: node linkType: hard @@ -1800,11 +1800,11 @@ __metadata: resolution: "@polkadot/rpc-core@workspace:packages/rpc-core" dependencies: "@babel/runtime": ^7.12.5 - "@polkadot/keyring": ^5.3.2-7 + "@polkadot/keyring": ^5.3.2-8 "@polkadot/metadata": 3.5.2-10 "@polkadot/rpc-provider": 3.5.2-10 "@polkadot/types": 3.5.2-10 - "@polkadot/util": ^5.3.2-7 + "@polkadot/util": ^5.3.2-8 "@polkadot/x-rxjs": 3.5.2-1 languageName: unknown linkType: soft @@ -1814,13 +1814,13 @@ __metadata: resolution: "@polkadot/rpc-provider@workspace:packages/rpc-provider" dependencies: "@babel/runtime": ^7.12.5 - "@polkadot/keyring": ^5.3.2-7 + "@polkadot/keyring": ^5.3.2-8 "@polkadot/metadata": 3.5.2-10 "@polkadot/types": 3.5.2-10 - "@polkadot/util": ^5.3.2-7 - "@polkadot/util-crypto": ^5.3.2-7 - "@polkadot/x-fetch": ^5.3.2-7 - "@polkadot/x-ws": ^5.3.2-7 + "@polkadot/util": ^5.3.2-8 + "@polkadot/util-crypto": ^5.3.2-8 + "@polkadot/x-fetch": ^5.3.2-8 + "@polkadot/x-ws": ^5.3.2-8 bn.js: ^4.11.9 eventemitter3: ^4.0.7 mock-socket: ^9.0.3 @@ -1848,7 +1848,7 @@ __metadata: "@polkadot/metadata": 3.5.2-10 "@polkadot/rpc-provider": 3.5.2-10 "@polkadot/types": 3.5.2-10 - "@polkadot/util": ^5.3.2-7 + "@polkadot/util": ^5.3.2-8 "@types/websocket": ^1.0.1 "@types/yargs": ^15.0.12 handlebars: ^4.7.6 @@ -1869,7 +1869,7 @@ __metadata: dependencies: "@babel/runtime": ^7.12.5 "@polkadot/types": 3.5.2-10 - "@polkadot/util": ^5.3.2-7 + "@polkadot/util": ^5.3.2-8 "@types/bn.js": ^4.11.6 bn.js: ^4.11.9 languageName: unknown @@ -1880,25 +1880,25 @@ __metadata: resolution: "@polkadot/types@workspace:packages/types" dependencies: "@babel/runtime": ^7.12.5 - "@polkadot/keyring": ^5.3.2-7 + "@polkadot/keyring": ^5.3.2-8 "@polkadot/metadata": 3.5.2-10 - "@polkadot/util": ^5.3.2-7 - "@polkadot/util-crypto": ^5.3.2-7 + "@polkadot/util": ^5.3.2-8 + "@polkadot/util-crypto": ^5.3.2-8 "@polkadot/x-rxjs": 3.5.2-1 "@types/bn.js": ^4.11.6 bn.js: ^4.11.9 languageName: unknown linkType: soft -"@polkadot/util-crypto@npm:5.3.2-7, @polkadot/util-crypto@npm:^5.3.2-7": - version: 5.3.2-7 - resolution: "@polkadot/util-crypto@npm:5.3.2-7" +"@polkadot/util-crypto@npm:5.3.2-8, @polkadot/util-crypto@npm:^5.3.2-8": + version: 5.3.2-8 + resolution: "@polkadot/util-crypto@npm:5.3.2-8" dependencies: "@babel/runtime": ^7.12.5 - "@polkadot/networks": 5.3.2-7 - "@polkadot/util": 5.3.2-7 + "@polkadot/networks": 5.3.2-8 + "@polkadot/util": 5.3.2-8 "@polkadot/wasm-crypto": ^3.2.1 - "@polkadot/x-randomvalues": 5.3.2-7 + "@polkadot/x-randomvalues": 5.3.2-8 base-x: ^3.0.8 blakejs: ^1.1.0 bn.js: ^4.11.9 @@ -1910,23 +1910,23 @@ __metadata: tweetnacl: ^1.0.3 xxhashjs: ^0.2.2 peerDependencies: - "@polkadot/util": 5.3.2-7 - checksum: 9c0a231fe5b1a2513d2f17c2ca12cc8aecf33c91d78716f5631b341252eb0b1c556c2f61410dcc34b4997311eed26f6e06635d71a93139d71521268e97d2fcbd + "@polkadot/util": 5.3.2-8 + checksum: d513ff19f654cf7ba151f6e3173e3e7f65d22b6589d448534aeb551c3e94d5eab13ae521c407a58689a29fe6663b746f4b4eeb5679625d09d3a2b890ae6e682c languageName: node linkType: hard -"@polkadot/util@npm:5.3.2-7, @polkadot/util@npm:^5.3.2-7": - version: 5.3.2-7 - resolution: "@polkadot/util@npm:5.3.2-7" +"@polkadot/util@npm:5.3.2-8, @polkadot/util@npm:^5.3.2-8": + version: 5.3.2-8 + resolution: "@polkadot/util@npm:5.3.2-8" dependencies: "@babel/runtime": ^7.12.5 - "@polkadot/x-textdecoder": 5.3.2-7 - "@polkadot/x-textencoder": 5.3.2-7 + "@polkadot/x-textdecoder": 5.3.2-8 + "@polkadot/x-textencoder": 5.3.2-8 "@types/bn.js": ^4.11.6 bn.js: ^4.11.9 camelcase: ^5.3.1 ip-regex: ^4.2.0 - checksum: fe179b893f238f632f8434688ad94811f3ee72f100c5e92dc335851e6bb0c1f800f2cbabf08325ccc913ae9660d00b26d1900bb266d71a62fbc294ebb09fa476 + checksum: 897a87d1bf3d658ca840e1d63f2f3848ce42bc859a829c88012847ffc389c72f47202d4c678ee79f1eac5f99dac1f09e08809f3da5c6356fc6f5ddb653346d3d languageName: node linkType: hard @@ -1962,23 +1962,23 @@ __metadata: languageName: node linkType: hard -"@polkadot/x-fetch@npm:^5.3.2-7": - version: 5.3.2-7 - resolution: "@polkadot/x-fetch@npm:5.3.2-7" +"@polkadot/x-fetch@npm:^5.3.2-8": + version: 5.3.2-8 + resolution: "@polkadot/x-fetch@npm:5.3.2-8" dependencies: "@babel/runtime": ^7.12.5 "@types/node-fetch": ^2.5.8 node-fetch: ^2.6.1 - checksum: 1706b2c7d5c6735c388784774e7194438a37d9e7d0c46bee372e9e90dac7aacebe7b655cf7b061919df27bf01f46e71bdd00aae3dd70e04fc4e89c8f45992f33 + checksum: e6207996cfafb6e64508347194a1c0f2d56c52e0892b41bee0e9e2c73c60fc3688cf55d29f88ef32ee8942dbd5646f093b4ff904454b0a0f28361fedececfa6f languageName: node linkType: hard -"@polkadot/x-randomvalues@npm:5.3.2-7": - version: 5.3.2-7 - resolution: "@polkadot/x-randomvalues@npm:5.3.2-7" +"@polkadot/x-randomvalues@npm:5.3.2-8": + version: 5.3.2-8 + resolution: "@polkadot/x-randomvalues@npm:5.3.2-8" dependencies: "@babel/runtime": ^7.12.5 - checksum: aff63596c76fdaf236b93d41915f29169788e0d86cf44d871836d95d7310e8a9fed75ed4ca05f1c11ebafb77e51b78ae9921a8b35a47765b7f6ea0bae5c161eb + checksum: dd1db83d18422b48a9fc3051ef4a3ec55ff6cf61f4ef69c723149526ca002bec314867a624c3db994fc838122eafe3d4730e20a5d262cf236454228a33b515d9 languageName: node linkType: hard @@ -1992,32 +1992,32 @@ __metadata: languageName: node linkType: hard -"@polkadot/x-textdecoder@npm:5.3.2-7": - version: 5.3.2-7 - resolution: "@polkadot/x-textdecoder@npm:5.3.2-7" +"@polkadot/x-textdecoder@npm:5.3.2-8": + version: 5.3.2-8 + resolution: "@polkadot/x-textdecoder@npm:5.3.2-8" dependencies: "@babel/runtime": ^7.12.5 - checksum: efceb8fe6e6856fb9f6b4242bf8cadfa33e8c93da7ed1139f990fb906ad0fb5de83b54bd92ddfadf7d31f4bfec098f2a3ee037783223c49a93953dd33c57d8a0 + checksum: afe2dbb5702f95d7e054bdbdf801a943debd73b0a77d1ffd856adcf80dd41fc7f1530b6c3910b24ba67442f958d2366d57cabb233c15618eba4bc115569021ad languageName: node linkType: hard -"@polkadot/x-textencoder@npm:5.3.2-7": - version: 5.3.2-7 - resolution: "@polkadot/x-textencoder@npm:5.3.2-7" +"@polkadot/x-textencoder@npm:5.3.2-8": + version: 5.3.2-8 + resolution: "@polkadot/x-textencoder@npm:5.3.2-8" dependencies: "@babel/runtime": ^7.12.5 - checksum: 583a21914bdafccd2f5f81dba12950cbd7c84512eb9becbbebe8223b27236600f43802c0805494f43bd9da37bc2a66d973ec576c1adcd95db06c9a382e5c5d00 + checksum: 0b81d1c412442f85f529f14690af47acfe920c011622705803683b3f4ddf005935e41757238f7faf6551c50729f38e67128f00838d6b90e9eed87b83199ded99 languageName: node linkType: hard -"@polkadot/x-ws@npm:^5.3.2-7": - version: 5.3.2-7 - resolution: "@polkadot/x-ws@npm:5.3.2-7" +"@polkadot/x-ws@npm:^5.3.2-8": + version: 5.3.2-8 + resolution: "@polkadot/x-ws@npm:5.3.2-8" dependencies: "@babel/runtime": ^7.12.5 "@types/websocket": ^1.0.1 websocket: ^1.0.33 - checksum: e7300dd29703616cf69e99cbd99b3ada441411e9b53e6a1003147b18d6c251630937033ebd776de643dae4d3b95a464915d7a251e2fc3143b481081e3ce7dadc + checksum: 61f7e39e4624e769ce68d5ae63072b54292558c8a6c704d27cd03bfbf2a5bfc78816147d22bd5b9d2935b93663df5839305b6cea23994f76f142b9da027fd0a6 languageName: node linkType: hard