From 4551559409352286d49e11cb486094fb574ac187 Mon Sep 17 00:00:00 2001 From: yann300 Date: Thu, 22 Apr 2021 10:20:37 +0200 Subject: [PATCH] fix address type --- libs/remix-lib/src/web3Provider/web3VmProvider.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/libs/remix-lib/src/web3Provider/web3VmProvider.ts b/libs/remix-lib/src/web3Provider/web3VmProvider.ts index 8f7b432bd3..c17502e7f5 100644 --- a/libs/remix-lib/src/web3Provider/web3VmProvider.ts +++ b/libs/remix-lib/src/web3Provider/web3VmProvider.ts @@ -115,9 +115,8 @@ export class Web3VmProvider { this.txs[this.processingHash] = tx this.txsReceipt[this.processingHash] = tx this.storageCache[this.processingHash] = {} - if (tx['to']) { - const account = toBuffer(tx['to']) - this.vm.stateManager.dumpStorage(account).then((storage) => { + if (data.to) { + this.vm.stateManager.dumpStorage(data.to).then((storage) => { this.storageCache[this.processingHash][tx['to']] = storage this.lastProcessedStorageTxHash[tx['to']] = this.processingHash }) @@ -205,7 +204,7 @@ export class Web3VmProvider { this.processingAddress = normalizeHexAddress(step.stack[step.stack.length - 2]) this.processingAddress = toChecksumAddress(this.processingAddress) if (!this.storageCache[this.processingHash][this.processingAddress]) { - const account = toBuffer(this.processingAddress) + const account = Address.fromString(this.processingAddress) this.vm.stateManager.dumpStorage(account).then((storage) => { this.storageCache[this.processingHash][this.processingAddress] = storage this.lastProcessedStorageTxHash[this.processingAddress] = this.processingHash