aboutsummaryrefslogtreecommitdiffstats
path: root/packages/utils/src
diff options
context:
space:
mode:
authorJacob Evans <dekz@dekz.net>2018-04-20 06:49:23 +0800
committerGitHub <noreply@github.com>2018-04-20 06:49:23 +0800
commit62a55c013516c82eb4aa26c90db7533cd72f8d1b (patch)
treea96728392d7f9890e8a8f5a8c18627acc2ea8f28 /packages/utils/src
parentf6fd4281a4772c28521fa606bd37f16a21dbe23c (diff)
parent72336eb393d775817619a354d784b7dea4e243bf (diff)
downloaddexon-sol-tools-62a55c013516c82eb4aa26c90db7533cd72f8d1b.tar
dexon-sol-tools-62a55c013516c82eb4aa26c90db7533cd72f8d1b.tar.gz
dexon-sol-tools-62a55c013516c82eb4aa26c90db7533cd72f8d1b.tar.bz2
dexon-sol-tools-62a55c013516c82eb4aa26c90db7533cd72f8d1b.tar.lz
dexon-sol-tools-62a55c013516c82eb4aa26c90db7533cd72f8d1b.tar.xz
dexon-sol-tools-62a55c013516c82eb4aa26c90db7533cd72f8d1b.tar.zst
dexon-sol-tools-62a55c013516c82eb4aa26c90db7533cd72f8d1b.zip
Merge pull request #540 from 0xProject/feature/abi-gen/tuple-return-types
Support Tuples returned from functions
Diffstat (limited to 'packages/utils/src')
-rw-r--r--packages/utils/src/abi_decoder.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/utils/src/abi_decoder.ts b/packages/utils/src/abi_decoder.ts
index 36c7839cf..150f74a15 100644
--- a/packages/utils/src/abi_decoder.ts
+++ b/packages/utils/src/abi_decoder.ts
@@ -9,7 +9,7 @@ import {
RawLog,
SolidityTypes,
} from '@0xproject/types';
-import * as ethersContracts from 'ethers-contracts';
+import * as ethers from 'ethers';
import * as _ from 'lodash';
import { BigNumber } from './configured_bignumber';
@@ -36,7 +36,7 @@ export class AbiDecoder {
if (_.isUndefined(event)) {
return log;
}
- const ethersInterface = new ethersContracts.Interface([event]);
+ const ethersInterface = new ethers.Interface([event]);
const logData = log.data;
const decodedParams: DecodedLogArgs = {};
let topicsIndex = 1;
@@ -77,10 +77,10 @@ export class AbiDecoder {
if (_.isUndefined(abiArray)) {
return;
}
- const ethersInterface = new ethersContracts.Interface(abiArray);
+ const ethersInterface = new ethers.Interface(abiArray);
_.map(abiArray, (abi: AbiDefinition) => {
if (abi.type === AbiType.Event) {
- const topic = ethersInterface.events[abi.name].topic;
+ const topic = ethersInterface.events[abi.name].topics[0];
this._methodIds[topic] = abi;
}
});