I am building an ERC20 Token. I want to the decimals properly so that people can do transaction in deciamls also. So, I am trying to transfer 10^21 tokens from my address to another.
Minted tokens : 1000000 * (10**decimals) # decimals = 18
So, I should have 10^23 tokens in total.
So I should be able to transfer this amount?
I made a UI and used web3.js where I got this error.
Unhandled Rejection (Error): invalid number value (arg="_price", coderType="uint256", value="1e+21")
Then I also tried in Remix for the same values. there also the transaction failed.
Execution is failing for numbers like if I want to transfer 10*20 token. then also the transaction fails.
What am I doing wrong?
Thanks for the help.