-
Notifications
You must be signed in to change notification settings - Fork 32
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
Adds protocol fees to RFQ #1670
Conversation
Important Auto Review SkippedAuto reviews are disabled on base/target branches other than the default branch. Please add the base/target branch pattern to the list of additional branches to be reviewed in the settings. Please check the settings in the CodeRabbit UI or the To trigger a single review, invoke the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on X ? TipsChat with CodeRabbit Bot (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## fix/new-rfq #1670 +/- ##
=====================================================
+ Coverage 50.52034% 51.27884% +0.75850%
=====================================================
Files 403 364 -39
Lines 27482 24788 -2694
Branches 284 284
=====================================================
- Hits 13884 12711 -1173
+ Misses 12228 10842 -1386
+ Partials 1370 1235 -135
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@@ -85,6 +85,11 @@ | |||
// @dev use returned originAmount in request in case of transfer fees | |||
uint256 originAmount = _pullToken(address(this), params.originToken, params.originAmount); | |||
|
|||
// track amount of origin token owed to protocol | |||
uint256 originFeeAmount; |
Check warning
Code scanning / Slither
Uninitialized local variables Medium
function sweepProtocolFees(address token, address recipient) external onlyGovernor { | ||
uint256 feeAmount = protocolFees[token]; | ||
if (feeAmount == 0) return; // skip if no accumulated fees | ||
|
||
protocolFees[token] = 0; | ||
token.universalTransfer(recipient, feeAmount); | ||
emit FeesSwept(token, recipient, feeAmount); | ||
} |
Check notice
Code scanning / Slither
Reentrancy vulnerabilities Low
External calls:
- token.universalTransfer(recipient,feeAmount)
Event emitted after the call(s):
- FeesSwept(token,recipient,feeAmount)
@@ -47,4 +64,32 @@ | |||
_revokeRole(GUARD_ROLE, _guard); | |||
emit GuardRemoved(_guard); | |||
} | |||
|
|||
function addGovernor(address _governor) external { |
Check warning
Code scanning / Slither
Conformance to Solidity naming conventions Warning
emit GovernorAdded(_governor); | ||
} | ||
|
||
function removeGovernor(address _governor) external { |
Check warning
Code scanning / Slither
Conformance to Solidity naming conventions Warning
Description
A clear and concise description of the features you're adding in this pull request.
Additional context
Add any other context about the problem you're solving.
Metadata