docs: fix Event docstring examples to gl.chain.Event - #328
Conversation
|
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe ChangesEvent documentation
Estimated code review effort: 1 (Trivial) | ~2 minutes Possibly related issues
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
👋 This PR targeted
|
|
Adopted and reviewed (genvm session). The two-line diff is correct and complete: a full-repo grep for |
Problem
The
Eventclass docstring inrunners/genlayer-py-std/src/genlayer/chain.pyshows contract examples usinggl.Eventas the base class, butgl.Eventdoes not resolve at runtime —Eventis only exported undergenlayer.chain. A contract copying the example crashes at module load with:Fix
This is Option 1 of #327: correct the docstring examples to the spelling that actually resolves,
gl.chain.Event— matching what the genvm test fixtures already use (e.g.tests/cases/stable/py/events/post_event.py).Changed:
runners/genlayer-py-std/src/genlayer/chain.py(2 lines, bothclass TransferOccurredEvent(gl.Event):→gl.chain.Event).The
doc/website/.../changelog-notes/v0.3.rstoccurrences ofgl.Eventwere intentionally left untouched — they document the v0.2.x → v0.3.0 migration and deliberately show the old spelling as the "before".If the team prefers option 2 (exporting
Eventat top level sogl.Eventbecomes valid), feel free to close this in favor of that.Summary by CodeRabbit
TransferOccurredEventexample to use the proper qualified event class reference.