-
Notifications
You must be signed in to change notification settings - Fork 11.8k
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
Add customizable fee receiver to ERC20FlashMint #3327
Add customizable fee receiver to ERC20FlashMint #3327
Conversation
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.
This is looking pretty good, thank you. Some minor comments.
…sion-improvement-#3316
} | ||
|
||
function flashFee(address token, uint256 amount) public view virtual override returns (uint256) { | ||
super.flashFee(token, amount); |
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.
This super call is not needed and can be confusing, even if it is just a mock.
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.
The purpose of this super call is to cover the validation defined in the super implementation. I have opened another ticket to fix the flashFee function #3331. Upon that change this super call won't be required anymore.
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.
Great work overall. There are a few things regarding testing that can be improved.
We also need a Changelog entry before we merge that PR.
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.
Thank you @mazenkhalil. This looks good.
Fixes #3316
Allow implementers to set the address for which the flash loan fee amount is transferred to. Instead of burning the loan fee.
PR Checklist