diff --git a/src/ethereum_test_tools/vm/opcode.py b/src/ethereum_test_tools/vm/opcode.py index 4edd4d7c21..5aa233d7f1 100644 --- a/src/ethereum_test_tools/vm/opcode.py +++ b/src/ethereum_test_tools/vm/opcode.py @@ -66,11 +66,13 @@ def __str__(self) -> str: def __eq__(self, other): """ Required to differentiate between SELFDESTRUCT and SENDALL type of cases - And to register the Macro opcodes which are defined from same bytes + And to compare with the Macro opcodes """ if isinstance(other, OpcodeMacroBase): return self._name_ == other._name_ - return False + if isinstance(other, bytes): + return bytes(self) == other + return NotImplementedError(f"Unsupported type for comparison f{type(other)}") class Opcode(OpcodeMacroBase):