Merge pull request #844 from ethereum/retrieveReceipt

Retrieve receipt
pull/7/head
yann300 7 years ago committed by GitHub
commit e6268175bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  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) {
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) => {
if (error) return cb(error)
this._resolveTx(receipt, (error, resolvedData) => {
if (error) cb(error)
if (resolvedData) {
this.event.trigger('txResolved', [receipt, resolvedData])
}
this.event.trigger('newTransaction', [receipt])
cb()
})
})
}, () => {
callback()

@ -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)

Loading…
Cancel
Save