Skip to content
Discussion options

You must be logged in to vote

Context on Interfaces (understand these rules):

As the functions implemented must be declared external, they are primarily used in other contracts because implementing functions manually in every other contract is redundant when you can just use a common interface.

E.g. Let's assume we have Contract A, B, C and Interface Z. A, B and C have a common function (literally the same) and therefore, will be redundant. It is much easier, cleaner (concise) and modular to implement that common function in Z, and then letting A, B and C inherit Z to use that common function.

Another simple analogy is

we do not have to know what is going on, and can just implement the functionality ("turns the ligh…

Replies: 2 comments 11 replies

Comment options

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

Comment options

You must be logged in to vote
10 replies
@TimeKeyRoll
Comment options

@krakxn
Comment options

@TimeKeyRoll
Comment options

@krakxn
Comment options

@TimeKeyRoll
Comment options

Answer selected by TimeKeyRoll
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