Lesson 4 #204
-
Hi I wanted to ask why we add .version() at the end of the AggregatorV3Interface(....address...).version() and can you briefly explain the purpose of AggregatorV3Interface again please. Also when would one use inheritance and when to use interface |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
But on the step you are, Patric shows that we need 2 things to deploy the contract:
In lesson 3, he shows that we can get the ABI of a contract by inheriting that contract. And in lesson 4 he shows that we can also get the ABI with the help of Interface. In both cases when we will compile the contract, the compiler will create the ABIs from the above contracts. Hope it clears your question. If so mark it answered. |
Beta Was this translation helpful? Give feedback.
@MMI7865
Patric call .version() to just show the way we can get the version no of AggregatorV3Interface. After that, he also created the function where he get the version number and guide us.
Inheritance we do so that we can reuse and make additional features to functions of the parent contract. On the other hand, interfaces are for your understanding like rules that force the contract to follow.
But on the step you are, Patric shows that we need 2 things to deploy the contract:
In lesson 3, he shows that we can get the ABI of a contract by inheriting that contract. And in lesson 4 he shows that we can also get the ABI with the …