Skip to content

Commit a552acc

Browse files
committed
fix: apply consistent mapping order isAuthorized (OZ_N-05)
1 parent df54f30 commit a552acc

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

packages/horizon/contracts/data-service/utilities/ProvisionManager.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ abstract contract ProvisionManager is Initializable, GraphDirectory, ProvisionMa
8484
*/
8585
modifier onlyProvisionAuthorized(address serviceProvider) {
8686
require(
87-
_graphStaking().isAuthorized(msg.sender, serviceProvider, address(this)),
87+
_graphStaking().isAuthorized(serviceProvider, msg.sender, address(this)),
8888
ProvisionManagerNotAuthorized(serviceProvider, msg.sender)
8989
);
9090
_;

packages/horizon/contracts/interfaces/internal/IHorizonStakingMain.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -882,10 +882,10 @@ interface IHorizonStakingMain {
882882

883883
/**
884884
* @notice Check if an operator is authorized for the caller on a specific verifier / data service.
885-
* @param operator The address to check for auth
886885
* @param serviceProvider The service provider on behalf of whom they're claiming to act
886+
* @param operator The address to check for auth
887887
* @param verifier The verifier / data service on which they're claiming to act
888888
* @return Whether the operator is authorized or not
889889
*/
890-
function isAuthorized(address operator, address serviceProvider, address verifier) external view returns (bool);
890+
function isAuthorized(address serviceProvider, address operator, address verifier) external view returns (bool);
891891
}

packages/horizon/contracts/staking/HorizonStaking.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,8 +513,8 @@ contract HorizonStaking is HorizonStakingBase, IHorizonStakingMain {
513513
* @notice See {IHorizonStakingMain-isAuthorized}.
514514
*/
515515
function isAuthorized(
516-
address operator,
517516
address serviceProvider,
517+
address operator,
518518
address verifier
519519
) external view override returns (bool) {
520520
return _isAuthorized(operator, serviceProvider, verifier);

0 commit comments

Comments
 (0)