0

This question already has an answer here:

ERC20 token standards have a variable call decimals but all its functions parameters are uint256, how can I send tokens in decimals. Ex: 0.01 MFT (MyFirstToken)

marked as duplicate by Richard Horrocks, Ismael, manuhalo, Roman Frolov, Luiz Soares Jan 10 '18 at 16:56

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Or: Decimals on ERC-20 tokens – Richard Horrocks Jan 6 '18 at 20:48
  • According to the second link that you shared, there are no actual decimal values? Just integers? – Kashish Khullar Jan 6 '18 at 20:54
  • 1
    @KashishKhullar yep, thats why Ether has Wei as the smallest unit. Because if the price of Ether will skyrocket we still have 18 decimal places to play around with a smaller units. There are tokens like IOTA which are very small and to trade real values with them the IOTa system of units was made. You can make such system for your own Token. – Roman Frolov Jan 8 '18 at 15:19
2

There is no such thing as a floating point number in Ethereum. Everything is a 'wei'. An ether is 10^18 wei. The decimals value in the token standard is an indication to wallets and other tools that handle ERC20 tokens instructing them how best to display the token.

Not the answer you're looking for? Browse other questions tagged or ask your own question.