Any contract that inherits an interface is expected to implement the interface's functionality, however implementations may differ. For example we have 2 tokens that both implement the interface IERC20, but the two tokens implement the transfer function differently. And then you have a DEX contract that doesn't care how the tokens implement transfer, only that it is able to call the function. Interfaces are very handy for linting and code hinting.

Jun 3, 2022, 4:39 AM
Thank you for the detailed explanation
Jun 3, 2022, 6:19 AM

© 2024 Draquery.com All rights reserved.