Minimum USD Conversion to ETH in Wei Doubt #6654
Replies: 2 comments
-
Apologies for the unformatted answer, I will do my best to refine it later when i thoroughly revise this section myself, for now I can just forward my notes as is. |
Beta Was this translation helpful? Give feedback.
-
uint256 ethCurrentPrice = getPrice(); this line fires the get price function and stores the price in ethCurrentPrice uint256 ethAmountInUSD = (ethCurrentPrice * ethAmount) / 1e18; this line says the price gotten and stored in ethCurrentPrice multiplied by ethAmount(which is an input parameter for you to choose) will give an answer in usd for the amount of eth you choose to send for example price of ethCurrentPrice is $3,000 and you choose to send ethAmount (2) then ethAmountInUSD becomes $6,000 what if you choose to send in ethAmount (0.02) then ethAmountInUSD becomes $60. |
Beta Was this translation helpful? Give feedback.
-
Can someone help me solve how this getConcersionRate() works that require>= MINIMUM_USD . So please help that how the calculation works in Progress. Thank You.
Beta Was this translation helpful? Give feedback.
All reactions