Skip to content

Commit

Permalink
fix using codeHash
Browse files Browse the repository at this point in the history
  • Loading branch information
yann300 committed Dec 7, 2023
1 parent 8b818ca commit bf6eb27
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libs/remix-simulator/src/vm-context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bf6eb27

Please sign in to comment.