Skip to content

Lesson4:Fund Me(doubt) #1753

Discussion options

You must be logged in to vote

Let's take some values as an example.

If you call the function getConversionRate passing 0.01 for ethAmount, ethPrice will be 3810e18 (current price) and ethAmountInUsd will be (ethPrice * ethAmount) / 1000000000000000000 = 3810e18 * 0.01e18 / 1e18 = 38.1e18 and the minimum USD amount is 5e18.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@yasharyan0904
Comment options

Answer selected by yasharyan0904
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants