MetaMask / MetaMask/metamask-extension

validate token is actually a token

Open
#10,472 0 comments 0 reactions 0 assignees View on GitHub
area-tokens type-enhancement ux-enhancement
Dominant language
TypeScript
Stars
13.2k
Forks
5.6k
Avg merge
2d 5h
Merged PRs (30d)
451

Description

here is a user who was confused when they tried to add a token that was not the right contract address https://github.com/MetaMask/metamask-extension/issues/10415

theres a couple ways we could attempt to validate
- inspect bytecode for entrypoints (not too hard but doesnt work for proxies and could break with compiler changes or alt langs)
- do a call to a read-only method on the spec. if it fails, dont add it.

Contributor guide

Open the contributing guide

Research direction

Review the user scenario in issue #10415 and compare the two proposed validation approaches: inspecting bytecode entrypoints or calling a read-only method from the token specification. Define which approach should be adopted and what happens when validation fails, including the proxy and alternate-language limitations mentioned here; done means an invalid contract address is not added.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
blockchain
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.