Interface for EventDescription renamed topics
This commit is contained in:
		| @@ -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 }; | ||||
|   | ||||
| @@ -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; | ||||
|             } | ||||
|         }); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user