-
Notifications
You must be signed in to change notification settings - Fork 11.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add getter for decimals to IERC20.sol #2559
Comments
Hi @CrackerHax, Thanks for the suggestion, it is really appreciated. The project owner will review your suggestion as soon as they can. Please wait until we have discussed this idea before writing any code or submitting a Pull Request, so we can go through the design beforehand. We don’t want you to waste your time! Can you describe your use case for an interface including optional ERC20 metadata such as decimals? IERC20 is the interface of the ERC20 standard as defined in the EIP. Decimals is optional in the EIP: https://eips.ethereum.org/EIPS/eip-20 |
Hello @CrackerHax and thank you for raising this issue, Despite their wide availability, An option could be to provide an extension interface @frangio would you be ok with that ? |
These functions are standard (they are part of ERC20) but they're optional, this is why they're not in the |
🧐 Motivation
Could use a getter for decimals()
📝 Details
IERC20 = IERC20(address);
uint decimals = token.decimals();
The text was updated successfully, but these errors were encountered: