Skip to main content
added 14 characters in body
Source Link

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;

The only unit of value that we have that can be used to store decimal is the wei. 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;

The only unit of value that we have that can be used to store decimal are 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;
added 9 characters in body
Source Link

The only unit of value that we have that is smaller than onecan be used to store decimal is the wei. 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;

The only unit of value that we have that is smaller than one is the wei. 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;

The only unit of value that we have that can be used to store decimal is the wei. 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;
FInished the post
Source Link

The only unit of value that we have that is smaller than one is the wei. 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;

Edit : I misclicked on the post button, let me finish my message before voting.

The only unit of value that we have that is smaller than one is the wei. 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.

Edit : I misclicked on the post button, let me finish my message before voting.

The only unit of value that we have that is smaller than one is the wei. 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;
I misclicked on the edit
Source Link
Loading
Source Link
Loading