@@ -211,7 +210,7 @@ function ExecutionContext () {
vms[currentFork].stateManager.revert(()=>{
vms[currentFork].stateManager.checkpoint(()=>{})
})
self.event.trigger('contextChanged',['vm'])
this.event.trigger('contextChanged',['vm'])
returncb()
}
...
...
@@ -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).')
returncb()
}else{
self.askPermission()
this.askPermission()
executionContext=context
web3.setProvider(injectedProvider)
self._updateBlockGasLimit()
self.event.trigger('contextChanged',['injected'])
this._updateBlockGasLimit()
this.event.trigger('contextChanged',['injected'])
returncb()
}
}
...
...
@@ -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
// 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
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
if(gasEstimation>gasLimit){
...
...
@@ -257,7 +253,7 @@ function run (self, tx, stamp, confirmationCb, gasEstimationForceSend, promptCb,