OpenZeppelin / OpenZeppelin/openzeppelin-contracts
Feature request: modern implementation of "SafeERC20Namer" library
Nobody has claimed this yet.
- Dominant language
- Solidity
- Stars
- 27.2k
- Forks
- 12.4k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 33
Description
It would be nice to have a modern implementation of Uniswap's SafeERC20Number library:
Ideally, the implementation would provide an additional tokenDecimals helper for safely retrieving the ERC-20 decimals (just like Yield's version does).
I imagine that this functionality could be incorporated in your existing SafeERC20 library?
The use case for this is anything that needs a reliable way of retrieving ERC-20 token metadata on-chain, e.g. NFT SVGs:
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 with the existing SafeERC20 library and compare the linked Uniswap SafeERC20Namer.sol and Yield implementation. Determine how the requested token name, symbol, and tokenDecimals helpers should fit the library's current API and compatibility expectations. Done means the proposed metadata behavior is specified and covered by the repository's relevant tests.
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