|
|
@ -180,12 +180,12 @@ class TxLogger { |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
opts.events.txListener.register('newTransaction', (tx) => { |
|
|
|
opts.events.txListener.register('newTransaction', (tx, receipt) => { |
|
|
|
log(this, tx, opts.api) |
|
|
|
log(this, tx, receipt, opts.api) |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
opts.events.txListener.register('newCall', (tx) => { |
|
|
|
opts.events.txListener.register('newCall', (tx) => { |
|
|
|
log(this, tx, opts.api) |
|
|
|
log(this, tx, null, opts.api) |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -199,17 +199,17 @@ function debug (e, data, self) { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function log (self, tx, api) { |
|
|
|
function log (self, tx, receipt, api) { |
|
|
|
var resolvedTransaction = api.resolvedTransaction(tx.hash) |
|
|
|
var resolvedTransaction = api.resolvedTransaction(tx.hash) |
|
|
|
if (resolvedTransaction) { |
|
|
|
if (resolvedTransaction) { |
|
|
|
api.parseLogs(tx, resolvedTransaction.contractName, api.compiledContracts(), (error, logs) => { |
|
|
|
api.parseLogs(tx, resolvedTransaction.contractName, api.compiledContracts(), (error, logs) => { |
|
|
|
if (!error) { |
|
|
|
if (!error) { |
|
|
|
self.logKnownTX({ tx: tx, resolvedData: resolvedTransaction, logs: logs }) |
|
|
|
self.logKnownTX({ tx: tx, receipt: receipt, resolvedData: resolvedTransaction, logs: logs }) |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
// contract unknown - just displaying raw tx.
|
|
|
|
// contract unknown - just displaying raw tx.
|
|
|
|
self.logUnknownTX({ tx: tx }) |
|
|
|
self.logUnknownTX({ tx: tx, receipt: receipt }) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -221,7 +221,7 @@ function renderKnownTransaction (self, data) { |
|
|
|
var tx = yo` |
|
|
|
var tx = yo` |
|
|
|
<span id="tx${data.tx.hash}"> |
|
|
|
<span id="tx${data.tx.hash}"> |
|
|
|
<div class="${css.log}" onclick=${e => txDetails(e, tx, data, obj)}> |
|
|
|
<div class="${css.log}" onclick=${e => txDetails(e, tx, data, obj)}> |
|
|
|
${checkTxStatus(data.tx, txType)} |
|
|
|
${checkTxStatus(data.receipt, txType)} |
|
|
|
${context(self, {from, to, data})} |
|
|
|
${context(self, {from, to, data})} |
|
|
|
<div class=${css.buttons}> |
|
|
|
<div class=${css.buttons}> |
|
|
|
<div class=${css.debug} onclick=${(e) => debug(e, data, self)}>Debug</div> |
|
|
|
<div class=${css.debug} onclick=${(e) => debug(e, data, self)}>Debug</div> |
|
|
@ -267,7 +267,7 @@ function renderUnknownTransaction (self, data) { |
|
|
|
var tx = yo` |
|
|
|
var tx = yo` |
|
|
|
<span id="tx${data.tx.hash}"> |
|
|
|
<span id="tx${data.tx.hash}"> |
|
|
|
<div class="${css.log}" onclick=${e => txDetails(e, tx, data, obj)}> |
|
|
|
<div class="${css.log}" onclick=${e => txDetails(e, tx, data, obj)}> |
|
|
|
${checkTxStatus(data.tx, txType)} |
|
|
|
${checkTxStatus(data.receipt, txType)} |
|
|
|
${context(self, {from, to, data})} |
|
|
|
${context(self, {from, to, data})} |
|
|
|
<div class=${css.buttons}> |
|
|
|
<div class=${css.buttons}> |
|
|
|
<div class=${css.debug} onclick=${(e) => debug(e, data, self)}>Debug</div> |
|
|
|
<div class=${css.debug} onclick=${(e) => debug(e, data, self)}>Debug</div> |
|
|
@ -370,8 +370,8 @@ function txDetails (e, tx, data, obj) { |
|
|
|
log.removeChild(arrow) |
|
|
|
log.removeChild(arrow) |
|
|
|
log.appendChild(arrowUp) |
|
|
|
log.appendChild(arrowUp) |
|
|
|
table = createTable({ |
|
|
|
table = createTable({ |
|
|
|
hash: data.tx.transactionHash, |
|
|
|
hash: data.tx.hash, |
|
|
|
status: data.tx.status, |
|
|
|
status: data.receipt.status, |
|
|
|
isCall: data.tx.isCall, |
|
|
|
isCall: data.tx.isCall, |
|
|
|
contractAddress: data.tx.contractAddress, |
|
|
|
contractAddress: data.tx.contractAddress, |
|
|
|
data: data.tx, |
|
|
|
data: data.tx, |
|
|
|