Remove deprecated Metadata getters (#1315)

* Remove deprecated Metadata getters

* Start metadata with som injected types

* Cleanup V0 somewhat with injected types

* Re-generate interfaces

* Extract some Storage type definitions

* Remove unneeded Calls & Constants files in metadata
This commit is contained in:
Jaco Greeff
2019-08-16 14:51:14 +02:00
committed by GitHub
parent facdd27117
commit f30354ead4
50 changed files with 560 additions and 833 deletions
+2 -2
View File
@@ -3,10 +3,10 @@
// of the Apache-2.0 license. See the LICENSE file for details.
import { Codec } from '@polkadot/types/types';
import { ModuleConstantMetadata as MetaV7 } from '@polkadot/types/Metadata/v6/Constants';
import { ModuleConstantMetadataV7 } from '@polkadot/types/interfaces';
export interface ConstantCodec extends Codec {
meta: MetaV7;
meta: ModuleConstantMetadataV7;
}
export type ModuleConstants = Record<string, Codec>;
@@ -2,10 +2,9 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { Call } from '@polkadot/types/interfaces';
import { Call, FunctionMetadataV7 } from '@polkadot/types/interfaces';
import { CallFunction } from '@polkadot/types/types';
import { FunctionMetadata } from '@polkadot/types/Metadata/v7/Calls';
import { createType } from '@polkadot/types';
import { assert, stringCamelCase } from '@polkadot/util';
@@ -22,7 +21,7 @@ export default function createDescriptor (
section: string,
sectionIndex: number,
methodIndex: number,
callMetadata: FunctionMetadata
callMetadata: FunctionMetadataV7
): CallFunction {
const callIndex = new Uint8Array([sectionIndex, methodIndex]);
const expectedArgs = callMetadata.args;