3

Looking through the Ethereum.org token tutorials.Any advice or recommendations on setting your total supply and decimals?

Inline comments says:

18 decimals is the strongly suggested

Any specific reason for this?

uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it

uint256 public totalSupply;

Any thoughts here would be appreciated. Thank you!

1

18 decimals is a popular choice because it's the number of decimals in ether. (1 ether == 10^18 wei.) Because it's so popular, you may encounter code that incorrectly assumes 18 decimal places.

It's entirely up to you what you choose, but I believe that's why most people stick with 18.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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