{"id":23690,"library":"evm-trace","title":"evm-trace","description":"A Python library for Ethereum Virtual Machine transaction tracing, providing tools to decode and analyze EVM execution traces. Current version 0.2.6 (stable). Release cadence is irregular, with several patches per year.","status":"active","version":"0.2.6","language":"python","source_language":"en","source_url":"https://github.com/ApeWorX/evm-trace","tags":["evm","ethereum","tracing","transaction","apeworx"],"install":[{"cmd":"pip install evm-trace","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Used for data models since v0.2.5.","package":"pydantic","optional":false},{"reason":"Core Ethereum utility functions.","package":"eth-utils","optional":false},{"reason":"Keccak256 hashing support.","package":"eth-hash","optional":false}],"imports":[{"note":"","wrong":"","symbol":"TraceFrame","correct":"from evm_trace import TraceFrame"},{"note":"The correct import is from the top-level package.","wrong":"from evm_trace.call_trace import CallTreeNode","symbol":"CallTreeNode","correct":"from evm_trace import CallTreeNode"}],"quickstart":{"code":"from evm_trace import TraceFrame\n# Example: process a raw trace dict\nraw_frame = {\n    'pc': 0,\n    'op': 96,\n    'gas': 100000,\n    'gas_cost': 3,\n    'depth': 0,\n    'stack': [],\n    'memory': [],\n    'storage': {}\n}\ntf = TraceFrame.parse_obj(raw_frame)\nprint(tf.op)  # 96 (PUSH1)","lang":"python","description":"Parses a raw EVM trace frame into a structured object. Replace raw_frame with actual trace data from an RPC provider."},"warnings":[{"fix":"Upgrade Python to 3.9+.","message":"v0.2.0 dropped Python 3.8 support and added Python 3.12 support.","severity":"breaking","affected_versions":"<0.2.0"},{"fix":"Use evm-trace >=0.2.5 for Python 3.13 support.","message":"The msgspec dependency was removed in v0.2.4 due to Python 3.13 incompatibility, then reintroduced in v0.2.5 for 3.13+.","severity":"deprecated","affected_versions":"0.2.4"},{"fix":"Use Python's built-in int (unbounded) – no need for custom handling.","message":"TraceFrame fields may contain large integers; ensure your environment handles them properly.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use: from evm_trace import CallTreeNode","cause":"The CallTreeNode class is re-exported from the top-level package, not from the submodule.","error":"ImportError: cannot import name 'CallTreeNode' from 'evm_trace.call_trace'"},{"fix":"Install msgspec separately: pip install msgspec, or upgrade evm-trace to >=0.2.5.","cause":"evm-trace version 0.2.4 removed msgspec from dependencies, but it's required for some optional functionality.","error":"ModuleNotFoundError: No module named 'msgspec'"},{"fix":"Use .dict() or .json() methods from Pydantic base model.","cause":"Custom objects need serialization utilities.","error":"TypeError: Object of type 'TraceFrame' is not JSON serializable"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}