aboutsummaryrefslogtreecommitdiffstats
path: root/packages/utils/src/abi_decoder.ts
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-09-30 14:31:34 +0800
committerFabio Berger <me@fabioberger.com>2018-09-30 14:31:34 +0800
commitde7470d936ae800adb45752bc36c8325845c8896 (patch)
treed644c402f1f10794dd15aba7e4a9223b46b1832e /packages/utils/src/abi_decoder.ts
parentb9eb2b3918b4b1a891c07a4ccb5eb40847ae90fc (diff)
parentac14dd2b29b42ef4d2a46db9b70d4d30cf9bd40f (diff)
downloaddexon-sol-tools-de7470d936ae800adb45752bc36c8325845c8896.tar
dexon-sol-tools-de7470d936ae800adb45752bc36c8325845c8896.tar.gz
dexon-sol-tools-de7470d936ae800adb45752bc36c8325845c8896.tar.bz2
dexon-sol-tools-de7470d936ae800adb45752bc36c8325845c8896.tar.lz
dexon-sol-tools-de7470d936ae800adb45752bc36c8325845c8896.tar.xz
dexon-sol-tools-de7470d936ae800adb45752bc36c8325845c8896.tar.zst
dexon-sol-tools-de7470d936ae800adb45752bc36c8325845c8896.zip
merge development
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],