From d186f6148bd44701dcc41d6b1633aae9baff2234 Mon Sep 17 00:00:00 2001 From: Jacob Evans Date: Thu, 19 Apr 2018 15:25:04 +1000 Subject: Use ethers in abi_decoder utils --- packages/utils/package.json | 2 +- packages/utils/src/abi_decoder.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/utils/package.json b/packages/utils/package.json index bbc87c53f..f309c2126 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -35,7 +35,7 @@ "@0xproject/typescript-typings": "^0.2.0", "@types/node": "^8.0.53", "bignumber.js": "~4.1.0", - "ethers-contracts": "^2.2.1", + "ethers": "^3.0.15", "js-sha3": "^0.7.0", "lodash": "^4.17.4", "web3": "^0.20.0" diff --git a/packages/utils/src/abi_decoder.ts b/packages/utils/src/abi_decoder.ts index 36c7839cf..cb3052a33 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,7 +77,7 @@ 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; -- cgit v1.2.3