Generate types from new contract ABI JSON (#1320)

* generate types from registry

* cleanup

* merge, rearrange

* lint

* built out

* abi v2 creation

* throw on unions

* linting

* version handling

* split functions

* cleanup

* drop v1 support

* special types

* changes

* requested changes

* formatTYpe

* rv outdated test

* rv union test

* codeclimate

* codeclimate

* codeclimate

* codeclimate

* codeclimate

* review

* cleanup encodeTypes

* fix option sub

* TypeDefInfo.Result
This commit is contained in:
kwingram25
2019-10-08 16:31:48 +02:00
committed by GitHub
parent 64f8444d47
commit 05ec4964fe
31 changed files with 10253 additions and 271 deletions
+2 -2
View File
@@ -3,7 +3,7 @@
// of the Apache-2.0 license. See the LICENSE file for details.
import { SubmittableModuleExtrinsics } from '@polkadot/api/types';
import { ApiObject, ContractABI, ContractBase } from './types';
import { ApiObject, ContractABIPre, ContractBase } from './types';
import { assert } from '@polkadot/util';
@@ -17,7 +17,7 @@ export default abstract class RxBase implements ContractBase<'rxjs'> {
public readonly apiContracts: SubmittableModuleExtrinsics<'rxjs'>;
public constructor (api: ApiObject<'rxjs'>, abi: ContractABI | Abi) {
public constructor (api: ApiObject<'rxjs'>, abi: ContractABIPre | Abi) {
this.abi = abi instanceof Abi
? abi
: new Abi(abi);