Skip to content

Commit

Permalink
fix rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
adamegyed committed Jun 12, 2024
1 parent c937581 commit 0e67b55
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 19 deletions.
9 changes: 0 additions & 9 deletions src/account/PerHookData.t.sol

This file was deleted.

20 changes: 10 additions & 10 deletions test/account/PerHookData.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ contract PerHookDataTest is AccountTestBase {
preValidationHookData[0] = PreValidationHookData({index: 0, validationData: abi.encodePacked(counter)});

userOp.signature =
_encodeSignature(ownerValidation, SHARED_VALIDATION, preValidationHookData, abi.encodePacked(r, s, v));
_encodeSignature(ownerValidation, DEFAULT_VALIDATION, preValidationHookData, abi.encodePacked(r, s, v));

PackedUserOperation[] memory userOps = new PackedUserOperation[](1);
userOps[0] = userOp;
Expand All @@ -95,7 +95,7 @@ contract PerHookDataTest is AccountTestBase {
});

userOp.signature =
_encodeSignature(ownerValidation, SHARED_VALIDATION, preValidationHookData, abi.encodePacked(r, s, v));
_encodeSignature(ownerValidation, DEFAULT_VALIDATION, preValidationHookData, abi.encodePacked(r, s, v));

PackedUserOperation[] memory userOps = new PackedUserOperation[](1);
userOps[0] = userOp;
Expand All @@ -115,7 +115,7 @@ contract PerHookDataTest is AccountTestBase {
(PackedUserOperation memory userOp, bytes32 userOpHash) = _getCounterUserOP();
(uint8 v, bytes32 r, bytes32 s) = vm.sign(owner1Key, userOpHash.toEthSignedMessageHash());

userOp.signature = _encodeSignature(ownerValidation, SHARED_VALIDATION, abi.encodePacked(r, s, v));
userOp.signature = _encodeSignature(ownerValidation, DEFAULT_VALIDATION, abi.encodePacked(r, s, v));

PackedUserOperation[] memory userOps = new PackedUserOperation[](1);
userOps[0] = userOp;
Expand All @@ -140,7 +140,7 @@ contract PerHookDataTest is AccountTestBase {
preValidationHookData[1] = PreValidationHookData({index: 1, validationData: abi.encodePacked(counter)});

userOp.signature =
_encodeSignature(ownerValidation, SHARED_VALIDATION, preValidationHookData, abi.encodePacked(r, s, v));
_encodeSignature(ownerValidation, DEFAULT_VALIDATION, preValidationHookData, abi.encodePacked(r, s, v));

PackedUserOperation[] memory userOps = new PackedUserOperation[](1);
userOps[0] = userOp;
Expand Down Expand Up @@ -178,7 +178,7 @@ contract PerHookDataTest is AccountTestBase {
preValidationHookData[0] = PreValidationHookData({index: 0, validationData: abi.encodePacked(beneficiary)});

userOp.signature =
_encodeSignature(ownerValidation, SHARED_VALIDATION, preValidationHookData, abi.encodePacked(r, s, v));
_encodeSignature(ownerValidation, DEFAULT_VALIDATION, preValidationHookData, abi.encodePacked(r, s, v));

PackedUserOperation[] memory userOps = new PackedUserOperation[](1);
userOps[0] = userOp;
Expand All @@ -205,7 +205,7 @@ contract PerHookDataTest is AccountTestBase {
abi.encodeCall(
UpgradeableModularAccount.execute, (address(counter), 0 wei, abi.encodeCall(Counter.increment, ()))
),
_encodeSignature(ownerValidation, SHARED_VALIDATION, preValidationHookData, "")
_encodeSignature(ownerValidation, DEFAULT_VALIDATION, preValidationHookData, "")
);

assertEq(counter.number(), 1);
Expand All @@ -231,7 +231,7 @@ contract PerHookDataTest is AccountTestBase {
abi.encodeCall(
UpgradeableModularAccount.execute, (address(counter), 0 wei, abi.encodeCall(Counter.increment, ()))
),
_encodeSignature(ownerValidation, SHARED_VALIDATION, preValidationHookData, "")
_encodeSignature(ownerValidation, DEFAULT_VALIDATION, preValidationHookData, "")
);
}

Expand All @@ -249,7 +249,7 @@ contract PerHookDataTest is AccountTestBase {
abi.encodeCall(
UpgradeableModularAccount.execute, (address(counter), 0 wei, abi.encodeCall(Counter.increment, ()))
),
_encodeSignature(ownerValidation, SHARED_VALIDATION, "")
_encodeSignature(ownerValidation, DEFAULT_VALIDATION, "")
);
}

Expand All @@ -266,7 +266,7 @@ contract PerHookDataTest is AccountTestBase {
abi.encodeCall(
UpgradeableModularAccount.execute, (address(counter), 0 wei, abi.encodeCall(Counter.increment, ()))
),
_encodeSignature(ownerValidation, SHARED_VALIDATION, preValidationHookData, "")
_encodeSignature(ownerValidation, DEFAULT_VALIDATION, preValidationHookData, "")
);
}

Expand All @@ -287,7 +287,7 @@ contract PerHookDataTest is AccountTestBase {
);
account1.executeWithAuthorization(
abi.encodeCall(UpgradeableModularAccount.execute, (beneficiary, 1 wei, "")),
_encodeSignature(ownerValidation, SHARED_VALIDATION, preValidationHookData, "")
_encodeSignature(ownerValidation, DEFAULT_VALIDATION, preValidationHookData, "")
);
}

Expand Down

0 comments on commit 0e67b55

Please sign in to comment.