Commit b27ef515 authored by yann300's avatar yann300

add raw logs to details

parent a7622d30
...@@ -71,7 +71,7 @@ class EventsDecoder { ...@@ -71,7 +71,7 @@ class EventsDecoder {
} }
events.push({ event: event, args: decoded }) events.push({ event: event, args: decoded })
} }
cb(null, events) cb(null, { decoded: events, raw: logs })
} }
} }
......
...@@ -175,7 +175,7 @@ function renderKnownTransaction (self, data) { ...@@ -175,7 +175,7 @@ function renderKnownTransaction (self, data) {
input: data.tx.input, input: data.tx.input,
'decoded input': data.resolvedData && data.resolvedData.params ? JSON.stringify(value(data.resolvedData.params), null, '\t') : ' - ', 'decoded input': data.resolvedData && data.resolvedData.params ? JSON.stringify(value(data.resolvedData.params), null, '\t') : ' - ',
'decoded output': data.resolvedData && data.resolvedData.decodedReturnValue ? JSON.stringify(value(data.resolvedData.decodedReturnValue), null, '\t') : ' - ', 'decoded output': data.resolvedData && data.resolvedData.decodedReturnValue ? JSON.stringify(value(data.resolvedData.decodedReturnValue), null, '\t') : ' - ',
logs: JSON.stringify(data.logs, null, '\t') || '0', logs: data.logs,
val: data.tx.value val: data.tx.value
}) })
tx.appendChild(table) tx.appendChild(table)
...@@ -240,7 +240,7 @@ function renderUnknownTransaction (self, data) { ...@@ -240,7 +240,7 @@ function renderUnknownTransaction (self, data) {
input: data.tx.input, input: data.tx.input,
hash: data.tx.hash, hash: data.tx.hash,
gas: data.tx.gas, gas: data.tx.gas,
logs: JSON.stringify(data.logs) || '0' logs: data.logs
}) })
tx.appendChild(table) tx.appendChild(table)
} }
...@@ -384,7 +384,9 @@ function createTable (opts) { ...@@ -384,7 +384,9 @@ function createTable (opts) {
var logs = yo` var logs = yo`
<tr class="${css.tr}"> <tr class="${css.tr}">
<td class="${css.td}"> logs </td> <td class="${css.td}"> logs </td>
<td class="${css.td}"><i class="fa fa-clipboard ${css.clipboardCopy}" aria-hidden="true" onclick=${function () { copy(opts.logs || '0') }} title='Copy to clipboard'></i>${opts.logs || '0'}</td> <td class="${css.td}">
<i class="fa fa-clipboard ${css.clipboardCopy}" aria-hidden="true" onclick=${function () { copy(JSON.stringify(opts.logs.decoded || [], null, '\t')) }} title='Copy Logs to clipboard'></i>
<i class="fa fa-clipboard ${css.clipboardCopy}" aria-hidden="true" onclick=${function () { copy(JSON.stringify(opts.logs.raw || '0')) }} title='Copy Raw Logs to clipboard'></i>${JSON.stringify(opts.logs.decoded || [], null, '\t')}</td>
</tr class="${css.tr}"> </tr class="${css.tr}">
` `
if (opts.logs) table.appendChild(logs) if (opts.logs) table.appendChild(logs)
......
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