From fbc03310b0db112f4cef957adb3ca7808fa4ec13 Mon Sep 17 00:00:00 2001 From: DhairyaSethi <55102840+DhairyaSethi@users.noreply.github.com> Date: Thu, 17 Aug 2023 03:57:34 +0530 Subject: [PATCH] chore: rm comment, fix slither --- contracts/child/validator/ValidatorSet.sol | 2 +- contracts/root/staking/CustomSupernetManager.sol | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/contracts/child/validator/ValidatorSet.sol b/contracts/child/validator/ValidatorSet.sol index 52dbb6b7..ec25c180 100644 --- a/contracts/child/validator/ValidatorSet.sol +++ b/contracts/child/validator/ValidatorSet.sol @@ -155,7 +155,7 @@ contract ValidatorSet is IValidatorSet, ERC20VotesUpgradeable, System { slashedAmounts[i] = (balanceOf(validatorsToSlash[i]) * SLASHING_PERCENTAGE) / 100; _burn(validatorsToSlash[i], slashedAmounts[i]); // partially unstake validator // slither-disable-next-line mapping-deletion - delete withdrawals[validatorsToSlash[i]]; // ? do we need to remove pending withdrawals + delete withdrawals[validatorsToSlash[i]]; // remove pending withdrawals unchecked { ++i; } diff --git a/contracts/root/staking/CustomSupernetManager.sol b/contracts/root/staking/CustomSupernetManager.sol index 5d6a9821..dd2e6e86 100644 --- a/contracts/root/staking/CustomSupernetManager.sol +++ b/contracts/root/staking/CustomSupernetManager.sol @@ -163,7 +163,7 @@ contract CustomSupernetManager is ICustomSupernetManager, Ownable2StepUpgradeabl uint256 totalSlashedAmount; for (uint256 i = 0; i < length; ) { uint256 slashedAmount = (stakeManager.stakeOf(validatorsToSlash[i], id) * SLASHING_PERCENTAGE) / 100; - // slither-disable-next-line reentrancy-benign,reentrancy-events + // slither-disable-next-line reentrancy-benign,reentrancy-events,reentrancy-no-eth stakeManager.slashStakeOf(validatorsToSlash[i], slashedAmount); _removeIfValidatorUnstaked(validatorsToSlash[i]); totalSlashedAmount += slashedAmount;