fix using codeHash

pull/4311/head
yann300 12 months ago
parent 8b818cad2c
commit bf6eb27b72
  1. 3
      libs/remix-simulator/src/vm-context.ts

@ -230,10 +230,11 @@ class CustomEthersStateManager extends StateManagerCommonStorageDump {
[],
this.blockTag,
])
const codeHash = accountData.codeHash === '0x0000000000000000000000000000000000000000000000000000000000000000' ? '0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470' : accountData.codeHash
const account = Account.fromAccountData({
balance: BigInt(accountData.balance),
nonce: BigInt(accountData.nonce),
codeHash: toBuffer(accountData.codeHash)
codeHash: toBuffer(codeHash)
// storageRoot: toBuffer([]), // we have to remove this in order to force the creation of the Trie in the local state.
})
return account

Loading…
Cancel
Save