decimals should be nat8
timohanke opened this issue · comments
Timo Hanke commented
Line 18 in fd4cffe
balanceOf
returns a nat64. The number 2^64 has only 20 decimal places, so any value for decimals beyond 20 means that nobody can ever hold an entire token. Therefore a nat8 should be more than enough for decimals
.
It also provides less risk to break frontends, even though one can argue that a frontend should just drop tokens that have an unreasonable decimals
value (even if the type is nat8
).