Hi! How to calculate properly if I wanna buy token with decimals < 18.
So I have token price as 0.1 eth for the token, and I send 0.3 eth to buy.
Right now I do next:
tokenToBuy = msg.value / tokenPrice
3 * 10 18 / 1 * 10 18 = 3
Is it right that I get 3 tokens with decimals less than 18?
May 28, 2022, 7:17 PM