-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor interfaces #240
Refactor interfaces #240
Conversation
src/interfaces/IMetaMorpho.sol
Outdated
function pendingFee() external view returns (uint192 value, uint64 submittedAt); | ||
} | ||
|
||
interface IMetaMorphoFull is IMetaMorphoSpecific, IERC4626, IERC20Permit, IOwnable, IMultiCall { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But then IMetaMorpho
does not inherit IERC4626
and thus the documentation won't appear in etherscan because the following comments won't work: /// @inheritdoc IERC4626
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it works because MetaMorpho inherits from ERC4626 which itself inherits from IERC4626 (btw this is one other advantage of this refactor: function signatures are imported only once, which is clearer). In this test PR, you can see that if you remove is ICounterGetNumber
you get an error in the inheritdoc comment, which means that the inheritdoc comments are aware of inherited interfaces of inherited contracts
I'm not sure convince yet this is a better way to split the interfaces per the comment raised above |
It could be refactored a bit (comments, naming, ...) but I think that having a single interface for every usage is very nice, I don't see any real downside for now. Maybe we should even use the main name |
That is a great idea! we should do the same for Blue IMO |
Changed all the names, please review and tell me what you think:
Should we put those in separate files ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's better now. I like @Rubilmax naming suggestion with base.
Perhaps we should add comments in interfaces to guide integrators? It may be hard to know which one to use at first glance
@QGarchery will you apply the change? |
The CI is broken can you update this PR please @QGarchery ? |
I merged the target branch but with no luck. Not sure what the problem is, why can't it find morpho-blue-irm ? |
Please do not merge pending PRs on |
Reverting the PR here #271 |
Re-open the PR in #272 |
Refactor interfaces with the following goals in mind:
IMetaMorphoFull
) that enables you to do all the calls to MMIMetaMorpho
) that the MetaMorpho contract inherits so that we benefit from the compiler checks on it