aboutsummaryrefslogtreecommitdiffstats
path: root/packages/utils
diff options
context:
space:
mode:
authorBryce <brycedneal@gmail.com>2018-06-23 07:39:58 +0800
committerBryce <brycedneal@gmail.com>2018-06-23 07:41:47 +0800
commitf7fe9b096115312f25f90a27a8f9e13e374dcc2b (patch)
tree9ad7cfb030db8172ceb90c74fbad4f996cb1e0d6 /packages/utils
parent9f8cad93f794b9a95b3a947c5c61eefcb603f2e9 (diff)
downloaddexon-0x-contracts-f7fe9b096115312f25f90a27a8f9e13e374dcc2b.tar
dexon-0x-contracts-f7fe9b096115312f25f90a27a8f9e13e374dcc2b.tar.gz
dexon-0x-contracts-f7fe9b096115312f25f90a27a8f9e13e374dcc2b.tar.bz2
dexon-0x-contracts-f7fe9b096115312f25f90a27a8f9e13e374dcc2b.tar.lz
dexon-0x-contracts-f7fe9b096115312f25f90a27a8f9e13e374dcc2b.tar.xz
dexon-0x-contracts-f7fe9b096115312f25f90a27a8f9e13e374dcc2b.tar.zst
dexon-0x-contracts-f7fe9b096115312f25f90a27a8f9e13e374dcc2b.zip
Update at abi_decoder
Diffstat (limited to 'packages/utils')
-rw-r--r--packages/utils/CHANGELOG.json9
-rw-r--r--packages/utils/package.json2
-rw-r--r--packages/utils/src/abi_decoder.ts10
3 files changed, 19 insertions, 2 deletions
diff --git a/packages/utils/CHANGELOG.json b/packages/utils/CHANGELOG.json
index ed5558981..1454312e9 100644
--- a/packages/utils/CHANGELOG.json
+++ b/packages/utils/CHANGELOG.json
@@ -1,5 +1,14 @@
[
{
+ "version": "0.7.3",
+ "changes": [
+ {
+ "note": "Fixes uncaught Error in abi_decoder",
+ "pr": 763
+ }
+ ]
+ },
+ {
"version": "0.7.2",
"changes": [
{
diff --git a/packages/utils/package.json b/packages/utils/package.json
index 06d67566c..ee5953801 100644
--- a/packages/utils/package.json
+++ b/packages/utils/package.json
@@ -1,6 +1,6 @@
{
"name": "@0xproject/utils",
- "version": "0.7.1",
+ "version": "0.7.3",
"engines": {
"node": ">=6.12"
},
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) => {