diff --git a/packages/horizon/contracts/data-service/utilities/ProvisionManager.sol b/packages/horizon/contracts/data-service/utilities/ProvisionManager.sol index d1cf94287..ea934c267 100644 --- a/packages/horizon/contracts/data-service/utilities/ProvisionManager.sol +++ b/packages/horizon/contracts/data-service/utilities/ProvisionManager.sol @@ -71,7 +71,7 @@ abstract contract ProvisionManager is Initializable, GraphDirectory, ProvisionMa * @param caller The address of the caller. * @param serviceProvider The address of the service provider. */ - error ProvisionManagerNotAuthorized(address caller, address serviceProvider); + error ProvisionManagerNotAuthorized(address serviceProvider, address caller); /** * @notice Thrown when a provision is not found. @@ -85,7 +85,7 @@ abstract contract ProvisionManager is Initializable, GraphDirectory, ProvisionMa modifier onlyProvisionAuthorized(address serviceProvider) { require( _graphStaking().isAuthorized(msg.sender, serviceProvider, address(this)), - ProvisionManagerNotAuthorized(msg.sender, serviceProvider) + ProvisionManagerNotAuthorized(serviceProvider, msg.sender) ); _; } diff --git a/packages/subgraph-service/test/subgraphService/allocation/start.t.sol b/packages/subgraph-service/test/subgraphService/allocation/start.t.sol index 9157444fb..f5d76a350 100644 --- a/packages/subgraph-service/test/subgraphService/allocation/start.t.sol +++ b/packages/subgraph-service/test/subgraphService/allocation/start.t.sol @@ -60,8 +60,8 @@ contract SubgraphServiceAllocationStartTest is SubgraphServiceTest { bytes memory data = _generateData(tokens); vm.expectRevert(abi.encodeWithSelector( ProvisionManager.ProvisionManagerNotAuthorized.selector, - users.operator, - users.indexer + users.indexer, + users.operator )); subgraphService.startService(users.indexer, data); } diff --git a/packages/subgraph-service/test/subgraphService/allocation/stop.t.sol b/packages/subgraph-service/test/subgraphService/allocation/stop.t.sol index ee5958115..8a2b2a284 100644 --- a/packages/subgraph-service/test/subgraphService/allocation/stop.t.sol +++ b/packages/subgraph-service/test/subgraphService/allocation/stop.t.sol @@ -49,8 +49,8 @@ contract SubgraphServiceAllocationStopTest is SubgraphServiceTest { vm.expectRevert( abi.encodeWithSelector( ProvisionManager.ProvisionManagerNotAuthorized.selector, - users.operator, - users.indexer + users.indexer, + users.operator ) ); subgraphService.stopService(users.indexer, data); diff --git a/packages/subgraph-service/test/subgraphService/collect/query/query.t.sol b/packages/subgraph-service/test/subgraphService/collect/query/query.t.sol index 6ad7b5347..7f57f06f8 100644 --- a/packages/subgraph-service/test/subgraphService/collect/query/query.t.sol +++ b/packages/subgraph-service/test/subgraphService/collect/query/query.t.sol @@ -112,8 +112,8 @@ contract SubgraphServiceRegisterTest is SubgraphServiceTest { vm.expectRevert( abi.encodeWithSelector( ProvisionManager.ProvisionManagerNotAuthorized.selector, - users.operator, - users.indexer + users.indexer, + users.operator ) ); subgraphService.collect(users.indexer, paymentType, data); diff --git a/packages/subgraph-service/test/subgraphService/provider/register.t.sol b/packages/subgraph-service/test/subgraphService/provider/register.t.sol index 1df1f5571..6a4a36737 100644 --- a/packages/subgraph-service/test/subgraphService/provider/register.t.sol +++ b/packages/subgraph-service/test/subgraphService/provider/register.t.sol @@ -41,8 +41,8 @@ contract SubgraphServiceProviderRegisterTest is SubgraphServiceTest { resetPrank(users.operator); vm.expectRevert(abi.encodeWithSelector( ProvisionManager.ProvisionManagerNotAuthorized.selector, - users.operator, - users.indexer + users.indexer, + users.operator )); bytes memory data = abi.encode("url", "geoHash", users.rewardsDestination); subgraphService.register(users.indexer, data); diff --git a/packages/subgraph-service/test/subgraphService/provision/accept.t.sol b/packages/subgraph-service/test/subgraphService/provision/accept.t.sol index 1c8191275..58fccdd3a 100644 --- a/packages/subgraph-service/test/subgraphService/provision/accept.t.sol +++ b/packages/subgraph-service/test/subgraphService/provision/accept.t.sol @@ -47,8 +47,8 @@ contract SubgraphServiceProvisionAcceptTest is SubgraphServiceTest { resetPrank(users.operator); vm.expectRevert(abi.encodeWithSelector( ProvisionManager.ProvisionManagerNotAuthorized.selector, - users.operator, - users.indexer + users.indexer, + users.operator )); subgraphService.acceptProvision(users.indexer, ""); }