OpenZeppelin / openzeppelin-contracts

OpenZeppelin Contracts is a library for secure smart contract development.
https://openzeppelin.com/contracts
MIT License
24.82k stars 11.78k forks source link

Support ERC-1046 by default #4149

Open Pandapip1 opened 1 year ago

Pandapip1 commented 1 year ago

🧐 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

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

yashthipsay commented 1 year ago

This functionality can be added with two methods that are abstract by default. Although, the second parameter that is specifically for EIP/ERC-1046 can be preferred to wrap ERC-20, 720 and 1155 tokens