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

Adds protocol fees to RFQ #1670

Merged
merged 3 commits into from
Dec 17, 2023
Merged

Adds protocol fees to RFQ #1670

merged 3 commits into from
Dec 17, 2023

Conversation

mikeyrf
Copy link
Contributor

@mikeyrf mikeyrf commented Dec 15, 2023

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

  • Fixes #[Link to Issue]

Copy link
Contributor

coderabbitai bot commented Dec 15, 2023

Important

Auto Review Skipped

Auto 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 .coderabbit.yaml file in this repository.

To trigger a single review, invoke the @coderabbitai review command.

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 ?


Tips

Chat with CodeRabbit Bot (@coderabbitai)

  • You can reply to a review comment made by CodeRabbit.
  • You can tag CodeRabbit on specific lines of code or files in the PR by tagging @coderabbitai in a comment.
  • You can tag @coderabbitai in a PR comment and ask one-off questions about the PR and the codebase. Use quoted replies to pass the context for follow-up questions.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

Copy link

codecov bot commented Dec 15, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (0405cc8) 50.52034% compared to head (e928378) 51.27884%.
Report is 1 commits behind head on fix/new-rfq.

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     
Flag Coverage Δ
cctp-relayer ?
packages 90.77156% <ø> (ø)
promexporter ?
rfq ?
solidity 93.63708% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -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

FastBridge.bridge(IFastBridge.BridgeParams).originFeeAmount is a local variable never initialized
Comment on lines +87 to +94
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

@@ -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

Parameter Admin.addGovernor(address)._governor is not in mixedCase
emit GovernorAdded(_governor);
}

function removeGovernor(address _governor) external {

Check warning

Code scanning / Slither

Conformance to Solidity naming conventions Warning

Parameter Admin.removeGovernor(address)._governor is not in mixedCase
@trajan0x trajan0x mentioned this pull request Dec 15, 2023
33 tasks
@trajan0x trajan0x mentioned this pull request Dec 17, 2023
@github-actions github-actions bot added go Pull requests that update Go code size/l and removed size/m labels Dec 17, 2023
@trajan0x trajan0x merged commit 40c744e into fix/new-rfq Dec 17, 2023
137 of 141 checks passed
@trajan0x trajan0x deleted the fix/new-rfq-w-fees branch December 17, 2023 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go Pull requests that update Go code size/l
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants