Skip to content

feat: increase TokenSymbol max length from 6 to 12 uppercase characters#2420

Open
Farukest wants to merge 3 commits into0xMiden:nextfrom
Farukest:feat/issue-2406-increase-token-symbol-max-length
Open

feat: increase TokenSymbol max length from 6 to 12 uppercase characters#2420
Farukest wants to merge 3 commits into0xMiden:nextfrom
Farukest:feat/issue-2406-increase-token-symbol-max-length

Conversation

@Farukest
Copy link
Contributor

@Farukest Farukest commented Feb 9, 2026

Summary

  • Increases TokenSymbol max allowed length from 6 to 12 uppercase Latin characters
  • Updates MAX_ENCODED_VALUE to 2481152873203736562 (encodes "ZZZZZZZZZZZZ")
  • Updates error messages and documentation to reflect the new limit
  • Adds test cases for 8 and 12 character symbols

With uppercase-only encoding (base-26), 12 characters fit within a single field element (61 bits including 4-bit length encoding), making this a non-breaking expansion.

Closes #2406

Test plan

  • Existing encoding/decoding roundtrip tests updated with 8 and 12 char symbols
  • Max value test updated for 12-char "ZZZZZZZZZZZZ"
  • Boundary tests updated (13 chars → InvalidLength)
  • from_static_str const tests added for 8 and 12 char symbols

…ters

The previous limit of 6 characters (48 bits) was unnecessarily restrictive
compared to other blockchains (Solana: 10, Algorand: 8, Ethereum: unlimited).
Since uppercase-only encoding (base-26) fits up to 12 characters within a
single field element, the limit is increased to 12.

Closes 0xMiden#2406
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.

Increase max allowed characters in TokenSymbol

1 participant