show hh consoles in remix terminal

pull/1460/head
aniket-engg 3 years ago committed by Aniket
parent 44559ef06a
commit 4ec137e959
  1. 9
      apps/remix-ide/src/blockchain/blockchain.js

@ -499,8 +499,13 @@ class Blockchain extends Plugin {
let returnValue = null let returnValue = null
if (isVM) { if (isVM) {
const hhlogs = await this.web3().eth.getHHLogsForTx(txResult.transactionHash) const hhlogs = await this.web3().eth.getHHLogsForTx(txResult.transactionHash)
console.log('hhLogs--2->', hhlogs) if (hhlogs && hhlogs.length) {
this.call('terminal', 'log', { type: 'info', value: hhlogs }) let finalLogs = 'Console.log:\n'
for (const log of hhlogs) {
finalLogs = finalLogs + log.join('') + '\n'
}
this.call('terminal', 'log', { type: 'info', value: finalLogs })
}
execResult = await this.web3().eth.getExecutionResultFromSimulator(txResult.transactionHash) execResult = await this.web3().eth.getExecutionResultFromSimulator(txResult.transactionHash)
if (execResult) { if (execResult) {
// if it's not the VM, we don't have return value. We only have the transaction, and it does not contain the return value. // if it's not the VM, we don't have return value. We only have the transaction, and it does not contain the return value.

Loading…
Cancel
Save