Skip to content

Commit

Permalink
fix: update failing tests for HorizonStakingNotAuthorized (OZ_N-05)
Browse files Browse the repository at this point in the history
  • Loading branch information
MoonBoi9001 committed Oct 4, 2024
1 parent 00a36dd commit 17cfefd
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions packages/horizon/test/staking/provision/deprovision.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ contract HorizonStakingDeprovisionTest is HorizonStakingTest {
vm.startPrank(users.operator);
bytes memory expectedError = abi.encodeWithSignature(
"HorizonStakingNotAuthorized(address,address,address)",
users.indexer,
subgraphDataServiceAddress,
users.operator,
subgraphDataServiceAddress
users.indexer
);
vm.expectRevert(expectedError);
staking.deprovision(users.indexer, subgraphDataServiceAddress, 0);
Expand Down
4 changes: 2 additions & 2 deletions packages/horizon/test/staking/provision/locked.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ contract HorizonStakingProvisionLockedTest is HorizonStakingTest {
vm.startPrank(users.operator);
bytes memory expectedError = abi.encodeWithSignature(
"HorizonStakingNotAuthorized(address,address,address)",
users.indexer,
subgraphDataServiceAddress,
users.operator,
subgraphDataServiceAddress
users.indexer
);
vm.expectRevert(expectedError);
staking.provisionLocked(
Expand Down
4 changes: 2 additions & 2 deletions packages/horizon/test/staking/provision/parameters.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ contract HorizonStakingProvisionParametersTest is HorizonStakingTest {
vm.expectRevert(
abi.encodeWithSignature(
"HorizonStakingNotAuthorized(address,address,address)",
users.indexer,
subgraphDataServiceAddress,
msg.sender,
subgraphDataServiceAddress
users.indexer
)
);
staking.setProvisionParameters(users.indexer, subgraphDataServiceAddress, maxVerifierCut, thawingPeriod);
Expand Down
4 changes: 2 additions & 2 deletions packages/horizon/test/staking/provision/provision.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ contract HorizonStakingProvisionTest is HorizonStakingTest {
vm.startPrank(users.operator);
bytes memory expectedError = abi.encodeWithSignature(
"HorizonStakingNotAuthorized(address,address,address)",
users.indexer,
subgraphDataServiceAddress,
users.operator,
subgraphDataServiceAddress
users.indexer,
);
vm.expectRevert(expectedError);
staking.provision(users.indexer, subgraphDataServiceAddress, amount, maxVerifierCut, thawingPeriod);
Expand Down
4 changes: 2 additions & 2 deletions packages/horizon/test/staking/provision/reprovision.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ contract HorizonStakingReprovisionTest is HorizonStakingTest {
vm.startPrank(users.operator);
bytes memory expectedError = abi.encodeWithSignature(
"HorizonStakingNotAuthorized(address,address,address)",
users.indexer,
newDataService,
users.operator,
newDataService
users.indexer
);
vm.expectRevert(expectedError);
staking.reprovision(users.indexer, subgraphDataServiceAddress, newDataService, provisionAmount, 0);
Expand Down
4 changes: 2 additions & 2 deletions packages/horizon/test/staking/provision/thaw.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ contract HorizonStakingThawTest is HorizonStakingTest {
vm.startPrank(users.operator);
bytes memory expectedError = abi.encodeWithSignature(
"HorizonStakingNotAuthorized(address,address,address)",
users.indexer,
subgraphDataServiceAddress,
users.operator,
subgraphDataServiceAddress
users.indexer
);
vm.expectRevert(expectedError);
staking.thaw(users.indexer, subgraphDataServiceAddress, amount);
Expand Down

0 comments on commit 17cfefd

Please sign in to comment.