Skip to content

Commit 9523cc9

Browse files
authored
Mark parsePaymasterAndData as internal (#12)
1 parent 6bbd065 commit 9523cc9

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

src/Paymaster.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ contract Paymaster is BasePaymaster {
8484
}
8585

8686
function parsePaymasterAndData(bytes calldata paymasterAndData)
87-
public pure returns(uint48 validUntil, uint48 validAfter, bytes calldata signature) {
87+
internal pure returns(uint48 validUntil, uint48 validAfter, bytes calldata signature) {
8888
(validUntil, validAfter) = abi.decode(paymasterAndData[VALID_TIMESTAMP_OFFSET:SIGNATURE_OFFSET],(uint48, uint48));
8989
signature = paymasterAndData[SIGNATURE_OFFSET:];
9090
}

test/Paymaster.t.sol

-8
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,6 @@ contract PaymasterTest is Test {
4646
paymaster.renounceOwnership();
4747
}
4848

49-
function test_parsePaymasterAndData() public {
50-
bytes memory paymasterAndData = abi.encodePacked(address(paymaster), abi.encode(MOCK_VALID_UNTIL, MOCK_VALID_AFTER), MOCK_SIG);
51-
(uint48 validUntil, uint48 validAfter, bytes memory signature) = paymaster.parsePaymasterAndData(paymasterAndData);
52-
assertEq(validUntil, MOCK_VALID_UNTIL);
53-
assertEq(validAfter, MOCK_VALID_AFTER);
54-
assertEq(signature, MOCK_SIG);
55-
}
56-
5749
function test_getHash() public {
5850
UserOperation memory userOp = createUserOp();
5951
userOp.initCode = "initCode";

0 commit comments

Comments
 (0)