MetaMask / MetaMask/metamask-extension
[Bug]: Send ERC-6909 - I am able to initiate Send ERC-6909 (currently not supported) by starting a regular Send and then selecting the ERC-6909 token leading to a `safeTransferFrom` call (not in the standard)
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 13.2k
- Forks
- 5.6k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 451
Description
Describe the bug
I am able to import ERC-6909 tokens in the wallet, and when I try to initiate a Send, the Send button is disabled with the message Sending of ERC-1155 NFT assets is not yet supported -- this should be updated.
However, I am able to start a regular Send ETH, and then select the ERC-6909 asset, and proceed to the last confirmation screen. There I see that a safeTransferFrom contract call is created instead of a transferFrom.
The ERC-6909 Minimal Multi-Token Interface standard doesn't support the safeTransferFrom method.
See more in the spec here.
Expected behavior
Either we don't allow to perform Sends of ERC-6909 tokens, so then we should:
- Block the UI when we change the token once a Send has been initiated
- Update the Info ticker with the appropiate token standard
Or if we do, then we should call the appropriate transferFrom function when performing a Send.
Screenshots/Recordings
https://github.com/user-attachments/assets/e935a6a8-f101-43a4-a19e-2802c19d4a83
Steps to reproduce
- Go to remix
- Create a new file token.sol
- Paste an ERC6909 contract code (you can use this one)
- Connect MM
- Deploy the token contract
- Mint some tokens
- Import them into the wallet
- Start a send ERC6909
- See button is disabled, and info picker
- Cancel the flow
- Start a Send ETH
- Change the asset to ERC6909
- Go to last confirmation screen
- See a confirmations is created with
safeTransferFrommethod.
Error messages or log output
Detection stage
In production (default)
Version
12.9.3
Build type
None
Browser
Chrome
Operating system
Linux
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the send flow described in steps 7–14, then read the ERC-6909 specification linked in the issue. Trace asset selection from a regular Send through the final confirmation screen; done means ERC-6909 sends are either blocked with the correct standard-specific messaging or use the standard's transferFrom call.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- blockchain, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100