Skip to content

Commit

Permalink
fix: find selector script (#1492)
Browse files Browse the repository at this point in the history
fixes the search directory of this script

<!-- Reviewable:start -->
- - -
This change is [<img src="https://reviewable.io/review_button.svg"
height="34" align="absmiddle"
alt="Reviewable"/>](https://reviewable.io/reviews/kkrt-labs/kakarot/1492)
<!-- Reviewable:end -->

Co-authored-by: Clément Walter <[email protected]>
  • Loading branch information
enitrat and ClementWalter authored Oct 10, 2024
1 parent 2a1c41a commit 9bbee4e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kakarot_scripts/utils/find_selector.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def find_cairo_functions(directory):
for file in files
if file.endswith(".cairo")
for match in re.findall(
r"func\s+(\w+)\(", open(os.path.join(root, file)).read()
r"func\s+(\w+)(?:\{|\()", open(os.path.join(root, file)).read()
)
]

Expand All @@ -26,7 +26,7 @@ def get_function_from_selector(selectors):


if __name__ == "__main__":
directory = "."
directory = "cairo_zero"
functions = find_cairo_functions(directory)
selectors = map_selectors(functions)
get_function_from_selector(selectors)

0 comments on commit 9bbee4e

Please sign in to comment.