Merge pull request #844 from ethereum/retrieveReceipt

Retrieve receipt
pull/3094/head
yann300 7 years ago committed by GitHub
commit a46305d0db
  1. 17
      remix-lib/src/execution/txListener.js
  2. 1
      remix-lib/src/web3Provider/web3VmProvider.js

@ -200,13 +200,16 @@ class TxListener {
_resolve (transactions, callback) { _resolve (transactions, callback) {
async.each(transactions, (tx, cb) => { async.each(transactions, (tx, cb) => {
this._resolveTx(tx, (error, resolvedData) => { executionContext.web3().eth.getTransactionReceipt(tx.hash, (error, receipt) => {
if (error) cb(error) if (error) return cb(error)
if (resolvedData) { this._resolveTx(receipt, (error, resolvedData) => {
this.event.trigger('txResolved', [tx, resolvedData]) if (error) cb(error)
} if (resolvedData) {
this.event.trigger('newTransaction', [tx]) this.event.trigger('txResolved', [receipt, resolvedData])
cb() }
this.event.trigger('newTransaction', [receipt])
cb()
})
}) })
}, () => { }, () => {
callback() callback()

@ -121,6 +121,7 @@ web3VmProvider.prototype.txProcessed = function (self, data) {
}) })
} }
self.txsReceipt[self.processingHash].logs = logs self.txsReceipt[self.processingHash].logs = logs
self.txsReceipt[self.processingHash].transactionHash = self.processingHash
if (data.createdAddress) { if (data.createdAddress) {
var address = util.hexConvert(data.createdAddress) var address = util.hexConvert(data.createdAddress)

Loading…
Cancel
Save