Skip to content

Commit

Permalink
fix: swap peram order _getStorage_OperatorAuth
Browse files Browse the repository at this point in the history
  • Loading branch information
MoonBoi9001 committed Oct 7, 2024
1 parent 5cea84e commit 98b3470
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,7 @@ abstract contract HorizonStakingSharedTest is GraphBaseTest {
bool legacy = verifier == subgraphDataServiceLegacyAddress;

// before
bool beforeOperatorAllowed = _getStorage_OperatorAuth(msgSender, operator, verifier, legacy);
bool beforeOperatorAllowed = _getStorage_OperatorAuth(msgSender, verifier, operator, legacy);
bool beforeOperatorAllowedGetter = staking.isAuthorized(msgSender, verifier, operator);
assertEq(beforeOperatorAllowed, beforeOperatorAllowedGetter);

Expand All @@ -766,9 +766,9 @@ abstract contract HorizonStakingSharedTest is GraphBaseTest {
}

// after
bool afterOperatorAllowed = _getStorage_OperatorAuth(msgSender, operator, verifier, legacy);
bool afterOperatorAllowed = _getStorage_OperatorAuth(msgSender, verifier, operator, legacy);
bool afterOperatorAllowedGetter = staking.isAuthorized(msgSender, verifier, operator);
assertEq(afterOperatorAllowed, afterOperatorAllowedGetter);
assertEq(afterOperatorAllowed, afterOperatorAllowedGetter, "afterOperatorAllowedGetter FAIL");

// assert
assertEq(afterOperatorAllowed, allow);
Expand Down Expand Up @@ -1686,8 +1686,8 @@ abstract contract HorizonStakingSharedTest is GraphBaseTest {

function _getStorage_OperatorAuth(
address serviceProvider,
address operator,
address verifier,
address operator,
bool legacy
) internal view returns (bool) {
uint256 slotNumber = legacy ? 21 : 31;
Expand All @@ -1699,8 +1699,8 @@ abstract contract HorizonStakingSharedTest is GraphBaseTest {
slot = uint256(
keccak256(
abi.encode(
operator,
keccak256(abi.encode(verifier, keccak256(abi.encode(serviceProvider, slotNumber))))
verifier,
keccak256(abi.encode(operator, keccak256(abi.encode(serviceProvider, slotNumber))))
)
)
);
Expand Down

0 comments on commit 98b3470

Please sign in to comment.