Lesson 4 - Explain like I'm 5 priceFeed.latestRoundData() and price conversion decimals #1208
Replies: 3 comments
-
Solidity supports multiple variables return. If you put You don't have to use the same number of decimals, but it's easier this way and less room for a mistake. |
Beta Was this translation helpful? Give feedback.
-
@eli5mecoding please follow this guide next time when you asks a question. How to Ask Question Guide |
Beta Was this translation helpful? Give feedback.
-
I understand your query, but could you reply with a set of specific questions (just questions - I got the context)? So I can be precise with my answers. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
it's a dumb question but I need to understand how things work in a very simple way to understand the rest of code.
Here](https://youtu.be/gyMwXuJrbJQ?t=15202) I didn’t understand the structure below
We want to call latestRoundData() from priceFeed.
This returns the followings data:
I don't understand why we need to put these info inside () , and not just calling the priceFeed.latestRoundData() function so it can return all the data?
Also, I don’t understand why putting (,,,int 256 price) will return only why we asked?
Isn’t doing this, only assigning the value of latestRoundData() to a variable we just created name int 256 price?
Also, at the price conversion, Why getPrice and minimumUSD need to have the same number of decimals?
thanks in advance
Beta Was this translation helpful? Give feedback.
All reactions