From 6f791dddaf4e1a9d0b7003e5c363ccf24590e9f9 Mon Sep 17 00:00:00 2001 From: Vladislav Volosnikov Date: Tue, 24 Sep 2024 01:50:23 +0200 Subject: [PATCH] Fix EVM branch in getCodeHash (#34) --- system-contracts/contracts/AccountCodeStorage.sol | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/system-contracts/contracts/AccountCodeStorage.sol b/system-contracts/contracts/AccountCodeStorage.sol index 0c7a93c3e..15ccdd9ce 100644 --- a/system-contracts/contracts/AccountCodeStorage.sol +++ b/system-contracts/contracts/AccountCodeStorage.sol @@ -115,9 +115,8 @@ contract AccountCodeStorage is IAccountCodeStorage { // so set `keccak256("")` as a code hash. The EVM has the same behavior. else if (Utils.isContractConstructing(codeHash)) { codeHash = EMPTY_STRING_KECCAK; - } - - if (Utils.isCodeHashEVM(codeHash)) { + } + else if (Utils.isCodeHashEVM(codeHash)) { codeHash = DEPLOYER_SYSTEM_CONTRACT.evmCodeHash(account); }