increase token symbol length to 64 #23208
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Increase the token symbol length to 64.
With the increase of token derivatives, token symbol lengths are also increasing.
When adding tokens to the wallet by RPC call, Metamask expects the token symbol to match that on the contract and the symbol to be below 12 characters.
For many tokens (like tenderize's LSTs) this results in a deadlock if the token symbol on the contract has a greater length than 12.
Since Metamask already truncates display of long symbols on the UI, we could allow token symbols up to 64 characters (32 bytes), which equals a single word in the EVM.
This should both be a sufficient length for 99% of token symbols as well as provide a sufficient upper bound.
Related issues
Fixes: #9243
Same implementation as an earlier PR that increases the length to 12: #5816
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist