aboutsummaryrefslogtreecommitdiffstats
path: root/packages/utils/src/abi_decoder.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/utils/src/abi_decoder.ts')
-rw-r--r--packages/utils/src/abi_decoder.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/packages/utils/src/abi_decoder.ts b/packages/utils/src/abi_decoder.ts
index 1f805c2f1..390423644 100644
--- a/packages/utils/src/abi_decoder.ts
+++ b/packages/utils/src/abi_decoder.ts
@@ -37,6 +37,11 @@ export class AbiDecoder {
decodedData = ethersInterface.events[event.name].parse(log.data);
} catch (error) {
if (error.code === ethers.errors.INVALID_ARGUMENT) {
+ // Because we index events by Method ID, and Method IDs are derived from the method
+ // name and the input parameters, it's possible that the return value of the event
+ // does not match our ABI. If that's the case, then ethers will throw an error
+ // when we try to parse the event. We handle that case here by returning the log rather
+ // than throwing an error.
return log;
}
throw error;