Commit 60e4dfb1 authored by yann300's avatar yann300

add topic id

parent dfd8a435
......@@ -71,7 +71,8 @@ class EventsDecoder {
for (var i in logs) {
// [address, topics, mem]
var log = logs[i]
var abi = this._event(log.topics[0].replace('0x', ''), eventsABI)
var topicId = log.topics[0]
var abi = this._event(topicId.replace('0x', ''), eventsABI)
if (abi) {
var event
try {
......@@ -108,7 +109,7 @@ class EventsDecoder {
} catch (e) {
decoded = log.data
}
events.push({ event: event, args: decoded })
events.push({ topic: topicId, event: event, args: decoded })
} else {
events.push({ data: log.data, topics: log.topics })
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment