Skip to content

Commit

Permalink
Update EIPS/eip-7637.md
Browse files Browse the repository at this point in the history
Fix code logic

Co-authored-by: g11tech <[email protected]>
  • Loading branch information
ZWJKFLC and g11tech authored Jun 19, 2024
1 parent 8c3e379 commit 07aa3ac
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions EIPS/eip-7637.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,12 @@ def extcodehash(evm: Evm) -> None:
address = to_address(pop(evm.stack))
charge_gas(evm, GAS_CODE_HASH)
account = get_account(evm.env.state, address)
codehash = U256.from_be_bytes(keccak256(account.code))
if codehash == U256(hexstr="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470"):
if account == EMPTY_ACCOUNT:
codehash = U256(0)
else:
codehash = U256.from_be_bytes(keccak256(account.code))
if codehash == U256(hexstr="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470"):
codehash = U256(0)
push(evm.stack, codehash)
evm.pc += 1
```
Expand Down

0 comments on commit 07aa3ac

Please sign in to comment.