From 27d9fba785a5a53550be53b12baf9069bda8d160 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Thu, 4 Jan 2018 18:56:30 +0100 Subject: Include web3 types via typeRoots and factor out common parts of tsconfig.json --- packages/abi-gen/tsconfig.json | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'packages/abi-gen') diff --git a/packages/abi-gen/tsconfig.json b/packages/abi-gen/tsconfig.json index c9a7e9189..e35816553 100644 --- a/packages/abi-gen/tsconfig.json +++ b/packages/abi-gen/tsconfig.json @@ -1,13 +1,7 @@ { + "extends": "../../tsconfig", "compilerOptions": { - "module": "commonjs", - "target": "es5", - "lib": ["es2015", "dom"], - "outDir": "lib", - "sourceMap": true, - "declaration": true, - "noImplicitAny": true, - "strictNullChecks": true + "outDir": "lib" }, - "include": ["./src/**/*", "./test/**/*", "../../node_modules/web3-typescript-typings/index.d.ts"] + "include": ["./src/**/*", "./test/**/*"] } -- cgit From 78fd942faa752980caba6e37edd2932b1235cfd7 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Fri, 5 Jan 2018 13:32:01 +0100 Subject: Return to old way of including web3 types --- packages/abi-gen/tsconfig.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages/abi-gen') diff --git a/packages/abi-gen/tsconfig.json b/packages/abi-gen/tsconfig.json index e35816553..5e0c7c6d3 100644 --- a/packages/abi-gen/tsconfig.json +++ b/packages/abi-gen/tsconfig.json @@ -3,5 +3,5 @@ "compilerOptions": { "outDir": "lib" }, - "include": ["./src/**/*", "./test/**/*"] + "include": ["./src/**/*", "./test/**/*", "../../node_modules/web3-typescript-typings/index.d.ts"] } -- cgit From 0f8b2703d19f41adf96d2ec351b4da30d4ce636e Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Wed, 10 Jan 2018 11:28:43 +0100 Subject: Fix a compiler error with constructor enum --- packages/abi-gen/src/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages/abi-gen') diff --git a/packages/abi-gen/src/utils.ts b/packages/abi-gen/src/utils.ts index f6291d98d..b9149e850 100644 --- a/packages/abi-gen/src/utils.ts +++ b/packages/abi-gen/src/utils.ts @@ -64,7 +64,7 @@ export const utils = { }, getEmptyConstructor(): Web3.ConstructorAbi { return { - type: 'constructor', + type: Web3.AbiType.Constructor, stateMutability: 'nonpayable', payable: false, inputs: [], -- cgit From fa7237fde7acea32c5492f0dcdef4d55b3ade6e1 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Wed, 10 Jan 2018 12:00:39 +0100 Subject: Fix a compiler error in abi-gen --- packages/abi-gen/src/types.ts | 7 +++++++ packages/abi-gen/src/utils.ts | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'packages/abi-gen') diff --git a/packages/abi-gen/src/types.ts b/packages/abi-gen/src/types.ts index 8b158d77a..e82ab824b 100644 --- a/packages/abi-gen/src/types.ts +++ b/packages/abi-gen/src/types.ts @@ -5,6 +5,13 @@ export enum ParamKind { Output = 'output', } +export enum AbiType { + Function = 'function', + Constructor = 'constructor', + Event = 'event', + Fallback = 'fallback', +} + export interface Method extends Web3.MethodAbi { singleReturnValue: boolean; } diff --git a/packages/abi-gen/src/utils.ts b/packages/abi-gen/src/utils.ts index b9149e850..14255643a 100644 --- a/packages/abi-gen/src/utils.ts +++ b/packages/abi-gen/src/utils.ts @@ -3,7 +3,7 @@ import * as _ from 'lodash'; import * as path from 'path'; import * as Web3 from 'web3'; -import { ParamKind } from './types'; +import { AbiType, ParamKind } from './types'; export const utils = { solTypeToTsType(paramKind: ParamKind, solType: string): string { @@ -64,7 +64,7 @@ export const utils = { }, getEmptyConstructor(): Web3.ConstructorAbi { return { - type: Web3.AbiType.Constructor, + type: AbiType.Constructor, stateMutability: 'nonpayable', payable: false, inputs: [], -- cgit