Chapter 7: Can we use AggregatorV3Interface like below in our contract (Different from Patrick code)? #525
sanjayojha
started this conversation in
Show and tell
Replies: 1 comment 1 reply
-
@sanjayojha Yes, both ways will work, the purpose is to get the aggregator v3 interface. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
So instead of going like how Patrick told to use
AggregatorV3Interface priceFeed
by passing it thru constructor ofFundMe.sol
can we do same with following code?File
FundMe.sol
file
PriceConverter.sol
So I basically remove the
AggregatorV3Interface
fromFundMe.sol
and passed the contract address from chainlink as variable in its constructor. Thus removing the dependency of of@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol
fromFundMe.sol
file.Or will it make error?
Beta Was this translation helpful? Give feedback.
All reactions