aboutsummaryrefslogtreecommitdiffstats
path: root/packages/utils
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2018-10-09 18:55:10 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2018-10-09 22:01:34 +0800
commit22160df2d2d5aef63c3e2c3f502ac15119b18e07 (patch)
treec217e59fe3cc34108647bfc9f2ed7b6ae9876421 /packages/utils
parent31ee8870b80579caf3762c1178043bb5bb6fe4fb (diff)
downloaddexon-sol-tools-22160df2d2d5aef63c3e2c3f502ac15119b18e07.tar
dexon-sol-tools-22160df2d2d5aef63c3e2c3f502ac15119b18e07.tar.gz
dexon-sol-tools-22160df2d2d5aef63c3e2c3f502ac15119b18e07.tar.bz2
dexon-sol-tools-22160df2d2d5aef63c3e2c3f502ac15119b18e07.tar.lz
dexon-sol-tools-22160df2d2d5aef63c3e2c3f502ac15119b18e07.tar.xz
dexon-sol-tools-22160df2d2d5aef63c3e2c3f502ac15119b18e07.tar.zst
dexon-sol-tools-22160df2d2d5aef63c3e2c3f502ac15119b18e07.zip
Fix ethers build issue
Diffstat (limited to 'packages/utils')
-rw-r--r--packages/utils/src/abi_decoder.ts7
1 files changed, 4 insertions, 3 deletions
diff --git a/packages/utils/src/abi_decoder.ts b/packages/utils/src/abi_decoder.ts
index ea8c91d10..836037f30 100644
--- a/packages/utils/src/abi_decoder.ts
+++ b/packages/utils/src/abi_decoder.ts
@@ -9,7 +9,8 @@ import {
RawLog,
SolidityTypes,
} from 'ethereum-types';
-import * as ethers from 'ethers';
+import { ethers } from 'ethers';
+import { Interface } from 'ethers/utils/interface';
import * as _ from 'lodash';
import { addressUtils } from './address_utils';
@@ -41,7 +42,7 @@ export class AbiDecoder {
return log;
}
const event = this._methodIds[methodId][numIndexedArgs];
- const ethersInterface = new ethers.Interface([event]);
+ const ethersInterface = new Interface([event]);
const decodedParams: DecodedLogArgs = {};
let topicsIndex = 1;
@@ -96,7 +97,7 @@ export class AbiDecoder {
if (_.isUndefined(abiArray)) {
return;
}
- const ethersInterface = new ethers.Interface(abiArray);
+ const ethersInterface = new Interface(abiArray);
_.map(abiArray, (abi: AbiDefinition) => {
if (abi.type === AbiType.Event) {
const topic = ethersInterface.events[abi.name].topic;