pull/5370/head
yann300 4 years ago
parent ca756ac2f4
commit a1769914f1
  1. 3
      libs/remix-lib/src/execution/txRunnerVM.ts
  2. 2
      libs/remix-lib/src/execution/txRunnerWeb3.ts
  3. 2
      libs/remix-lib/src/web3Provider/web3VmProvider.ts
  4. 5
      libs/remix-simulator/src/methods/transactions.ts
  5. 1
      libs/remix-simulator/src/methods/txProcess.ts
  6. 1
      libs/remix-simulator/src/provider.ts
  7. 1
      libs/remix-simulator/src/vm-context.ts

@ -110,11 +110,10 @@ export class TxRunnerVM {
result: result,
transactionHash: bufferToHex(Buffer.from(tx.hash())),
block,
tx,
tx
})
}).catch(function (err) {
callback(err)
})
}
}

@ -85,7 +85,7 @@ export class TxRunnerWeb3 {
this.getWeb3().eth.estimateGas(tx, (err, gasEstimation) => {
if (err && err.message.indexOf('Invalid JSON RPC response') !== -1) {
// // @todo(#378) this should be removed when https://github.com/WalletConnect/walletconnect-monorepo/issues/334 is fixed
new Error('Gas estimation failed because of an unknown internal error. This may indicated that the transaction will fail.')
callback(new Error('Gas estimation failed because of an unknown internal error. This may indicated that the transaction will fail.'))
}
gasEstimationForceSend(err, () => {
// callback is called whenever no error

@ -74,7 +74,7 @@ export class Web3VmProvider {
this.utils = Web3.utils || []
this.txsMapBlock = {}
this.blocks = {}
this.latestBlockNumber
this.latestBlockNumber = 0
}
setVM (vm) {

@ -7,7 +7,6 @@ export class Transactions {
accounts
tags
constructor (vmContext) {
this.vmContext = vmContext
this.tags = {}
@ -44,7 +43,7 @@ export class Transactions {
const hash = '0x' + result.tx.hash().toString('hex')
this.vmContext.trackTx(hash, result.block)
this.vmContext.trackExecResult(hash, result.result.execResult)
return cb (null, result.transactionHash)
return cb(null, result.transactionHash)
}
cb(error)
})
@ -122,7 +121,7 @@ export class Transactions {
this.tags[tag] = result.transactionHash
// calls are not supposed to return a transaction hash. we do this for keeping track of it and allowing debugging calls.
const returnValue = `0x${result.result.execResult.returnValue.toString('hex') || '0'}`
return cb (null, returnValue)
return cb(null, returnValue)
}
cb(error)
})

@ -3,7 +3,6 @@ const TxExecution = execution.txExecution
const TxRunnerVM = execution.TxRunnerVM
const TxRunner = execution.TxRunner
function runCall (payload, from, to, data, value, gasLimit, txRunner, callbacks, callback) {
const finalCallback = function (err, result) {
if (err) {

@ -122,4 +122,3 @@ export function extend (web3) {
})
}
}

@ -94,7 +94,6 @@ export class VMContext {
this.txs = {}
this.exeResults = {}
this.logsManager = new execution.LogsManager()
}
createVm (hardfork) {

Loading…
Cancel
Save