Skip to content

about interface #2132

Answered by krakxn
akugone asked this question in Q&A
Aug 28, 2022 · 4 comments · 1 reply
Discussion options

You must be logged in to vote

"I understand that we pass the address as a parameter in the AggregatorV3Interface" Incorrect, that is type-casting. We are explicitly converting the address 0x8A753747A1Fa494EC906cE90E9f37563A8AF630e to type AggregatorV3Interface, not passing as a parameter.

A simple example would be:

string strNum = "1";
uint256 intNum = uint256(strNum);

"but how it can process and send a result if there'is nothing in the functions to use the parameter" That is a characteristic of interface (refer abstract contracts—primarily an OOP-concept).

A simple example to interact with other contracts via interface (from Solidity):

contract Counter {
    uint public count;

    function increment() external {
   …

Replies: 4 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@akugone
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by akugone
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants