Hex/JSON metadata split (#3829)
* Hex/JSON metadata split * revert import change * Adjust imports * Update tests
This commit is contained in:
@@ -7,7 +7,7 @@ import type { Constants } from '../types';
|
||||
import { TypeRegistry } from '../../../create';
|
||||
import { Metadata } from '../../Metadata';
|
||||
import rpcMetadata from '../../static-substrate';
|
||||
import rpcMetadataV10 from '../../v10/static-substrate';
|
||||
import rpcMetadataV10 from '../../v10/hex/static-substrate';
|
||||
import { decorateConstants } from '..';
|
||||
|
||||
function init (meta: string): [Constants, TypeRegistry] {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Copyright 2017-2021 @polkadot/types authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import metadata from './v13/static-polkadot';
|
||||
import metadata from './v13/hex/static-polkadot';
|
||||
|
||||
export default metadata;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Copyright 2017-2021 @polkadot/types authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import metadata from './v13/static-substrate';
|
||||
import metadata from './v13/hex/static-substrate';
|
||||
|
||||
export default metadata;
|
||||
|
||||
@@ -3,10 +3,8 @@
|
||||
|
||||
import { TypeRegistry } from '../../create';
|
||||
import { decodeLatestMeta, defaultValues, toLatest } from '../util/testUtil';
|
||||
// eslint-disable-next-line import/no-duplicates
|
||||
import substrateData from './static-substrate';
|
||||
// eslint-disable-next-line import/no-duplicates
|
||||
import substrateJson from './static-substrate.json';
|
||||
import substrateData from './hex/static-substrate';
|
||||
import substrateJson from './json/static-substrate.json';
|
||||
|
||||
describe('MetadataV10 (substrate)', (): void => {
|
||||
const registry = new TypeRegistry();
|
||||
|
||||
@@ -3,10 +3,8 @@
|
||||
|
||||
import { TypeRegistry } from '../../create';
|
||||
import { decodeLatestMeta, defaultValues, toLatest } from '../util/testUtil';
|
||||
// eslint-disable-next-line import/no-duplicates
|
||||
import substrateData from './static-substrate';
|
||||
// eslint-disable-next-line import/no-duplicates
|
||||
import substrateJson from './static-substrate.json';
|
||||
import substrateData from './hex/static-substrate';
|
||||
import substrateJson from './json/static-substrate.json';
|
||||
|
||||
describe('MetadataV11 (substrate)', (): void => {
|
||||
const registry = new TypeRegistry();
|
||||
|
||||
@@ -3,10 +3,8 @@
|
||||
|
||||
import { TypeRegistry } from '../../create';
|
||||
import { decodeLatestMeta, defaultValues, toLatest } from '../util/testUtil';
|
||||
// eslint-disable-next-line import/no-duplicates
|
||||
import substrateData from './static-substrate';
|
||||
// eslint-disable-next-line import/no-duplicates
|
||||
import substrateJson from './static-substrate.json';
|
||||
import substrateData from './hex/static-substrate';
|
||||
import substrateJson from './json/static-substrate.json';
|
||||
|
||||
describe('MetadataV12 (substrate)', (): void => {
|
||||
const registry = new TypeRegistry();
|
||||
|
||||
@@ -3,14 +3,10 @@
|
||||
|
||||
import { TypeRegistry } from '../../create';
|
||||
import { decodeLatestMeta, defaultValues, toLatest } from '../util/testUtil';
|
||||
// eslint-disable-next-line import/no-duplicates
|
||||
import polkadotData from './static-polkadot';
|
||||
// eslint-disable-next-line import/no-duplicates
|
||||
import polkadotJson from './static-polkadot.json';
|
||||
// eslint-disable-next-line import/no-duplicates
|
||||
import substrateData from './static-substrate';
|
||||
// eslint-disable-next-line import/no-duplicates
|
||||
import substrateJson from './static-substrate.json';
|
||||
import polkadotData from './hex/static-polkadot';
|
||||
import substrateData from './hex/static-substrate';
|
||||
import polkadotJson from './json/static-polkadot.json';
|
||||
import substrateJson from './json/static-substrate.json';
|
||||
|
||||
describe('MetadataV13 (substrate)', (): void => {
|
||||
const registry = new TypeRegistry();
|
||||
|
||||
@@ -5,16 +5,12 @@ import type { MetadataAll } from '../../interfaces/metadata';
|
||||
|
||||
import { TypeRegistry } from '../../create';
|
||||
import { Metadata } from '../Metadata';
|
||||
// eslint-disable-next-line import/no-duplicates
|
||||
import polkadotData from './static-polkadot';
|
||||
// eslint-disable-next-line import/no-duplicates
|
||||
import polkadotJson from './static-polkadot.json';
|
||||
import polkadotTypes from './static-polkadot-types.json';
|
||||
// eslint-disable-next-line import/no-duplicates
|
||||
import substrateData from './static-substrate';
|
||||
// eslint-disable-next-line import/no-duplicates
|
||||
import substrateJson from './static-substrate.json';
|
||||
import substrateTypes from './static-substrate-types.json';
|
||||
import polkadotData from './hex/static-polkadot';
|
||||
import substrateData from './hex/static-substrate';
|
||||
import polkadotJson from './json/static-polkadot.json';
|
||||
import polkadotTypes from './json/static-polkadot-types.json';
|
||||
import substrateJson from './json/static-substrate.json';
|
||||
import substrateTypes from './json/static-substrate-types.json';
|
||||
|
||||
describe('MetadataV14 (substrate)', (): void => {
|
||||
// FIXME This is to be replaced with the proper version (here as a stop-gap)
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
@@ -4659,7 +4659,7 @@
|
||||
{
|
||||
"name": "IgnoredIssuance",
|
||||
"type": 6,
|
||||
"value": "0x9c33ee170e636c010000000000000000",
|
||||
"value": "0x00000000000000000000000000000000",
|
||||
"docs": [
|
||||
" The issuance to ignore. This is subtracted from the `Currency`'s `total_issuance` to get",
|
||||
" the issuance by which we inflate or deflate the gilt."
|
||||
@@ -3,10 +3,8 @@
|
||||
|
||||
import { TypeRegistry } from '../../create';
|
||||
import { decodeLatestMeta, defaultValues, toLatest } from '../util/testUtil';
|
||||
// eslint-disable-next-line import/no-duplicates
|
||||
import substrateData from './static-substrate';
|
||||
// eslint-disable-next-line import/no-duplicates
|
||||
import substrateJson from './static-substrate.json';
|
||||
import substrateData from './hex/static-substrate';
|
||||
import substrateJson from './json/static-substrate.json';
|
||||
|
||||
describe('MetadataV9 (substrate)', (): void => {
|
||||
const registry = new TypeRegistry();
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
import { TypeRegistry } from '../create';
|
||||
import { decorateStorage, Metadata } from '../metadata';
|
||||
import rpcDataV11 from '../metadata/v11/static-substrate';
|
||||
import rpcDataV11 from '../metadata/v11/hex/static-substrate';
|
||||
import { StorageKey } from '.';
|
||||
|
||||
describe('StorageKey', (): void => {
|
||||
|
||||
Reference in New Issue
Block a user