diff options
author | Leonid <logvinov.leon@gmail.com> | 2017-10-16 16:40:20 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-16 16:40:20 +0800 |
commit | a798f32cc89b61788856073265d20ad3812576ae (patch) | |
tree | 43a7ee4b5dab08091178b09985e180ab8de7f53f /src/utils/abi_decoder.ts | |
parent | c8b54f3bac33f28c315c7018b3185f59e9a474dc (diff) | |
parent | df5fe4a84f3c5ee8946fa615428c5b9de8f8b06f (diff) | |
download | dexon-sol-tools-a798f32cc89b61788856073265d20ad3812576ae.tar dexon-sol-tools-a798f32cc89b61788856073265d20ad3812576ae.tar.gz dexon-sol-tools-a798f32cc89b61788856073265d20ad3812576ae.tar.bz2 dexon-sol-tools-a798f32cc89b61788856073265d20ad3812576ae.tar.lz dexon-sol-tools-a798f32cc89b61788856073265d20ad3812576ae.tar.xz dexon-sol-tools-a798f32cc89b61788856073265d20ad3812576ae.tar.zst dexon-sol-tools-a798f32cc89b61788856073265d20ad3812576ae.zip |
Merge branch 'development' into setFillOrKillToUseRequestInterface
Diffstat (limited to 'src/utils/abi_decoder.ts')
-rw-r--r-- | src/utils/abi_decoder.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/utils/abi_decoder.ts b/src/utils/abi_decoder.ts index 52b114c12..a6c45bee7 100644 --- a/src/utils/abi_decoder.ts +++ b/src/utils/abi_decoder.ts @@ -1,7 +1,7 @@ import * as Web3 from 'web3'; import * as _ from 'lodash'; import * as BigNumber from 'bignumber.js'; -import {AbiType, DecodedLogArgs, LogWithDecodedArgs, RawLog, SolidityTypes} from '../types'; +import {AbiType, DecodedLogArgs, LogWithDecodedArgs, RawLog, SolidityTypes, ContractEventArgs} from '../types'; import * as SolidityCoder from 'web3/lib/solidity/coder'; export class AbiDecoder { @@ -11,7 +11,8 @@ export class AbiDecoder { _.map(abiArrays, this.addABI.bind(this)); } // This method can only decode logs from the 0x smart contracts - public tryToDecodeLogOrNoop(log: Web3.LogEntry): LogWithDecodedArgs|RawLog { + public tryToDecodeLogOrNoop<ArgsType extends ContractEventArgs>( + log: Web3.LogEntry): LogWithDecodedArgs<ArgsType>|RawLog { const methodId = log.topics[0]; const event = this.methodIds[methodId]; if (_.isUndefined(event)) { |