diff --git a/src/app/execution/txLogger.js b/src/app/execution/txLogger.js index da2387b136..5d10eba2d5 100644 --- a/src/app/execution/txLogger.js +++ b/src/app/execution/txLogger.js @@ -117,10 +117,8 @@ function renderKnownTransaction (self, data) { if (data.tx.blockHash) { to = data.tx.to } else if (data.tx.hash) { // call (constructor of function call) - var name = data.resolvedData.contractName + '.' + data.resolvedData.fn - var logs = ', ' + data.logs.length + ' logs' if (data.resolvedData.fn === '(constructor)') { - to = name + logs + to = data.resolvedData.contractName + '.' + data.resolvedData.fn } else { to = data.resolvedData.to } @@ -147,7 +145,15 @@ function renderKnownTransaction (self, data) { tx.removeChild(table) } else { table = createTable({ - from, to, val: data.tx.value, input: data.tx.input, hash: data.tx.hash, gas: data.tx.gas, logs: data.logs + contractAddress: data.tx.contractAddress, + data: data.tx.data, + from, + to, + gas: data.tx.gas, + hash: data.tx.has, + input: data.tx.input, + logs: JSON.stringify(data.tx.logs) || '0', + val: data.tx.value }) tx.appendChild(table) } @@ -179,7 +185,7 @@ function renderUnknownTransaction (self, data) { tx.removeChild(table) } else { table = createTable({ - from, to, val: data.tx.value, input: data.tx.input, hash: data.tx.hash, gas: data.tx.gas + from, to, val: data.tx.value, input: data.tx.input, hash: data.tx.hash, gas: data.tx.gas, logs: JSON.stringify(data.tx.logs) || '0' }) tx.appendChild(table) } @@ -196,9 +202,9 @@ function context (self, data) { var to = '' if (executionContext.getProvider() === 'vm') { if (data.resolvedData.to) { - to = `${data.resolvedData.contractName}.${data.resolvedData.fn}, ${data.resolvedData.to}, ${data.logs.length} logs` + to = `${data.resolvedData.contractName}.${data.resolvedData.fn}, ${helper.shortenHexData(data.resolvedData.to)}` } else { - to = `${data.resolvedData.contractName}.${data.resolvedData.fn}, ${data.logs.length} logs` + to = `${data.resolvedData.contractName}.${data.resolvedData.fn}` } return yo`[vm] from: ${from}, to:${to}, value:${data.tx.value} wei` } else { @@ -228,49 +234,72 @@ module.exports = TxLogger // helpers function createTable (opts) { - var from = opts.from - var to = opts.to - var val = opts.val - var input = opts.input - var hash = opts.hash - var gas = opts.gas - var table = yo` -