Skip to content

Lesson 13 getContractAt() without ABI? #2126

Answered by othaime-en
asserules asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @asserules the ethers.getContractAt() method takes three parameters: The ABI, the contract address, and the signer. In this case, IWeth provides the ABI. Yes the interface and the real contract have the same ABI. In simple terms, the ABI is a collection of parts or fragments that specify how we interact with different functions and components of a contract. And that's what interfaces are for right? Interfaces give us the skeleton structure of the real contracts in terms of of its functions. So if you compile the interface and the contract you will get the same ABI.

Replies: 2 comments 1 reply

Comment options

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

Answer selected by asserules
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
3 participants