Skip to content

Commit

Permalink
make non abstract
Browse files Browse the repository at this point in the history
  • Loading branch information
gpsanant committed Apr 24, 2024
1 parent 5a3c17e commit e8ae242
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
12 changes: 6 additions & 6 deletions src/contracts/core/SlashingManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import "../interfaces/ISlashingManager.sol";
import "../interfaces/IStrategy.sol";
import "../interfaces/ISlashableProportionOracle.sol";

abstract contract SlashingManager is ISlashingManager {
contract SlashingManager is ISlashingManager {
/// @notice The maximum number of basis points that can be slashed
uint16 public constant MAX_BIPS = 10000;

Expand Down Expand Up @@ -60,7 +60,7 @@ abstract contract SlashingManager is ISlashingManager {
uint32 bipsPendingNonVetoableSlashingByAVS =
slashingsForAVSAndOperator[avs][slashingRequestParams.operator][slashingRequestParams.strategies[i]][_getCurrentEpoch()].bipsPendingNonvetoableSlashing;

// Check that the AVS is not slashing more bips via SSRs than the maximum allowed
// Check that the AVS is not slashing more nonvetoable bips than the maximum allowed
require(
slashableProportionOracle.getMaxNonvetoableSlashingRequestProportion(
avs,
Expand All @@ -71,7 +71,7 @@ abstract contract SlashingManager is ISlashingManager {
"SlashingManager.makeNonvetoableSlashingRequest: bips to slash too high"
);

// increment the number of bips slashed via SSRs
// increment the number of nonvetoable bips slashed
_incrementBipsPendingNonvetoableSlashing(avs, slashingRequestParams.operator, slashingRequestParams.strategies[i], _getCurrentEpoch(), slashingRequestParams.bipsToSlash[i]);
}

Expand Down Expand Up @@ -105,10 +105,10 @@ abstract contract SlashingManager is ISlashingManager {
// Make sure bipsToSlash is not zero
require(slashingRequestParams.bipsToSlash[i] > 0, "SlashingManager.makeVetoableSlashingRequest: bips to slash is zero");

// Get the bipsSlashedViaSSRs for the AVS, operator, and strategy in the current epoch
// Get the bipsPendingSlashingVetoableByAVS for the AVS, operator, and strategy in the current epoch
uint32 bipsPendingSlashingVetoableByAVS = slashingsForAVSAndOperator[avs][slashingRequestParams.operator][slashingRequestParams.strategies[i]][_getCurrentEpoch()].bipsPendingVetoableSlashing;

// Check that the AVS is not slashing more bips via SSRs than the maximum allowed
// Check that the AVS is not slashing more nonvetoable bips than the maximum allowed
require(
slashableProportionOracle.getMaxVetoableSlashingRequestProportion(
avs,
Expand Down Expand Up @@ -139,7 +139,7 @@ abstract contract SlashingManager is ISlashingManager {

/**
* @notice Called by the veto committee to veto a slashing request
* @param slashingRequest the LSR to veto
* @param slashingRequest the slashing request to veto
* @dev only callable by the veto committee
*/
function vetoSlashingRequest(SlashingRequest calldata slashingRequest) external {
Expand Down
18 changes: 9 additions & 9 deletions src/contracts/interfaces/ISlashingManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -35,30 +35,30 @@ interface ISlashingManager {
}

/**
* @notice Called by AVSs to make small slashing requests
* @notice Called by AVSs to make nonvetoable slashing requests
* @param slashingRequestParams the parameters of the slashing request
* @dev operator and strategies must be slashable at the current time according to the opt in/out subprotocol
*/
function makeSmallSlashingRequest(SlashingRequestParams calldata slashingRequestParams) external returns (uint16[] memory);
function makeNonvetoableSlashingRequest(SlashingRequestParams calldata slashingRequestParams) external;

/**
* @notice Called by AVSs to make large slashing requests
* @notice Called by AVSs to make vetoable slashing requests
* @param slashingRequestParams the parameters of the slashing request
* @dev operator and strategies must be slashable at the current time according to the opt in/out subprotocol
*/
function makeLargeSlashingRequest(SlashingRequestParams calldata slashingRequestParams) external;
function makeVetoableSlashingRequest(SlashingRequestParams calldata slashingRequestParams) external;

/**
* @notice Called by the veto committee to veto a slashing request
* @param largeSlashingRequest the LSR to veto
* @param slashingRequest the slashing request to veto
* @dev only callable by the veto committee
*/
function vetoLargeSlashingRequest(SlashingRequest calldata largeSlashingRequest) external;
function vetoSlashingRequest(SlashingRequest calldata slashingRequest) external;

/**
* @notice Permissionlessly called to execute an LSR
* @param largeSlashingRequest the LSR to execute
* @notice Permissionlessly called to execute a slashing request
* @param slashingRequest the slashing request to execute
* @dev permissionlessly callable
*/
function executeLargeSlashingRequest(SlashingRequest calldata largeSlashingRequest) external returns(uint16[] memory);
function executeSlashingRequest(SlashingRequest calldata slashingRequest) external returns(uint16[] memory);
}

0 comments on commit e8ae242

Please sign in to comment.