Lesson 4 : function getVersion() #1461
-
Just got to the part where Patrick explains libraries, and he copypasted this function that gets the verison of AggregatorV3. I don't know why this is relevant. Tested it on Rinkeby and it says "4" so I guess it's the 4th version. Why is this important? function getVersion() public view returns (uint256){
AggregatorV3Interface priceFeed = AggregatorV3Interface(0x8A753747A1Fa494EC906cE90E9f37563A8AF630e);
return priceFeed.version();
} |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
@degendraper Could you please follow these guidelines next time when you ask a question? How to Ask Question Guide Patrick just use it to check that aggregator is working fine at that time by getting its version, later he removed it. In the later lessons, you will not use that. |
Beta Was this translation helpful? Give feedback.
-
It gives you an idea of contract to contract interactions by calling a function on a library contract. |
Beta Was this translation helpful? Give feedback.
@degendraper Could you please follow these guidelines next time when you ask a question? How to Ask Question Guide
Patrick just use it to check that aggregator is working fine at that time by getting its version, later he removed it. In the later lessons, you will not use that.