Skip to content

Increase max allowed characters in TokenSymbol #2406

@PhilippGackstatter

Description

@PhilippGackstatter

Right now, TokenSymbol allows a maximum of 6 ASCII characters, which is 48 bits. Below I’ve listed the maximum allowed token symbol length on different blockchains. This might be “a separate discussion,” but if we increase TokenSymbol to a maximum of 8 characters (8 ASCII characters), it would still fit within a single field element, while being noticeably less restrictive. For that reason, I suggest increasing the symbol length to 8 characters.

[...]

I think using just uppercase characters is fine! Increasing the character length to fit into a one field elements would be ideal in my opinion.

Since the encoding will be the upper characters, I think we would fit 12 upper-case letters with the following maximum encoding value if I didn't miscalculate

pub const MAX_ENCODED_VALUE: u64 = 2481152873203736562;

Originally posted by @onurinanc in #2344

Metadata

Metadata

Assignees

No one assigned

    Labels

    rustIssues that affect or pull requests that update Rust codestandardsRelated to standard note scripts or account components

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions