-
I'm in Lesson 4, "Remix Fund Me". In part 5 of that lesson, "Interfaces and Price Feeds" (around 4:05:50 in the video), to get the ABI of the Chainlink data feed, Patrick pastes the interface definition from the Chainlink code into his smart contract that he's building. I think he said there are easier ways to get the ABI, but I didn't see any further mention of it in this section. Are there easier ways to get the ABI from other contracts, such as the Chainlink contracts? It seems strange that you'd need to copy/paste other people's code into your own code just to be able to access their endpoints. UPDATE: so in the very next section, "Importing from GitHub and NPM", Patrick shows how you can use |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hello @cymatic9 However this answer would be incomplete if I do not mention the other ways to get the ABI from a contract.
As you can see the alternatives would take more time and effort than just use a interface to get the ABI. Cheers, Vasiliy. |
Beta Was this translation helpful? Give feedback.
Hello @cymatic9
What a good question and the answer is no, but with biases.
The actual easier way to access to a contract ABI is importing the interfaces, which have all the function you will need, but without the implementation so their file size is really small. This is what most of developers are used to do as is just a straight forward approach.
However this answer would be incomplete if I do not mention the other ways to get the ABI from a contract.