enzymefinance / protocol

Enzyme Protocol Implementation
https://enzyme.finance
GNU General Public License v3.0
375 stars 156 forks source link

Refactor: interfaces #966

Closed travs closed 4 years ago

travs commented 4 years ago

A few notes on the interfaces:

One downside of not using interface-interface inheritance is that we need to use multiple interfaces to interact with a contract sometimes. For example, if we want to do totalSupply on Shares we would actually do IERC20(myShares).totalSupply, which is not the most intuitive. Thankfully this naturally goes away the more we merge components. We could also change this behaviour somehow else (e.g. implement functions on the inheriting contracts that just relay the call up the inheritance chain) but that's worse than just using another interface imo.