From c79cd1335268e46dae2511d1e72445bdbd064cfc Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 11 Jun 2018 16:59:49 +0200 Subject: [PATCH 1/3] retrieve receipt --- remix-lib/src/execution/txListener.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/remix-lib/src/execution/txListener.js b/remix-lib/src/execution/txListener.js index ede2cd7b0e..b596081d66 100644 --- a/remix-lib/src/execution/txListener.js +++ b/remix-lib/src/execution/txListener.js @@ -200,13 +200,15 @@ class TxListener { _resolve (transactions, callback) { async.each(transactions, (tx, cb) => { - this._resolveTx(tx, (error, resolvedData) => { - if (error) cb(error) - if (resolvedData) { - this.event.trigger('txResolved', [tx, resolvedData]) - } - this.event.trigger('newTransaction', [tx]) - cb() + executionContext.web3().eth.getTransactionReceipt(tx.hash, (error, receipt) => { + this._resolveTx(receipt, (error, resolvedData) => { + if (error) cb(error) + if (resolvedData) { + this.event.trigger('txResolved', [receipt, resolvedData]) + } + this.event.trigger('newTransaction', [receipt]) + cb() + }) }) }, () => { callback() From b56cac146a1ae0c9a74220439b5c3ec899d55966 Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 11 Jun 2018 17:17:22 +0200 Subject: [PATCH 2/3] add transaction hash to receipt --- remix-lib/src/web3Provider/web3VmProvider.js | 1 + 1 file changed, 1 insertion(+) diff --git a/remix-lib/src/web3Provider/web3VmProvider.js b/remix-lib/src/web3Provider/web3VmProvider.js index 5294e925f3..189a44617e 100644 --- a/remix-lib/src/web3Provider/web3VmProvider.js +++ b/remix-lib/src/web3Provider/web3VmProvider.js @@ -121,6 +121,7 @@ web3VmProvider.prototype.txProcessed = function (self, data) { }) } self.txsReceipt[self.processingHash].logs = logs + self.txsReceipt[self.processingHash].transactionHash = self.processingHash if (data.createdAddress) { var address = util.hexConvert(data.createdAddress) From 8d98d382b974fdbdc61b4303682575db9516545a Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 11 Jun 2018 17:18:34 +0200 Subject: [PATCH 3/3] fis standard --- remix-lib/src/execution/txListener.js | 1 + 1 file changed, 1 insertion(+) diff --git a/remix-lib/src/execution/txListener.js b/remix-lib/src/execution/txListener.js index b596081d66..a36bbab59d 100644 --- a/remix-lib/src/execution/txListener.js +++ b/remix-lib/src/execution/txListener.js @@ -201,6 +201,7 @@ class TxListener { _resolve (transactions, callback) { async.each(transactions, (tx, cb) => { executionContext.web3().eth.getTransactionReceipt(tx.hash, (error, receipt) => { + if (error) return cb(error) this._resolveTx(receipt, (error, resolvedData) => { if (error) cb(error) if (resolvedData) {