ClassOf does not require <T> (#1190)

* Add InterfaceRegistry

* Update srml script

* Add compact

* Add correct imports

* Auto-generate InterfaceRegistry

* Regenerate

* Simplify code

* add comment

* Fix lint

* Rename var

* Compact encodable abtstactInt

* Fix abstract isChildClass
This commit is contained in:
Amaury Martiny
2019-07-25 20:18:35 +02:00
committed by Jaco Greeff
parent 39323a8896
commit 83515fc0a2
22 changed files with 783 additions and 34 deletions
+8 -1
View File
@@ -11,7 +11,7 @@ import { HeaderExtended } from '@polkadot/api-derive';
import { ConstantCodec } from '@polkadot/api-metadata/consts/types';
import testKeyring from '@polkadot/keyring/testingPairs';
import { IExtrinsic, IMethod } from '@polkadot/types/types';
import { Header } from '@polkadot/types';
import { createType, Header } from '@polkadot/types';
import { SubmittableResult } from './';
@@ -92,4 +92,11 @@ export default async function test (): Promise<void> {
unsub2();
});
// check correct types with `createType`
const balance = createType('Balance', 2);
const overridden = createType<Index>('Gas', 2);
const gas = createType('Gas', 2);
const vec = createType('Vec<u32>', 2);
console.log(balance, overridden, gas, vec);
}