gasEstimate allows from to be null, in case of a call, we set a default from

auto_exec_v2
yann300 3 years ago
parent c213e6d165
commit 5ad1aeec74
  1. 6
      libs/remix-lib/src/execution/txRunnerVM.ts

@ -56,7 +56,11 @@ export class TxRunnerVM {
runInVm (from, to, data, value, gasLimit, useCall, timestamp, callback) {
const self = this
const account = self.vmaccounts[from]
let account = self.vmaccounts[from]
if (!account && useCall && Object.keys(self.vmaccounts).length) {
from = Object.keys(self.vmaccounts)[0]
account = self.vmaccounts[from]
}
if (!account) {
return callback('Invalid account selected')
}

Loading…
Cancel
Save