-
The code is
the errors im getting while trying to run the functions are
Pls HElp me out here |
Beta Was this translation helpful? Give feedback.
Answered by
FFFarhan
Sep 13, 2024
Replies: 2 comments 4 replies
-
What chain did you run the transaction on? |
Beta Was this translation helpful? Give feedback.
4 replies
-
Your code has an issue in the division, resulting a ethAmountInUsd outside the limit of a uint256 type.. I believe this error is causing the transaction revert: uint256 ethAmountInUsd = (ethPrice * ethAmount) / 1e8; //out of uint256 range uint256 ethAmountInUsd = (ethPrice * ethAmount) / 1e18; I hope I was able to help. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
i was running it on a vm....
i tried it on a testnet and it worked, guess i missed out that part while seeing the course.