diff --git a/packages/horizon/contracts/interfaces/internal/IHorizonStakingMain.sol b/packages/horizon/contracts/interfaces/internal/IHorizonStakingMain.sol index eafce457a..71ae20076 100644 --- a/packages/horizon/contracts/interfaces/internal/IHorizonStakingMain.sol +++ b/packages/horizon/contracts/interfaces/internal/IHorizonStakingMain.sol @@ -336,7 +336,7 @@ interface IHorizonStakingMain { * @param serviceProvider The service provider address * @param verifier The verifier address */ - error HorizonStakingNotAuthorized(address caller, address serviceProvider, address verifier); + error HorizonStakingNotAuthorized(address serviceProvider, address caller, address verifier); /** * @notice Thrown when attempting to create a provision with an invalid maximum verifier cut. diff --git a/packages/horizon/contracts/staking/HorizonStaking.sol b/packages/horizon/contracts/staking/HorizonStaking.sol index c8709e639..45b28d91c 100644 --- a/packages/horizon/contracts/staking/HorizonStaking.sol +++ b/packages/horizon/contracts/staking/HorizonStaking.sol @@ -56,7 +56,7 @@ contract HorizonStaking is HorizonStakingBase, IHorizonStakingMain { modifier onlyAuthorized(address serviceProvider, address verifier) { require( _isAuthorized(msg.sender, serviceProvider, verifier), - HorizonStakingNotAuthorized(msg.sender, serviceProvider, verifier) + HorizonStakingNotAuthorized(serviceProvider, msg.sender, verifier) ); _; } diff --git a/packages/horizon/test/staking/provision/deprovision.t.sol b/packages/horizon/test/staking/provision/deprovision.t.sol index 6d03c3f6e..ef8f62e1a 100644 --- a/packages/horizon/test/staking/provision/deprovision.t.sol +++ b/packages/horizon/test/staking/provision/deprovision.t.sol @@ -75,8 +75,8 @@ contract HorizonStakingDeprovisionTest is HorizonStakingTest { vm.startPrank(users.operator); bytes memory expectedError = abi.encodeWithSignature( "HorizonStakingNotAuthorized(address,address,address)", - users.operator, users.indexer, + users.operator, subgraphDataServiceAddress ); vm.expectRevert(expectedError); diff --git a/packages/horizon/test/staking/provision/locked.t.sol b/packages/horizon/test/staking/provision/locked.t.sol index a8adfc774..40fbd9b6f 100644 --- a/packages/horizon/test/staking/provision/locked.t.sol +++ b/packages/horizon/test/staking/provision/locked.t.sol @@ -66,8 +66,8 @@ contract HorizonStakingProvisionLockedTest is HorizonStakingTest { vm.startPrank(users.operator); bytes memory expectedError = abi.encodeWithSignature( "HorizonStakingNotAuthorized(address,address,address)", - users.operator, users.indexer, + users.operator, subgraphDataServiceAddress ); vm.expectRevert(expectedError); diff --git a/packages/horizon/test/staking/provision/parameters.t.sol b/packages/horizon/test/staking/provision/parameters.t.sol index 8171f95b4..a43913e9f 100644 --- a/packages/horizon/test/staking/provision/parameters.t.sol +++ b/packages/horizon/test/staking/provision/parameters.t.sol @@ -42,8 +42,8 @@ contract HorizonStakingProvisionParametersTest is HorizonStakingTest { vm.expectRevert( abi.encodeWithSignature( "HorizonStakingNotAuthorized(address,address,address)", - msg.sender, users.indexer, + msg.sender, subgraphDataServiceAddress ) ); diff --git a/packages/horizon/test/staking/provision/provision.t.sol b/packages/horizon/test/staking/provision/provision.t.sol index 50dc12057..f8cc3274e 100644 --- a/packages/horizon/test/staking/provision/provision.t.sol +++ b/packages/horizon/test/staking/provision/provision.t.sol @@ -102,8 +102,8 @@ contract HorizonStakingProvisionTest is HorizonStakingTest { vm.startPrank(users.operator); bytes memory expectedError = abi.encodeWithSignature( "HorizonStakingNotAuthorized(address,address,address)", - users.operator, users.indexer, + users.operator, subgraphDataServiceAddress ); vm.expectRevert(expectedError); diff --git a/packages/horizon/test/staking/provision/reprovision.t.sol b/packages/horizon/test/staking/provision/reprovision.t.sol index 6fd170e4b..703320abf 100644 --- a/packages/horizon/test/staking/provision/reprovision.t.sol +++ b/packages/horizon/test/staking/provision/reprovision.t.sol @@ -80,8 +80,8 @@ contract HorizonStakingReprovisionTest is HorizonStakingTest { vm.startPrank(users.operator); bytes memory expectedError = abi.encodeWithSignature( "HorizonStakingNotAuthorized(address,address,address)", - users.operator, users.indexer, + users.operator, newDataService ); vm.expectRevert(expectedError); diff --git a/packages/horizon/test/staking/provision/thaw.t.sol b/packages/horizon/test/staking/provision/thaw.t.sol index bb0b3409d..579fd998c 100644 --- a/packages/horizon/test/staking/provision/thaw.t.sol +++ b/packages/horizon/test/staking/provision/thaw.t.sol @@ -49,8 +49,8 @@ contract HorizonStakingThawTest is HorizonStakingTest { vm.startPrank(users.operator); bytes memory expectedError = abi.encodeWithSignature( "HorizonStakingNotAuthorized(address,address,address)", - users.operator, users.indexer, + users.operator, subgraphDataServiceAddress ); vm.expectRevert(expectedError);