Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

increase token symbol length to 64 #23208

Closed

Conversation

kyriediculous
Copy link

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.

Open in GitHub Codespaces

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

  • I’ve followed MetaMask Coding Standards.
  • I've clearly explained what problem this PR is solving and how it is solved.
  • I've linked related issues
  • I've included manual testing steps
  • I've included screenshots/recordings if applicable
  • I’ve included tests if applicable
  • I’ve documented my code using JSDoc format if applicable
  • I’ve applied the right labels on the PR (see labeling guidelines). Not required for external contributors.
  • I’ve properly set the pull request status:
    • In case it's not yet "ready for review", I've set it to "draft".
    • In case it's "ready for review", I've changed it from "draft" to "non-draft".

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

@kyriediculous kyriediculous requested a review from a team as a code owner February 27, 2024 18:11
Copy link
Contributor

CLA Signature Action:

Thank you for your submission, we really appreciate it. We ask that you read and sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just by adding a comment to this pull request with this exact sentence:

I have read the CLA Document and I hereby sign the CLA

By commenting with the above message you are agreeing to the terms of the CLA. Your account will be recorded as agreeing to our CLA so you don't need to sign it again for future contributions to this repository.

0 out of 1 committers have signed the CLA.
@kyriediculous

@aspiers
Copy link

aspiers commented Mar 25, 2024

@kyriediculous Looks like you need to post a comment signing the CLA, as per above.

@fredwes
Copy link

fredwes commented Apr 13, 2024

Friendly bump @kyriediculous 🙏

@legobeat
Copy link
Contributor

legobeat commented Apr 15, 2024

#17642 is very similar but also improves on the magic-number situation.

Copy link
Contributor

This PR has been automatically marked as stale because it has not had recent activity in the last 60 days. It will be closed in 14 days. Thank you for your contributions.

@github-actions github-actions bot added the stale issues and PRs marked as stale label Jun 14, 2024
Copy link
Contributor

This PR was closed because there has been no follow up activity in the last 14 days. Thank you for your contributions.

@github-actions github-actions bot closed this Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external-contributor INVALID-PR-TEMPLATE PR's body doesn't match template stale issues and PRs marked as stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Increase Token Symbol Length
5 participants