Lesson 4: Remix Fund Me: Why can't we divide (ethPrice * ethAmount) by 1e36 instead of 1e18? #63
-
In the Remix Fund Me lesson, we're setting a minimum USD value ($50) required for the transaction to come through. When calculating the ETH amount in USD, we leave 18 decimals in the returned answer. However, then it is also necessary to adjust the Wouldn't it be easier/more readable to divide (ethPrice * ethAmount) by 1e36 instead of 1e18 so we wouldn't need to adjust the I may be missing something important and would appreciate your input. Cheers! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You could do that too :) i just like having everything with 18 decimals so I always know what I'm working with! |
Beta Was this translation helpful? Give feedback.
You could do that too :)
i just like having everything with 18 decimals so I always know what I'm working with!