Skip to content
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

[protocol review] Suggestion of code refactors (nitpick) #223

Closed
2 of 5 tasks
QGarchery opened this issue Oct 18, 2023 · 3 comments
Closed
2 of 5 tasks

[protocol review] Suggestion of code refactors (nitpick) #223

QGarchery opened this issue Oct 18, 2023 · 3 comments
Assignees

Comments

@QGarchery
Copy link
Contributor

QGarchery commented Oct 18, 2023

Here is a list of potential refactors:

  • choose either msgSender() or msg.sender, currently both are used #238
  • 2. use _convertToAssetsWithFeeAccrue in accruedFeeShares. It requires to rename _convertToAssetsWithFeeAccrue to a more general name
  • 3. _supplyBalance could be inlined, it’s a one liner
  • 4. _suppliable could be inlined, it is used only once
  • 5. _staticWithdrawMorpho could be inlined, it is used only once
@QGarchery QGarchery changed the title [protocol review] Suggestion of refactors (nitpick) [protocol review] Suggestion of code refactors (nitpick) Oct 18, 2023
@Rubilmax
Copy link
Contributor

Agreed with 1
I need to check for 2

Regarding 3,4,5: I disagree that because a function can be inlined, it should be defactorized. Factorizing them also provides documentation

@MerlinEgalite
Copy link
Contributor

Aligned with @Rubilmax

@Rubilmax
Copy link
Contributor

If we apply 4 & 5 we should also inline _supplyMorpho and _withdrawMorpho

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants