From 98b347027498a1f63cd72fbfc290f5adea7f740a Mon Sep 17 00:00:00 2001 From: MoonBoi9001 Date: Fri, 4 Oct 2024 16:30:51 +0100 Subject: [PATCH] fix: swap peram order _getStorage_OperatorAuth --- .../horizon-staking/HorizonStakingShared.t.sol | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/horizon/test/shared/horizon-staking/HorizonStakingShared.t.sol b/packages/horizon/test/shared/horizon-staking/HorizonStakingShared.t.sol index d0c46a8dc..4adf6fcd4 100644 --- a/packages/horizon/test/shared/horizon-staking/HorizonStakingShared.t.sol +++ b/packages/horizon/test/shared/horizon-staking/HorizonStakingShared.t.sol @@ -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); @@ -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); @@ -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; @@ -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)))) ) ) );