From fa3d011f68630e36b1a3812dd493a5144ebc6c53 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Thu, 31 May 2018 10:14:23 -0700 Subject: Add ethereum-types to extraFileIncludes --- packages/contracts/src/utils/log_decoder.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'packages/contracts/src/utils') diff --git a/packages/contracts/src/utils/log_decoder.ts b/packages/contracts/src/utils/log_decoder.ts index 2839cfe84..07d10e69d 100644 --- a/packages/contracts/src/utils/log_decoder.ts +++ b/packages/contracts/src/utils/log_decoder.ts @@ -1,7 +1,14 @@ import { ContractArtifact } from '@0xproject/sol-compiler'; import { AbiDecoder, BigNumber } from '@0xproject/utils'; import { Web3Wrapper } from '@0xproject/web3-wrapper'; -import { AbiDefinition, LogEntry, LogWithDecodedArgs, RawLog, TransactionReceiptWithDecodedLogs } from 'ethereum-types'; +import { + AbiDefinition, + DecodedLogArgs, + LogEntry, + LogWithDecodedArgs, + RawLog, + TransactionReceiptWithDecodedLogs, +} from 'ethereum-types'; import * as _ from 'lodash'; import { artifacts } from './artifacts'; @@ -30,7 +37,7 @@ export class LogDecoder { }); this._abiDecoder = new AbiDecoder(abiArrays); } - public decodeLogOrThrow(log: LogEntry): LogWithDecodedArgs | RawLog { + public decodeLogOrThrow(log: LogEntry): LogWithDecodedArgs | RawLog { const logWithDecodedArgsOrLog = this._abiDecoder.tryToDecodeLogOrNoop(log); if (_.isUndefined((logWithDecodedArgsOrLog as LogWithDecodedArgs).args)) { throw new Error(`Unable to decode log: ${JSON.stringify(log)}`); -- cgit v1.2.3