|
|
|
@ -674,8 +674,9 @@ export class Blockchain extends Plugin { |
|
|
|
|
const hhlogs = await this.web3().eth.getHHLogsForTx(txResult.transactionHash) |
|
|
|
|
|
|
|
|
|
if (hhlogs && hhlogs.length) { |
|
|
|
|
let finalLogs = '<b>console.log:</b>\n' |
|
|
|
|
for (const log of hhlogs) { |
|
|
|
|
let finalLogs = <div><div><b>console.log:</b></div> |
|
|
|
|
{ |
|
|
|
|
hhlogs.map((log) => { |
|
|
|
|
let formattedLog |
|
|
|
|
// Hardhat implements the same formatting options that can be found in Node.js' console.log,
|
|
|
|
|
// which in turn uses util.format: https://nodejs.org/dist/latest-v12.x/docs/api/util.html#util_util_format_format_args
|
|
|
|
@ -686,10 +687,11 @@ export class Blockchain extends Plugin { |
|
|
|
|
} else { |
|
|
|
|
formattedLog = log.join(' ') |
|
|
|
|
} |
|
|
|
|
finalLogs = finalLogs + ' ' + formattedLog + '\n' |
|
|
|
|
} |
|
|
|
|
return <div>{formattedLog}</div> |
|
|
|
|
})} |
|
|
|
|
</div> |
|
|
|
|
_paq.push(['trackEvent', 'udapp', 'hardhat', 'console.log']) |
|
|
|
|
this.call('terminal', 'log', { type: 'info', value: finalLogs }) |
|
|
|
|
this.call('terminal', 'logHtml', finalLogs) |
|
|
|
|
} |
|
|
|
|
execResult = await this.web3().eth.getExecutionResultFromSimulator(txResult.transactionHash) |
|
|
|
|
if (execResult) { |
|
|
|
|