Skip to content

Commit 6bbd065

Browse files
authored
Disable renounceOwnership (#11)
1 parent 68cc46a commit 6bbd065

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

src/Paymaster.sol

+4
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,10 @@ contract Paymaster is BasePaymaster {
9393
verifyingSigner = _verifyingSigner;
9494
}
9595

96+
function renounceOwnership() public override view onlyOwner {
97+
revert("Paymaster: renouncing ownership is not allowed");
98+
}
99+
96100
receive() external payable {
97101
deposit();
98102
}

test/Paymaster.t.sol

+5
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ contract PaymasterTest is Test {
4141
new Paymaster(entrypoint, address(this));
4242
}
4343

44+
function test_noRenounceOwnership() public {
45+
vm.expectRevert("Paymaster: renouncing ownership is not allowed");
46+
paymaster.renounceOwnership();
47+
}
48+
4449
function test_parsePaymasterAndData() public {
4550
bytes memory paymasterAndData = abi.encodePacked(address(paymaster), abi.encode(MOCK_VALID_UNTIL, MOCK_VALID_AFTER), MOCK_SIG);
4651
(uint48 validUntil, uint48 validAfter, bytes memory signature) = paymaster.parsePaymasterAndData(paymasterAndData);

0 commit comments

Comments
 (0)