Skip to content

Commit

Permalink
fix: missing operatorId in getOperator
Browse files Browse the repository at this point in the history
  • Loading branch information
krogla committed Jan 28, 2025
1 parent b99604d commit 7a90f27
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/CCCP.sol
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ contract CCCP is
_loadLidoNodeOperator(_c, moduleId, operatorId);
state = _getOperatorState(opKey);
OperatorOptInOutFlags memory flags = _calcOptInOutFlags(state.optInOutState);
(, bool isDisabled) = _getModuleConfig(_c.moduleId);
(, bool isDisabled) = _getModuleConfig(moduleId);

// operator is enabled:
// - if it's s opted in
Expand All @@ -376,7 +376,7 @@ contract CCCP is
// - if the contract is not paused
isEnabled = flags.isOptedIn && !isDisabled && _c.isActive && !paused();

return (_c.moduleId, _c.operatorId, isEnabled, state);
return (moduleId, operatorId, isEnabled, state);
}

function _checkModuleParams(uint24 moduleId, uint64 startIndex, uint64 endIndex) internal view {
Expand Down Expand Up @@ -456,6 +456,7 @@ contract CCCP is
if (operatorId >= totalOperatorsCount) {
revert InvalidOperatorId();
}
_c.operatorId = operatorId;

/// @dev check for the CSModule type
bytes32 moduleType = IStakingModule(_c.moduleAddress).getType();
Expand Down

0 comments on commit 7a90f27

Please sign in to comment.