Bump dev (sort imports) (#2923)

* Bump dev (sort imports)

* Resort

* Adjust ApiInterfaceRx
This commit is contained in:
Jaco Greeff
2020-12-07 16:26:19 +01:00
committed by GitHub
parent 92ee9ab339
commit 8e6a1c8fb1
177 changed files with 302 additions and 230 deletions
+1 -1
View File
@@ -3,7 +3,7 @@
import { TypeRegistry } from '@polkadot/types/create';
import { MagicNumber, MAGIC_NUMBER } from './MagicNumber';
import { MAGIC_NUMBER, MagicNumber } from './MagicNumber';
describe('MagicNumber', (): void => {
const registry = new TypeRegistry();
+1 -2
View File
@@ -3,9 +3,8 @@
import type { AnyNumber, Registry } from '@polkadot/types/types';
import { assert } from '@polkadot/util';
import { U32 } from '@polkadot/types/primitive';
import { assert } from '@polkadot/util';
export const MAGIC_NUMBER = 0x6174656d; // `meta`, reversed for Little Endian encoding
+1 -1
View File
@@ -3,8 +3,8 @@
import { TypeRegistry } from '@polkadot/types/create';
import substrateData from './static';
import { Metadata } from './Metadata';
import substrateData from './static';
describe('Metadata', (): void => {
it('allows creation from hex with JSON equivalence', (): void => {
+1 -1
View File
@@ -7,11 +7,11 @@ import type { Registry } from '@polkadot/types/types';
import { Struct } from '@polkadot/types/codec';
import { assert } from '@polkadot/util';
import { MagicNumber } from './MagicNumber';
import { toV10 } from './v9/toV10';
import { toV11 } from './v10/toV11';
import { toV12 } from './v11/toV12';
import { toLatest } from './v12/toLatest';
import { MagicNumber } from './MagicNumber';
import { getUniqTypes, toCallsOnly } from './util';
type MetaMapped = MetadataV9 | MetadataV10 | MetadataV11 | MetadataV12;
@@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
import type { Registry } from '@polkadot/types/types';
import type { Constants, ConstantCodec, ModuleConstants } from '../types';
import type { ConstantCodec, Constants, ModuleConstants } from '../types';
import { hexToU8a, stringCamelCase } from '@polkadot/util';
@@ -2,6 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
import BN from 'bn.js';
import { createTestPairs } from '@polkadot/keyring/testingPairs';
import { TypeRegistry } from '@polkadot/types/create';
@@ -6,12 +6,13 @@ import type { StorageEntry } from '@polkadot/types/primitive/types';
import type { Codec, Registry } from '@polkadot/types/types';
import BN from 'bn.js';
import { Raw } from '@polkadot/types/codec';
import { StorageKey } from '@polkadot/types/primitive';
import { assert, compactAddLength, compactStripLength, isNull, isUndefined, stringLowerFirst, u8aConcat } from '@polkadot/util';
import { xxhashAsU8a } from '@polkadot/util-crypto';
import { HasherFunction, getHasher } from './getHasher';
import { getHasher, HasherFunction } from './getHasher';
export interface CreateItemOptions {
key?: string;
@@ -1,8 +1,8 @@
// Copyright 2017-2020 @polkadot/metadata authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { AllHashers } from '@polkadot/types/interfaces/metadata/definitions';
import type { StorageHasher } from '@polkadot/types/interfaces';
import type { AllHashers } from '@polkadot/types/interfaces/metadata/definitions';
import { u8aConcat, u8aToU8a } from '@polkadot/util';
import { blake2AsU8a, xxhashAsU8a } from '@polkadot/util-crypto';
+1 -1
View File
@@ -2,8 +2,8 @@
// SPDX-License-Identifier: Apache-2.0
import type { AugmentedConst, QueryableConsts, QueryableModuleConsts } from '@polkadot/api/types/consts';
import type { Codec, ModulesWithCalls } from '@polkadot/types/types';
import type { StorageEntry } from '@polkadot/types/primitive/types';
import type { Codec, ModulesWithCalls } from '@polkadot/types/types';
export interface ModuleStorage {
[key: string]: StorageEntry;
+1 -1
View File
@@ -1,8 +1,8 @@
// Copyright 2017-2020 @polkadot/metadata authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { Codec } from '@polkadot/types/types';
import type { Vec } from '@polkadot/types/codec';
import type { Codec } from '@polkadot/types/types';
export interface MetadataInterface<Modules extends Codec> extends Codec {
modules: Vec<Modules>;
+1 -1
View File
@@ -1,9 +1,9 @@
// Copyright 2017-2020 @polkadot/metadata authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { Codec, Registry } from '@polkadot/types/types';
import type { Option, Vec } from '@polkadot/types/codec';
import type { Text, Type } from '@polkadot/types/primitive';
import type { Codec, Registry } from '@polkadot/types/types';
import { flattenUniq } from './flattenUniq';
import { validateTypes } from './validateTypes';
+1 -1
View File
@@ -6,8 +6,8 @@ import type { MetadataInterface } from '../types';
import { unwrapStorageType } from '@polkadot/types/primitive/StorageKey';
import { getUniqTypes } from './getUniqTypes';
import { Metadata } from '../Metadata';
import { getUniqTypes } from './getUniqTypes';
/** @internal */
export function decodeLatestSubstrate<Modules extends Codec> (registry: Registry, version: number, rpcData: string, staticSubstrate: Record<string, unknown>): void {
@@ -3,8 +3,8 @@
import { TypeRegistry } from '@polkadot/types/create';
import staticData from '../static';
import { Metadata } from '../Metadata';
import staticData from '../static';
describe('toCallsOnly', (): void => {
const registry = new TypeRegistry();
+2 -2
View File
@@ -3,9 +3,9 @@
import { TypeRegistry } from '@polkadot/types/create';
import substrateJson from './static-substrate.json';
import substrateData from './static';
import { decodeLatestSubstrate, defaultValues, toLatest } from '../util/testUtil';
import substrateData from './static';
import substrateJson from './static-substrate.json';
describe('MetadataV10 (substrate)', (): void => {
const registry = new TypeRegistry();
+2 -2
View File
@@ -3,9 +3,9 @@
import { TypeRegistry } from '@polkadot/types/create';
import substrateJson from './static-substrate.json';
import substrateData from './static';
import { decodeLatestSubstrate, defaultValues, toLatest } from '../util/testUtil';
import substrateData from './static';
import substrateJson from './static-substrate.json';
describe('MetadataV11 (substrate)', (): void => {
const registry = new TypeRegistry();
+2 -2
View File
@@ -3,9 +3,9 @@
import { TypeRegistry } from '@polkadot/types/create';
import substrateJson from './static-substrate.json';
import substrateData from './static';
import { decodeLatestSubstrate, defaultValues, toLatest } from '../util/testUtil';
import substrateData from './static';
import substrateJson from './static-substrate.json';
describe('MetadataV12 (substrate)', (): void => {
const registry = new TypeRegistry();
+3 -3
View File
@@ -1,11 +1,11 @@
// Copyright 2017-2020 @polkadot/metadata authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { EventMetadataV12, EventMetadataLatest, FunctionMetadataV12, FunctionMetadataLatest, MetadataV12, MetadataLatest, ModuleMetadataLatest, ModuleMetadataV12, StorageMetadataV12, StorageMetadataLatest, StorageEntryMetadataLatest } from '@polkadot/types/interfaces/metadata';
import type { Registry, OverrideModuleType } from '@polkadot/types/types';
import type { EventMetadataLatest, EventMetadataV12, FunctionMetadataLatest, FunctionMetadataV12, MetadataLatest, MetadataV12, ModuleMetadataLatest, ModuleMetadataV12, StorageEntryMetadataLatest, StorageMetadataLatest, StorageMetadataV12 } from '@polkadot/types/interfaces/metadata';
import type { OverrideModuleType, Registry } from '@polkadot/types/types';
import { getModuleTypes } from '@polkadot/types-known';
import { Type } from '@polkadot/types/primitive';
import { getModuleTypes } from '@polkadot/types-known';
import { stringCamelCase } from '@polkadot/util';
// Since we don't have insight into the origin specification, we can only define what we know about
+2 -2
View File
@@ -3,9 +3,9 @@
import { TypeRegistry } from '@polkadot/types/create';
import substrateJson from './static-substrate.json';
import substrateData from './static';
import { decodeLatestSubstrate, defaultValues, toLatest } from '../util/testUtil';
import substrateData from './static';
import substrateJson from './static-substrate.json';
describe('MetadataV9 (substrate)', (): void => {
const registry = new TypeRegistry();