SIGN IN SIGN UP

fix: make vm.py compatible with Python 3.9 (stock macOS) (#852)

## Problem

`scripts/vm.py` uses Python 3.10+ union type syntax (`int | str`, `X |
None`) which fails on macOS stock Python 3.9.6:

```
TypeError: unsupported operand type(s) for |: 'type' and 'type'
```

## Fix

- Replace `int | str` with `Union[int, str]` and `Cheatcodes | None`
with `Optional[Cheatcodes]`
- Import `Union` and `Optional` from `typing`
- Regenerated `src/Vm.sol` via `vm.py`
- Updated interface ID hashes in `test/Vm.t.sol`

---------

Co-authored-by: Amp <amp@ampcode.com>
Z
zerosnacks committed
8987040ede9553cea20c95ad40d0455930f9c8e0
Parent: d6f8a21
Committed by GitHub <noreply@github.com> on 4/23/2026, 9:18:32 AM