1

In my projects, getting the decimals() is an important task, so I have to sometimes manually add the function in IERC20's interface. But why isn't this function officially in the contract? What am I missing?

1
  • Coz decimals are not a part of the official interface of ERC20. It is an additional feature for better calculations. No doubt it must be there in an ERC20 contract, but the official interface doesn't define it. Commented Mar 12, 2023 at 14:06

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.