From 8a16952af2285469ed20500dfee5cfc0bd083983 Mon Sep 17 00:00:00 2001 From: Sam Wilson Date: Fri, 8 Mar 2024 11:08:57 -0500 Subject: [PATCH] Apply #883 to cancun --- src/ethereum/cancun/vm/instructions/memory.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ethereum/cancun/vm/instructions/memory.py b/src/ethereum/cancun/vm/instructions/memory.py index 2aef5d14046..e97046149b1 100644 --- a/src/ethereum/cancun/vm/instructions/memory.py +++ b/src/ethereum/cancun/vm/instructions/memory.py @@ -11,7 +11,7 @@ Implementations of the EVM Memory instructions. """ -from ethereum.base_types import U8_MAX_VALUE, U256, Bytes, Uint +from ethereum.base_types import U256, Bytes, Uint from ethereum.utils.numeric import ceil32 from .. import Evm @@ -82,7 +82,7 @@ def mstore8(evm: Evm) -> None: # OPERATION evm.memory += b"\x00" * extend_memory.expand_by - normalized_bytes_value = Bytes([value & U8_MAX_VALUE]) + normalized_bytes_value = Bytes([value & 0xFF]) memory_write(evm.memory, start_position, normalized_bytes_value) # PROGRAM COUNTER