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 v1.2.3