@@ -211,7 +210,7 @@ function ExecutionContext () {
...
@@ -211,7 +210,7 @@ function ExecutionContext () {
vms[currentFork].stateManager.revert(()=>{
vms[currentFork].stateManager.revert(()=>{
vms[currentFork].stateManager.checkpoint(()=>{})
vms[currentFork].stateManager.checkpoint(()=>{})
})
})
self.event.trigger('contextChanged',['vm'])
this.event.trigger('contextChanged',['vm'])
returncb()
returncb()
}
}
...
@@ -220,11 +219,11 @@ function ExecutionContext () {
...
@@ -220,11 +219,11 @@ function ExecutionContext () {
infoCb('No injected Web3 provider found. Make sure your provider (e.g. MetaMask) is active and running (when recently activated you may have to reload the page).')
infoCb('No injected Web3 provider found. Make sure your provider (e.g. MetaMask) is active and running (when recently activated you may have to reload the page).')
returncb()
returncb()
}else{
}else{
self.askPermission()
this.askPermission()
executionContext=context
executionContext=context
web3.setProvider(injectedProvider)
web3.setProvider(injectedProvider)
self._updateBlockGasLimit()
this._updateBlockGasLimit()
self.event.trigger('contextChanged',['injected'])
this.event.trigger('contextChanged',['injected'])
returncb()
returncb()
}
}
}
}
...
@@ -239,16 +238,16 @@ function ExecutionContext () {
...
@@ -239,16 +238,16 @@ function ExecutionContext () {
if(!data.length)data=newUint8Array(32*abi.inputs.length)// ensuring the data is at least filled by 0 cause `AbiCoder` throws if there's not engouh data
if(!data.length)data=newUint8Array(32*abi.inputs.length)// ensuring the data is at least filled by 0 cause `AbiCoder` throws if there's not engouh data
// NOTE: estimateGas very likely will return a large limit if execution of the code failed
// NOTE: estimateGas very likely will return a large limit if execution of the code failed
// we want to be able to run the code in order to debug and find the cause for the failure
// we want to be able to run the code in order to debug and find the cause for the failure
if(err)returncallback(err)
if(err)returncallback(err)
varwarnEstimation=' An important gas estimation might also be the sign of a problem in the contract code. Please check loops and be sure you did not sent value to a non payable function (that\'s also the reason of strong gas estimation). '
letwarnEstimation=' An important gas estimation might also be the sign of a problem in the contract code. Please check loops and be sure you did not sent value to a non payable function (that\'s also the reason of strong gas estimation). '
warnEstimation+=' '+err
warnEstimation+=' '+err
if(gasEstimation>gasLimit){
if(gasEstimation>gasLimit){
...
@@ -257,7 +253,7 @@ function run (self, tx, stamp, confirmationCb, gasEstimationForceSend, promptCb,
...
@@ -257,7 +253,7 @@ function run (self, tx, stamp, confirmationCb, gasEstimationForceSend, promptCb,