diff --git a/evm_trace/vmtrace.py b/evm_trace/vmtrace.py index 733f743..080c69d 100644 --- a/evm_trace/vmtrace.py +++ b/evm_trace/vmtrace.py @@ -6,12 +6,8 @@ from eth.vm.stack import Stack # type: ignore from eth_utils import to_checksum_address from hexbytes import HexBytes - -try: - from msgspec import Struct # type: ignore - from msgspec.json import Decoder # type: ignore -except ImportError as e: - raise ImportError("msgspec not found. install it with `pip install msgspec`") from e +from msgspec import Struct # type: ignore +from msgspec.json import Decoder # type: ignore # opcodes grouped by the number of items they pop from the stack # fmt: off diff --git a/setup.py b/setup.py index 1846ea8..2d4e459 100644 --- a/setup.py +++ b/setup.py @@ -59,6 +59,7 @@ "hexbytes>=0.3.0,<1.0.0", "eth-utils>=2.0.0", "ethpm-types>=0.3.7,<0.4.0", + "msgspec>=0.8.0", ], python_requires=">=3.8,<4", extras_require=extras_require,