Skip to content

refactor TokenSymbol to Symbol and add new TokenSymbol and RoleSymbol types#2690

Open
onurinanc wants to merge 6 commits intonextfrom
role-symbol
Open

refactor TokenSymbol to Symbol and add new TokenSymbol and RoleSymbol types#2690
onurinanc wants to merge 6 commits intonextfrom
role-symbol

Conversation

@onurinanc
Copy link
Copy Markdown
Collaborator

This PR introduces a new Symbol type, and adds TokenSymbol and RoleSymbol types.
Related Issue: #2683

@onurinanc onurinanc changed the title refactor TokenSymbol to Symbol and add new TokenSymbol and RoleSymbol types. refactor TokenSymbol to Symbol and add new TokenSymbol and RoleSymbol types Mar 26, 2026
@bobbinth bobbinth requested review from PhilippGackstatter and bobbinth and removed request for bobbinth March 26, 2026 17:34
/// [`as_element()`](Self::as_element), and decoded back via
/// [`try_from_encoded_felt()`](Self::try_from_encoded_felt).
#[derive(Clone, Debug, PartialEq, Eq)]
pub struct Symbol(String);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think Symbol may be way too generic of a name. Maybe ShortCapitalString or CapitalString or something similar would be better?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bobbinth but the issue with this naming ShortCapitalString is that we also have underscore: "_" in the Symbol type. I think we should either keep it as Symbol  or find another name since ShortCapitalString doesn't mention the underscore.

Another option is to apply Option 1 here: #2683 (comment)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed that it's not ideal, but I think something like ShortCapitalString even with underscores is better than Symbol :)

Another option is to apply Option 1 here: #2683 (comment)

I'd still go with the current option (option 2) - just change the name of the Symbol to something less general.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants