diff --git a/libs/remix-ui/terminal/src/lib/actions/terminalAction.ts b/libs/remix-ui/terminal/src/lib/actions/terminalAction.ts index 4c1dba994d..190c411500 100644 --- a/libs/remix-ui/terminal/src/lib/actions/terminalAction.ts +++ b/libs/remix-ui/terminal/src/lib/actions/terminalAction.ts @@ -197,11 +197,11 @@ export const initListeningOnNetwork = (props, dispatch) => { compiledContracts = await props._deps.compilersArtefacts.__last.getContracts() } console.log({ compiledContracts }) - await props.eventsDecoder.parseLogs(tx, resolvedTransaction.contractName, compiledContracts, (error, logs) => { + await props.eventsDecoder.parseLogs(tx, resolvedTransaction.contractName, compiledContracts, async (error, logs) => { if (!error) { console.log({ tx: tx, receipt: receipt, resolvedData: resolvedTransaction, logs: logs }) console.log('knownTransaction dispatch') - dispatch({ type: 'knownTransaction', payload: { message: [{ tx: tx, receipt: receipt }] } }) + await dispatch({ type: 'knownTransaction', payload: { message: [{ tx: tx, receipt: receipt, resolvedData: resolvedTransaction, logs: logs }] } }) } }) } else { diff --git a/libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx b/libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx index 185cad167c..688ea1cf16 100644 --- a/libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx +++ b/libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx @@ -714,9 +714,9 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => { } } - const renderKnownTransactions = (tx, receipt, index) => { + const renderUnKnownTransactions = (tx, receipt, resolvedData, logs, index) => { const from = tx.from - const to = tx.to + const to = tx.to ? tx.to : resolvedData.contractName + '.' + resolvedData.fn const obj = { from, to } const txType = 'unknown' + (tx.isCall ? 'Call' : 'Tx') return ( @@ -740,9 +740,9 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => { to, gas: tx.gas, input: tx.input, - 'decoded input': tx.resolvedData && tx.resolvedData.params ? JSON.stringify(typeConversion.stringify(tx.resoparams), null, '\t') : ' - ', - 'decoded output': tx.resolvedData && tx.resolvedData.decodedReturnValue ? JSON.stringify(typeConversion.stringify(tx.resolvedData.decodedReturnValue), null, '\t') : ' - ', - logs: tx.logs, + 'decoded input': resolvedData && resolvedData.params ? JSON.stringify(typeConversion.stringify(resolvedData.params), null, '\t') : ' - ', + 'decoded output': resolvedData && resolvedData.decodedReturnValue ? JSON.stringify(typeConversion.stringify(resolvedData.decodedReturnValue), null, '\t') : ' - ', + logs: logs, val: tx.value, transactionCost: tx.transactionCost, executionCost: tx.executionCost @@ -850,7 +850,7 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => { } else if (x.name === 'unknownTransaction' || x.name === 'knownTransaction') { return x.message.filter(x => x.tx.hash.includes(searchInput) || x.tx.from.includes(searchInput) || (x.tx.to.includes(searchInput))).map((trans) => { console.log({ trans }, 'first output from deploy') - return (