From db308812b2ac4513a1ab8c34f7c41b49b8aa084f Mon Sep 17 00:00:00 2001 From: Richard Moore Date: Fri, 30 Sep 2022 20:03:24 -0400 Subject: [PATCH] Fix Interface signatures to allow strings as fragments. --- src.ts/abi/interface.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src.ts/abi/interface.ts b/src.ts/abi/interface.ts index 5761827ff..326693091 100644 --- a/src.ts/abi/interface.ts +++ b/src.ts/abi/interface.ts @@ -760,7 +760,7 @@ export class Interface { } */ // Create the filter for the event with search criteria (e.g. for eth_filterLog) - encodeFilterTopics(eventFragment: EventFragment, values: ReadonlyArray): Array> { + encodeFilterTopics(eventFragment: EventFragment | string, values: ReadonlyArray): Array> { if (typeof(eventFragment) === "string") { eventFragment = this.getEvent(eventFragment); } @@ -799,7 +799,7 @@ export class Interface { values.forEach((value, index) => { - const param = eventFragment.inputs[index]; + const param = (eventFragment).inputs[index]; if (!param.indexed) { if (value != null) { @@ -827,7 +827,7 @@ export class Interface { return topics; } - encodeEventLog(eventFragment: EventFragment, values: ReadonlyArray): { data: string, topics: Array } { + encodeEventLog(eventFragment: EventFragment | string, values: ReadonlyArray): { data: string, topics: Array } { if (typeof(eventFragment) === "string") { eventFragment = this.getEvent(eventFragment); }