starknet role discovery script#162
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #162 +/- ##
=======================================
Coverage ? 94.69%
=======================================
Files ? 57
Lines ? 3993
Branches ? 0
=======================================
Hits ? 3781
Misses ? 212
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
|
Consider locating these constants in a different file |
|
considier remove |
RoeeGross
left a comment
There was a problem hiding this comment.
@RoeeGross reviewed 3 files and all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on remollemo).
RoeeGross
left a comment
There was a problem hiding this comment.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on remollemo).
ddec176 to
c1dbd4c
Compare
remollemo
left a comment
There was a problem hiding this comment.
@remollemo resolved 2 discussions.
Reviewable status: 2 of 3 files reviewed, all discussions resolved (waiting on RoeeGross).

Note
Low Risk
Additive Python utility plus tests; main risk is incorrect role/event parsing or fallback behavior against diverse RPC providers, but it does not modify existing production paths.
Overview
Adds a standalone/importable
python/utils/role_discovery.pyutility to discover current (or historical) CommonRoles role holders on Starknet by scanningRoleGrantedevents and optionally verifying membership viahas_role.Includes robustness fallbacks: supports multiple event layouts, falls back to raw
getEventsRPC whenstarknet_pyevent validation fails, and switches to legacyis_<role>entrypoints whenhas_roleis missing. Adds pytest coverage for these fallback paths and a smallpython/utils/requirements.txtfor running the script/tests.Written by Cursor Bugbot for commit ddec176. This will update automatically on new commits. Configure here.
This change is