From 22160df2d2d5aef63c3e2c3f502ac15119b18e07 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 9 Oct 2018 12:55:10 +0200 Subject: Fix ethers build issue --- packages/utils/src/abi_decoder.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'packages/utils/src/abi_decoder.ts') 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; -- cgit From f93774f855d5735aff975cdb87c61aad624b4c9a Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 9 Oct 2018 15:46:13 +0200 Subject: Stop accesing ethers private methods --- packages/utils/src/abi_decoder.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'packages/utils/src/abi_decoder.ts') diff --git a/packages/utils/src/abi_decoder.ts b/packages/utils/src/abi_decoder.ts index 836037f30..ac3e54efb 100644 --- a/packages/utils/src/abi_decoder.ts +++ b/packages/utils/src/abi_decoder.ts @@ -10,7 +10,6 @@ import { SolidityTypes, } from 'ethereum-types'; import { ethers } from 'ethers'; -import { Interface } from 'ethers/utils/interface'; import * as _ from 'lodash'; import { addressUtils } from './address_utils'; @@ -42,7 +41,7 @@ export class AbiDecoder { return log; } const event = this._methodIds[methodId][numIndexedArgs]; - const ethersInterface = new Interface([event]); + const ethersInterface = new ethers.utils.Interface([event]); const decodedParams: DecodedLogArgs = {}; let topicsIndex = 1; @@ -97,7 +96,7 @@ export class AbiDecoder { if (_.isUndefined(abiArray)) { return; } - const ethersInterface = new Interface(abiArray); + const ethersInterface = new ethers.utils.Interface(abiArray); _.map(abiArray, (abi: AbiDefinition) => { if (abi.type === AbiType.Event) { const topic = ethersInterface.events[abi.name].topic; -- cgit