Skip to content

Commit

Permalink
fix(internal): make ARC4Struct.name produce a name based only on alph…
Browse files Browse the repository at this point in the history
…anumeric characters only e.g. `A-Za-z0-9_`
  • Loading branch information
daniel-makerx authored and tristanmenzel committed Nov 27, 2024
1 parent c6dae28 commit 5d83828
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/puya/models.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import abc
import enum
import re
import typing
from collections.abc import Mapping, Sequence

Expand Down Expand Up @@ -62,7 +63,7 @@ class ARC4Struct:

@property
def name(self) -> str:
return self.fullname.rsplit(".", maxsplit=1)[-1]
return re.split(r"\W", self.fullname)[-1]


@attrs.frozen(kw_only=True)
Expand Down

0 comments on commit 5d83828

Please sign in to comment.