Skip to content

Commit

Permalink
fix: apply consistent mapping order HorizonStakingNotAuthorized (OZ_N…
Browse files Browse the repository at this point in the history
…-05)
  • Loading branch information
MoonBoi9001 committed Oct 4, 2024
1 parent f2a5498 commit fb592e2
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion packages/horizon/contracts/staking/HorizonStaking.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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)
);
_;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/horizon/test/staking/provision/deprovision.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion packages/horizon/test/staking/provision/locked.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion packages/horizon/test/staking/provision/parameters.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ contract HorizonStakingProvisionParametersTest is HorizonStakingTest {
vm.expectRevert(
abi.encodeWithSignature(
"HorizonStakingNotAuthorized(address,address,address)",
msg.sender,
users.indexer,
msg.sender,
subgraphDataServiceAddress
)
);
Expand Down
2 changes: 1 addition & 1 deletion packages/horizon/test/staking/provision/provision.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion packages/horizon/test/staking/provision/reprovision.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion packages/horizon/test/staking/provision/thaw.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit fb592e2

Please sign in to comment.