From 4bee63afc69b10ee5a9a4aa9279a926068a37242 Mon Sep 17 00:00:00 2001 From: Jacob Evans Date: Thu, 19 Apr 2018 16:11:10 +1000 Subject: Interface for EventDescription renamed topics --- packages/typescript-typings/types/ethers/index.d.ts | 2 +- packages/utils/src/abi_decoder.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'packages') diff --git a/packages/typescript-typings/types/ethers/index.d.ts b/packages/typescript-typings/types/ethers/index.d.ts index 313e8eb8a..a3d27a98c 100644 --- a/packages/typescript-typings/types/ethers/index.d.ts +++ b/packages/typescript-typings/types/ethers/index.d.ts @@ -18,7 +18,7 @@ declare module 'ethers' { parse: (...args: any[]) => any; inputs: { names: string[]; types: string[] }; signature: string; - topic: string; + topics: string[]; } export class Interface { public functions: { [functionName: string]: FunctionDescription }; diff --git a/packages/utils/src/abi_decoder.ts b/packages/utils/src/abi_decoder.ts index cb3052a33..150f74a15 100644 --- a/packages/utils/src/abi_decoder.ts +++ b/packages/utils/src/abi_decoder.ts @@ -80,7 +80,7 @@ export class AbiDecoder { 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; } }); -- cgit v1.2.3