Move internal decoding to top-level-functions (#1818)
* Move internal decoding to top-level-functions * Cleanup imports
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
import { MetadataLatest } from '@polkadot/types/interfaces/metadata';
|
||||
import { AnyJsonObject, Registry } from '@polkadot/types/types';
|
||||
|
||||
import { createType } from '@polkadot/types';
|
||||
import { createType } from '@polkadot/types/codec';
|
||||
|
||||
/** @internal */
|
||||
export default function toCallsOnly (registry: Registry, { extrinsic, modules }: MetadataLatest): AnyJsonObject | string {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
import { MetadataV1, MetadataV2 } from '@polkadot/types/interfaces/metadata';
|
||||
import { Registry } from '@polkadot/types/types';
|
||||
|
||||
import { createType } from '@polkadot/types';
|
||||
import { createType } from '@polkadot/types/codec';
|
||||
|
||||
/** @internal */
|
||||
export default function toV2 (registry: Registry, metadataV1: MetadataV1): MetadataV2 {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
import { MetadataV10, MetadataV11 } from '@polkadot/types/interfaces/metadata';
|
||||
import { Registry } from '@polkadot/types/types';
|
||||
|
||||
import { createType } from '@polkadot/types';
|
||||
import { createType } from '@polkadot/types/codec';
|
||||
|
||||
/** @internal */
|
||||
export default function toV11 (registry: Registry, { modules }: MetadataV10): MetadataV11 {
|
||||
|
||||
@@ -7,7 +7,8 @@ import { FunctionMetadataV11, FunctionMetadataLatest, MetadataV11, MetadataLates
|
||||
import { Registry } from '@polkadot/types/types';
|
||||
|
||||
import { getModuleTypes } from '@polkadot/types/known';
|
||||
import { Type, createType } from '@polkadot/types';
|
||||
import { createType } from '@polkadot/types/codec';
|
||||
import { Type } from '@polkadot/types/primitive';
|
||||
import { stringCamelCase } from '@polkadot/util';
|
||||
|
||||
// TODO Handle consts as well
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
import { MetadataV2, MetadataV3 } from '@polkadot/types/interfaces/metadata';
|
||||
import { Registry } from '@polkadot/types/types';
|
||||
|
||||
import { createType } from '@polkadot/types';
|
||||
import { createType } from '@polkadot/types/codec';
|
||||
|
||||
/** @internal */
|
||||
export default function toV3 (registry: Registry, metadataV2: MetadataV2): MetadataV3 {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
import { MetadataV5, MetadataV6, ModuleMetadataV6 } from '@polkadot/types/interfaces/metadata';
|
||||
import { Registry } from '@polkadot/types/types';
|
||||
|
||||
import { createType } from '@polkadot/types';
|
||||
import { createType } from '@polkadot/types/codec';
|
||||
|
||||
/** @internal */
|
||||
export default function toV6 (registry: Registry, { modules }: MetadataV5): MetadataV6 {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
import { MetadataV6, MetadataV7, ModuleMetadataV7 } from '@polkadot/types/interfaces/metadata';
|
||||
import { Registry } from '@polkadot/types/types';
|
||||
|
||||
import { createType } from '@polkadot/types';
|
||||
import { createType } from '@polkadot/types/codec';
|
||||
|
||||
/** @internal */
|
||||
export default function toV7 (registry: Registry, { modules }: MetadataV6): MetadataV7 {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
import { MetadataV7, MetadataV8, ModuleMetadataV8 } from '@polkadot/types/interfaces/metadata';
|
||||
import { Registry } from '@polkadot/types/types';
|
||||
|
||||
import { createType } from '@polkadot/types';
|
||||
import { createType } from '@polkadot/types/codec';
|
||||
|
||||
/** @internal */
|
||||
export default function toV8 (registry: Registry, { modules }: MetadataV7): MetadataV8 {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
import { MetadataV8, MetadataV9 } from '@polkadot/types/interfaces/metadata';
|
||||
import { Registry } from '@polkadot/types/types';
|
||||
|
||||
import { createType } from '@polkadot/types';
|
||||
import { createType } from '@polkadot/types/codec';
|
||||
|
||||
/** @internal */
|
||||
export default function toV9 (registry: Registry, { modules }: MetadataV8): MetadataV9 {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
import { MetadataV9, MetadataV10, ModuleMetadataV9, ModuleMetadataV10, StorageEntryMetadataV9, StorageEntryTypeV9, StorageHasherV9, StorageHasherV10 } from '@polkadot/types/interfaces/metadata';
|
||||
import { Registry } from '@polkadot/types/types';
|
||||
|
||||
import { createType } from '@polkadot/types';
|
||||
import { createType } from '@polkadot/types/codec';
|
||||
|
||||
// migrate a storage hasher type
|
||||
// see https://github.com/paritytech/substrate/pull/4462
|
||||
|
||||
Reference in New Issue
Block a user