diff options
author | Bryce <brycedneal@gmail.com> | 2018-06-23 07:39:58 +0800 |
---|---|---|
committer | Bryce <brycedneal@gmail.com> | 2018-06-23 07:41:47 +0800 |
commit | f7fe9b096115312f25f90a27a8f9e13e374dcc2b (patch) | |
tree | 9ad7cfb030db8172ceb90c74fbad4f996cb1e0d6 /packages/utils/src | |
parent | 9f8cad93f794b9a95b3a947c5c61eefcb603f2e9 (diff) | |
download | dexon-0x-contracts-f7fe9b096115312f25f90a27a8f9e13e374dcc2b.tar.gz dexon-0x-contracts-f7fe9b096115312f25f90a27a8f9e13e374dcc2b.tar.zst dexon-0x-contracts-f7fe9b096115312f25f90a27a8f9e13e374dcc2b.zip |
Update at abi_decoder
Diffstat (limited to 'packages/utils/src')
-rw-r--r-- | packages/utils/src/abi_decoder.ts | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/packages/utils/src/abi_decoder.ts b/packages/utils/src/abi_decoder.ts index 931cb94b2..1f805c2f1 100644 --- a/packages/utils/src/abi_decoder.ts +++ b/packages/utils/src/abi_decoder.ts @@ -32,7 +32,15 @@ export class AbiDecoder { const decodedParams: DecodedLogArgs = {}; let topicsIndex = 1; - const decodedData = ethersInterface.events[event.name].parse(log.data); + let decodedData: any[]; + try { + decodedData = ethersInterface.events[event.name].parse(log.data); + } catch (error) { + if (error.code === ethers.errors.INVALID_ARGUMENT) { + return log; + } + throw error; + } let didFailToDecode = false; _.forEach(event.inputs, (param: EventParameter, i: number) => { |