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

Bridger WUSDM fix #340

Merged
merged 3 commits into from
Feb 1, 2025
Merged

Bridger WUSDM fix #340

merged 3 commits into from
Feb 1, 2025

Conversation

ylv-io
Copy link
Collaborator

@ylv-io ylv-io commented Jan 31, 2025

Description

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Dependency changes
  • Deployment
  • Forge Script
  • Code refactor / cleanup
  • Documentation or wording changes
  • Other

Checklist:

  • The diff is legible and has no extraneous changes
  • Complex code has been commented, including external interfaces
  • Tests have 100% code coverage
  • The base branch is either main, or there's a description of how to merge

Issue Resolution

… USDC to wUSDM swap, and include new test data file.
Copy link

openzeppelin-code bot commented Jan 31, 2025

Bridger WUSDM fix

Generated at commit: 79d09448bf525769741af74db69d1515367de6db

🚨 Report Summary

Severity Level Results
Contracts Critical
High
Medium
Low
Note
Total
4
2
0
12
39
57
Dependencies Critical
High
Medium
Low
Note
Total
0
0
0
0
0
0

For more details view the full report in OpenZeppelin Code Inspector

Copy link

github-actions bot commented Feb 1, 2025

Slither report

THIS CHECKLIST IS NOT COMPLETE. Use --show-ignored-findings to show all the results.
Summary

unchecked-transfer

Impact: High
Confidence: Medium

function withdraw(address asset, uint256 amount) public returns (uint256) {
address pool = poolAddressProvider.getPool();
// If amount is max uint256, withdraw all available
if (amount == type(uint256).max) {
amount = IERC20(IAavePool(pool).getReserveData(asset).aTokenAddress).balanceOf(address(this));
}
// Withdraw from Aave
IAavePool(pool).withdraw(asset, amount, address(this));
// Send the fee to the Safe
uint256 fee = amount * FEE / 1e18;
IERC20(asset).transfer(safe, fee);
return amount - fee;
}

Copy link

codecov bot commented Feb 1, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.83%. Comparing base (10fa0e5) to head (79d0944).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #340   +/-   ##
=======================================
  Coverage   88.83%   88.83%           
=======================================
  Files          41       41           
  Lines        2579     2579           
=======================================
  Hits         2291     2291           
  Misses        288      288           
Files with missing lines Coverage Δ
src/bridger/Bridger.sol 96.50% <100.00%> (ø)

@ylv-io ylv-io merged commit e6dbe40 into main Feb 1, 2025
8 checks passed
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 this pull request may close these issues.

1 participant