-
-
Notifications
You must be signed in to change notification settings - Fork 187
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
Support token detection on Arbitrum and Optimism #2035
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Merged
13 tasks
mcmire
approved these changes
Nov 16, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
dbrans
pushed a commit
that referenced
this pull request
Nov 30, 2023
## Explanation Adds support for token detection on arbitrum and optimism. The goal is to eventually support token detection on MetaMask's top 10 most popular networks. Token lists are available for both chains: - https://token-api.metaswap.codefi.network/tokens/42161 - https://token-api.metaswap.codefi.network/tokens/10 As well as the ERC20 balance checker: - https://github.com/wbobeirne/eth-balance-checker#deployed-addresses Related PR to extension (depends on this PR): MetaMask/metamask-extension#21841 ## References Related issues: - MetaMask/metamask-extension#17697 - MetaMask/metamask-extension#16496 ## Changelog <!-- If you're making any consumer-facing changes, list those changes here as if you were updating a changelog, using the template below as a guide. (CATEGORY is one of BREAKING, ADDED, CHANGED, DEPRECATED, REMOVED, or FIXED. For security-related issues, follow the Security Advisory process.) Please take care to name the exact pieces of the API you've added or changed (e.g. types, interfaces, functions, or methods). If there are any breaking changes, make sure to offer a solution for consumers to follow once they upgrade to the changes. Finally, if you're only making changes to development scripts or tests, you may replace the template below with "None". --> ### `@metamask/assets-controllers` - **ADDED**: Token detection support for Arbitrum and Optimism ## Checklist - [ ] I've updated the test suite for new or updated code as appropriate - [ ] I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate - [x] I've highlighted breaking changes using the "BREAKING" category above as appropriate
bergeron
added a commit
to MetaMask/metamask-extension
that referenced
this pull request
Jan 3, 2024
## **Description** Supports token detection on Arbitrum, Optimism, Base, and zkSync Accompanying PRs to core: - MetaMask/core#2035 - MetaMask/core#3584 ## **Related issues** - #17697 - #16496 ## **Manual testing steps** 1. Load an account on arbitrum, optimism, base, or zkSync that contains ERC20 tokens 2. Enable token autodetection in settings 3. It should detect tokens to be added ("N" new tokens found in this account") 4. Click "Import tokens" to manually import 5. There should be a search box that suggests tokens as you type their symbols ## **Screenshots/Recordings** ### **Before** https://github.com/MetaMask/metamask-extension/assets/3500406/0e81e4a7-331f-4712-9481-317411b158c3 ### **After** https://github.com/MetaMask/metamask-extension/assets/3500406/7721eab9-de55-49a6-a71e-f5124ef6dbc5 ## **Pre-merge author checklist** - [x] I’ve followed [MetaMask Coding Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md). - [x] I've clearly explained what problem this PR is solving and how it is solved. - [x] I've linked related issues - [x] I've included manual testing steps - [x] I've included screenshots/recordings if applicable - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. - [x] I’ve properly set the pull request status: - [ ] In case it's not yet "ready for review", I've set it to "draft". - [x] 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.
Merged
13 tasks
bergeron
added a commit
to MetaMask/metamask-mobile
that referenced
this pull request
Feb 2, 2024
…8392) ## **Description** Enables token detection on arbitrum, optimism, base, and zksync. Patching these from core: - MetaMask/core#2035 - MetaMask/core#3584 ## **Related issues** ## **Manual testing steps** 1. Restore an account with tokens on arbitrum, optimism, base, and zksync. 2. enable token detection in settings 3. Switch to each of those chains 4. It should suggest <n> new token(s) found in this account 5. When manually importing a token, there should be a "search" tab ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** https://github.com/MetaMask/metamask-mobile/assets/3500406/a75f0412-31df-48ff-9832-262ecac84361 ### **After** https://github.com/MetaMask/metamask-mobile/assets/3500406/c6dc7170-1544-4d48-9709-c1952ba9d830 ## **Pre-merge author checklist** - [ ] I’ve followed [MetaMask Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [ ] 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](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). 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. Co-authored-by: Cal Leung <cleun007@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Explanation
Adds support for token detection on arbitrum and optimism. The goal is to eventually support token detection on MetaMask's top 10 most popular networks.
Token lists are available for both chains:
As well as the ERC20 balance checker:
Related PR to extension (depends on this PR):
MetaMask/metamask-extension#21841
References
Related issues:
Changelog
@metamask/assets-controllers
Checklist