I am confused with the use of large numbers in solidity, ethereum. I have some doubts please help me with them.
1) I am not able to represent the value of p using p.toNumber() but can represent it when I use p.toString(). where p is
uint256 p = msg.value
2) myToken.transfer(acc[3], 100000000000000000000, {from:acc[0]})
I am not not able to transfer a large number of tokens like in the above it says { Error: invalid number value (arg="_value", coderType="uint256", value=100000000000000000000)
3)not able to set the initial supply with
module.exports = function(deployer) { deployer.deploy(DappToken, 1000000000000000000000)
but when I use "" it works, I am not able to understand the reason behind any of these but I think it's the same, please help
I assure you that the rest of the code is fine and works well for small numbers.
thanks.