The only unit of value that we have that can be used to store decimal isare the wei and the gwei. But what's the wei ? It's the unit used for gas.
How can we get a random number and convert it to wei ?
answer :
there are 1 billion wei in one gwei.
there are 10^9 or 1,000,000,000 gwei in one ether.
therefore 1eth is 10^18 wei.
number_to_store = etherAmount * 10**18;