Update eventsDecoder.js

add event emitter address in log result
pull/7/head
yann300 7 years ago committed by GitHub
parent 0b48cab2c2
commit 03b1a26893
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      remix-lib/src/execution/eventsDecoder.js

@ -76,9 +76,9 @@ class EventsDecoder {
var topics = log.topics.map((value) => { var topics = log.topics.map((value) => {
return value.indexOf('0x') === 0 ? value : '0x' + value return value.indexOf('0x') === 0 ? value : '0x' + value
}) })
events.push({ topic: topicId, event: abi.event, args: abi.object.parse(topics, '0x' + log.data) }) events.push({ from: log.address, topic: topicId, event: abi.event, args: abi.object.parse(topics, '0x' + log.data) })
} else { } else {
events.push({ data: log.data, topics: log.topics }) events.push({ from: log.address, data: log.data, topics: log.topics })
} }
} }
cb(null, { decoded: events, raw: logs }) cb(null, { decoded: events, raw: logs })

Loading…
Cancel
Save