aboutsummaryrefslogtreecommitdiffstats
path: root/packages/utils/src/abi_decoder.ts
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2018-09-13 20:04:13 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2018-09-19 23:56:23 +0800
commit5b6c91bb3f0b5a1d0586b7e772ad96f3eab1f911 (patch)
tree5a0c37be4be70f8b603e771cf232d1745b7d5f8a /packages/utils/src/abi_decoder.ts
parent6701ec68bdbda91e63ab199510469e3e6a421b57 (diff)
downloaddexon-0x-contracts-5b6c91bb3f0b5a1d0586b7e772ad96f3eab1f911.tar.gz
dexon-0x-contracts-5b6c91bb3f0b5a1d0586b7e772ad96f3eab1f911.tar.zst
dexon-0x-contracts-5b6c91bb3f0b5a1d0586b7e772ad96f3eab1f911.zip
Fixes for the breaking changes in ethers
Diffstat (limited to 'packages/utils/src/abi_decoder.ts')
-rw-r--r--packages/utils/src/abi_decoder.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/utils/src/abi_decoder.ts b/packages/utils/src/abi_decoder.ts
index 265eb105e..ea8c91d10 100644
--- a/packages/utils/src/abi_decoder.ts
+++ b/packages/utils/src/abi_decoder.ts
@@ -47,7 +47,7 @@ export class AbiDecoder {
let decodedData: any[];
try {
- decodedData = ethersInterface.events[event.name].parse(log.data);
+ decodedData = ethersInterface.events[event.name].decode(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
@@ -99,7 +99,7 @@ export class AbiDecoder {
const ethersInterface = new ethers.Interface(abiArray);
_.map(abiArray, (abi: AbiDefinition) => {
if (abi.type === AbiType.Event) {
- const topic = ethersInterface.events[abi.name].topics[0];
+ const topic = ethersInterface.events[abi.name].topic;
const numIndexedArgs = _.reduce(abi.inputs, (sum, input) => (input.indexed ? sum + 1 : sum), 0);
this._methodIds[topic] = {
...this._methodIds[topic],