diff options
author | Bryce <brycedneal@gmail.com> | 2018-06-23 07:56:19 +0800 |
---|---|---|
committer | Bryce <brycedneal@gmail.com> | 2018-06-23 07:56:19 +0800 |
commit | 69625946b173737932060bfa1b3a6f25d2c3acdf (patch) | |
tree | 17333d210ee29605dbb68fc01e0292cbeea69b96 /packages | |
parent | f7fe9b096115312f25f90a27a8f9e13e374dcc2b (diff) | |
download | dexon-sol-tools-69625946b173737932060bfa1b3a6f25d2c3acdf.tar dexon-sol-tools-69625946b173737932060bfa1b3a6f25d2c3acdf.tar.gz dexon-sol-tools-69625946b173737932060bfa1b3a6f25d2c3acdf.tar.bz2 dexon-sol-tools-69625946b173737932060bfa1b3a6f25d2c3acdf.tar.lz dexon-sol-tools-69625946b173737932060bfa1b3a6f25d2c3acdf.tar.xz dexon-sol-tools-69625946b173737932060bfa1b3a6f25d2c3acdf.tar.zst dexon-sol-tools-69625946b173737932060bfa1b3a6f25d2c3acdf.zip |
Typings and comment
Diffstat (limited to 'packages')
-rw-r--r-- | packages/typescript-typings/CHANGELOG.json | 9 | ||||
-rw-r--r-- | packages/typescript-typings/package.json | 2 | ||||
-rw-r--r-- | packages/utils/package.json | 2 | ||||
-rw-r--r-- | packages/utils/src/abi_decoder.ts | 5 |
4 files changed, 16 insertions, 2 deletions
diff --git a/packages/typescript-typings/CHANGELOG.json b/packages/typescript-typings/CHANGELOG.json index 5b5d5c31d..a2081e3b9 100644 --- a/packages/typescript-typings/CHANGELOG.json +++ b/packages/typescript-typings/CHANGELOG.json @@ -1,5 +1,14 @@ [ { + "version": "0.4.2", + "changes": [ + { + "note": "Additional error type for `ethers.js`", + "pr": 763 + } + ] + }, + { "timestamp": 1529397769, "version": "0.4.1", "changes": [ diff --git a/packages/typescript-typings/package.json b/packages/typescript-typings/package.json index f10d35666..3ba7c10ba 100644 --- a/packages/typescript-typings/package.json +++ b/packages/typescript-typings/package.json @@ -1,6 +1,6 @@ { "name": "@0xproject/typescript-typings", - "version": "0.4.1", + "version": "0.4.2", "engines": { "node": ">=6.12" }, diff --git a/packages/utils/package.json b/packages/utils/package.json index ee5953801..f4f39956c 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -36,7 +36,7 @@ }, "dependencies": { "ethereum-types": "^0.0.1", - "@0xproject/typescript-typings": "^0.4.1", + "@0xproject/typescript-typings": "^0.4.2", "@types/node": "^8.0.53", "ethereumjs-util": "^5.1.1", "bignumber.js": "~4.1.0", 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; |