-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feature/code documentation #50
base: develop
Are you sure you want to change the base?
Conversation
function claimFee() external nonReentrant onlyAdmin { | ||
uint256 penaltyAmount = pool.totalPenalties; | ||
if (penaltyAmount == 0) revert NothingToClaim(); | ||
pool.totalPenalties = 0; | ||
IERC20(pool.rewardToken).safeTransfer(pool.adminWallet, penaltyAmount); | ||
emit FeeClaim(penaltyAmount); | ||
} |
Check warning
Code scanning / Slither
Dangerous strict equalities Medium
function claimFee() external nonReentrant onlyAdmin { | ||
uint256 penaltyAmount = pool.totalPenalties; | ||
if (penaltyAmount == 0) revert NothingToClaim(); | ||
pool.totalPenalties = 0; | ||
IERC20(pool.rewardToken).safeTransfer(pool.adminWallet, penaltyAmount); | ||
emit FeeClaim(penaltyAmount); | ||
} |
Check notice
Code scanning / Slither
Block timestamp Low
Dangerous comparisons:
- penaltyAmount == 0
contracts/RequestManager.sol
Outdated
function deploy(uint256 id) external { | ||
if (requests.length <= id) revert InvalidId(); | ||
Request memory req = requests[id]; | ||
if (req.requestStatus != Status.APPROVED) revert InvalidRequestStatus(); | ||
if (msg.sender != req.data.deployer) revert InvalidDeployer(); | ||
requests[id].requestStatus = Status.DEPLOYED; | ||
address newPoolAddress = IGenericFactory(req.data.factory).deploy( | ||
req.data.deployer, | ||
req.data.stakingData | ||
); | ||
stakingPools.push(newPoolAddress); | ||
poolById[id] = newPoolAddress; | ||
emit RequestFullfilled(id, newPoolAddress); | ||
} |
Check notice
Code scanning / Slither
Reentrancy vulnerabilities Low
External calls:
- newPoolAddress = IGenericFactory(req.data.factory).deploy(req.data.deployer,req.data.stakingData)
State variables written after the call(s):
- poolById[id] = newPoolAddress
- stakingPools.push(newPoolAddress)
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #50 +/- ##
========================================
Coverage 86.81% 86.81%
========================================
Files 12 12
Lines 546 546
Branches 142 142
========================================
Hits 474 474
Misses 70 70
Partials 2 2 ☔ View full report in Codecov by Sentry. |
…tsu/stakepad-contracts into feature/codeDocumentation
No description provided.