pull/1122/head
yann300 4 years ago
parent 66cc57fb37
commit eff334fffb
  1. 14
      libs/remix-debug/test/decoder/vmCall.ts
  2. 12
      libs/remix-debug/test/vmCall.ts

@ -54,15 +54,15 @@ export async function initVM (st, privateKey) {
const vm = VM.vm
var address = utileth.Address.fromPrivateKey(privateKey)
vm.stateManager.getAccount(address).then((account) => {
try {
let account = await vm.stateManager.getAccount(address)
account.balance = new BN('f00000000000000001', 16)
vm.stateManager.putAccount(address, account).catch((error) => {
console.log(error)
})
}).catch((error) => {
await vm.stateManager.putAccount(address, account)
} catch (error) {
console.log(error)
})
}
var web3Provider = new remixLib.vm.Web3VMProvider()
web3Provider.setVM(vm)
vm.web3 = web3Provider

@ -42,14 +42,14 @@ async function initVM (privateKey) {
activatePrecompiles: true
})
await vm.init()
vm.stateManager.getAccount(address).then((account) => {
try {
let account = await vm.stateManager.getAccount(address)
account.balance = new BN('f00000000000000001', 16)
vm.stateManager.putAccount(address, account).catch((error) => {
console.log(error)
})
}).catch((error) => {
await vm.stateManager.putAccount(address, account)
} catch (error) {
console.log(error)
})
}
var web3Provider = new remixLib.vm.Web3VMProvider()
web3Provider.setVM(vm)

Loading…
Cancel
Save