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

SealedBidTokenSale #338

Merged
merged 28 commits into from
Feb 9, 2025
Merged

SealedBidTokenSale #338

merged 28 commits into from
Feb 9, 2025

Conversation

ylv-io
Copy link
Collaborator

@ylv-io ylv-io commented Jan 29, 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

Copy link

openzeppelin-code bot commented Jan 29, 2025

SealedBidTokenSale

Generated at commit: f135245c149c9cdee6c4fef033e74f29af426538

🚨 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 Jan 29, 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 Jan 29, 2025

Codecov Report

Attention: Patch coverage is 98.70130% with 1 line in your changes missing coverage. Please review.

Project coverage is 89.11%. Comparing base (d1e5236) to head (f135245).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
src/apps/SealedBidTokenSale.sol 98.70% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #338      +/-   ##
==========================================
+ Coverage   88.83%   89.11%   +0.28%     
==========================================
  Files          41       42       +1     
  Lines        2579     2656      +77     
==========================================
+ Hits         2291     2367      +76     
- Misses        288      289       +1     
Files with missing lines Coverage Δ
src/apps/SealedBidTokenSale.sol 98.70% <98.70%> (ø)

ylv-io added 24 commits February 9, 2025 10:35
…ulti-unit uniform-price token sale with USDC deposits, using OpenZeppelin's Ownable for ownership, Merkle-based token claims, and proceeds withdrawal to a treasury address.
…e SafeERC20 for USDC transfers, and rename usdcToken to USDC for clarity.
…event emissions, improve function documentation, and streamline token transfer logic.
…etailed InvalidProof error and update finalize logic; add comprehensive unit tests for contract functionality.
…s and events for clarity, update tests accordingly.
…ion in claimTokens function, update Merkle proof logic, and adjust test setup and assertions accordingly.
…Tokens function and update Merkle proof handling in tests.
…it tests with additional scenarios for deposit, endSale, withdraw, claimTokens, setMerkleRoot, and withdrawProceeds functions.
…e error messages, and clarify function descriptions for better code readability and maintainability.
…nSale contract and update corresponding test case.
…l allocations, optimize gas, and enhance security with reentrancy protection.
…simplifying the technical specification and focusing on the core contract details.
…tract, update state variables, and enhance unit tests for comprehensive sale status tracking.
…ontract with tests for deposit logic and boundary conditions.
…update imports, and adjust unit tests for proxy initialization.
…ontract addresses, and include transaction details in JSON files for chain 7887.
@rrecuero rrecuero force-pushed the feat/k-distribution branch from cbc0d28 to f135245 Compare February 9, 2025 18:35
@rrecuero rrecuero merged commit cd07409 into main Feb 9, 2025
1 check passed
@rrecuero rrecuero deleted the feat/k-distribution branch February 9, 2025 18:36
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.

2 participants