Skip to content

Commit

Permalink
fix: apply consistent mapping order _operatorAuth (OZ_N-05)
Browse files Browse the repository at this point in the history
  • Loading branch information
MoonBoi9001 committed Oct 4, 2024
1 parent 0990e9b commit 6c16831
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/horizon/contracts/staking/HorizonStaking.sol
Original file line number Diff line number Diff line change
Expand Up @@ -959,7 +959,7 @@ contract HorizonStaking is HorizonStakingBase, IHorizonStakingMain {
if (_verifier == SUBGRAPH_DATA_SERVICE_ADDRESS) {
_legacyOperatorAuth[msg.sender][_operator] = _allowed;
} else {
_operatorAuth[msg.sender][_verifier][_operator] = _allowed;
_operatorAuth[msg.sender][_operator][_verifier] = _allowed;
}
emit OperatorSet(msg.sender, _operator, _verifier, _allowed);
}
Expand All @@ -976,7 +976,7 @@ contract HorizonStaking is HorizonStakingBase, IHorizonStakingMain {
if (_verifier == SUBGRAPH_DATA_SERVICE_ADDRESS) {
return _legacyOperatorAuth[_serviceProvider][_operator];
} else {
return _operatorAuth[_serviceProvider][_verifier][_operator];
return _operatorAuth[_serviceProvider][_operator][_verifier];
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ abstract contract HorizonStakingV1Storage {

/// @dev Operator allow list
/// Used for all verifiers except the subgraph data service.
mapping(address serviceProvider => mapping(address verifier => mapping(address operator => bool authorized)))
mapping(address serviceProvider => mapping(address operator => mapping(address verifier => bool authorized)))
internal _operatorAuth;

/// @dev Flag to enable or disable delegation slashing
Expand Down

0 comments on commit 6c16831

Please sign in to comment.