OpenZeppelin / OpenZeppelin/openzeppelin-contracts

Support ERC-1046 by default

Open
#4,149 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Solidity
Stars
27.2k
Forks
12.4k
Avg merge
2d 19h
Merged PRs (30d)
33

Description

🧐 Motivation

ERC-1046 allows for ERC-20, ERC-721, and ERC-1155 to use a single method, tokenURI for token URIs, and adds tokenURI support to ERC-20. It's required to add ERC-721 and ERC-1155 tokens via wallet_watchAsset, or to add images to ERC-20 tokens using that same RPC method.

📝 Details

  • tokenURI should be added to the base ERC-1155 contract and the base ERC-20 contract
  • The name, symbol, and decimals fields should be deprecated in ERC-20, ERC-721, and ERC-1155 (if applicable to those contracts)
  • The constructors should take only a single argument, a string URL.

Obviously this would be a very breaking change, and would belong in a major update.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the base ERC-20, ERC-721, and ERC-1155 contracts and compare their current interfaces with ERC-1046. Clarify the breaking constructor and metadata API changes, including tokenURI and deprecated fields. Done means the supported contracts consistently implement the agreed ERC-1046 behavior and the major-update scope is covered.

Written by the indexing model from the issue text.

Assessment

Tech stack
solidity
Domain
blockchain
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.