Skip to content

Commit

Permalink
fix: apply consistent mapping order isAuthorized (OZ_N-05)
Browse files Browse the repository at this point in the history
  • Loading branch information
MoonBoi9001 committed Oct 4, 2024
1 parent df54f30 commit a552acc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ abstract contract ProvisionManager is Initializable, GraphDirectory, ProvisionMa
*/
modifier onlyProvisionAuthorized(address serviceProvider) {
require(
_graphStaking().isAuthorized(msg.sender, serviceProvider, address(this)),
_graphStaking().isAuthorized(serviceProvider, msg.sender, address(this)),
ProvisionManagerNotAuthorized(serviceProvider, msg.sender)
);
_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -882,10 +882,10 @@ interface IHorizonStakingMain {

/**
* @notice Check if an operator is authorized for the caller on a specific verifier / data service.
* @param operator The address to check for auth
* @param serviceProvider The service provider on behalf of whom they're claiming to act
* @param operator The address to check for auth
* @param verifier The verifier / data service on which they're claiming to act
* @return Whether the operator is authorized or not
*/
function isAuthorized(address operator, address serviceProvider, address verifier) external view returns (bool);
function isAuthorized(address serviceProvider, address operator, address verifier) external view returns (bool);
}
2 changes: 1 addition & 1 deletion packages/horizon/contracts/staking/HorizonStaking.sol
Original file line number Diff line number Diff line change
Expand Up @@ -513,8 +513,8 @@ contract HorizonStaking is HorizonStakingBase, IHorizonStakingMain {
* @notice See {IHorizonStakingMain-isAuthorized}.
*/
function isAuthorized(
address operator,
address serviceProvider,
address operator,
address verifier
) external view override returns (bool) {
return _isAuthorized(operator, serviceProvider, verifier);
Expand Down

0 comments on commit a552acc

Please sign in to comment.