whats the correct way of setting the totalSupply and why?
decimals = 18;
totalSupply = 10000
or
decimals = 18;
totalSupply = 10000 * (10 ** uint256(decimals));
Whats the correct way? What's the difference? What is (10 ** uint256(decimals)) actually doing?
Seems like the last option is the correct one, because if I dont use the second option, my tokens in Metamask connected to Ganache will show always 0 balance.
Also
10000 === 10000 * (10 ** uint256(decimals)) ?
Also another question, how can I call the methods transfer or transferFrom with a decimal value, sending 2.5 tokens for example? How would that be done, since the type is uint and I cant pass decimals.