@@ -5,7 +5,6 @@ import {AccountRegistry} from "./AccountRegistry.sol";
55import {LibBitmap} from "solady/utils/LibBitmap.sol " ;
66import {LibERC7579} from "solady/accounts/LibERC7579.sol " ;
77import {LibEIP7702} from "solady/accounts/LibEIP7702.sol " ;
8- import {Ownable} from "solady/auth/Ownable.sol " ;
98import {EfficientHashLib} from "solady/utils/EfficientHashLib.sol " ;
109import {ReentrancyGuardTransient} from "solady/utils/ReentrancyGuardTransient.sol " ;
1110import {EIP712} from "solady/utils/EIP712.sol " ;
@@ -38,13 +37,7 @@ import {IEntryPoint} from "./interfaces/IEntryPoint.sol";
3837/// - Minimize chance of censorship.
3938/// This means once an UserOp is signed, it is infeasible to
4039/// alter or rearrange it to force it to fail.
41- contract EntryPoint is
42- IEntryPoint ,
43- EIP712 ,
44- Ownable ,
45- CallContextChecker ,
46- ReentrancyGuardTransient
47- {
40+ contract EntryPoint is IEntryPoint , EIP712 , CallContextChecker , ReentrancyGuardTransient {
4841 using LibERC7579 for bytes32 [];
4942 using EfficientHashLib for bytes32 [];
5043 using LibBitmap for LibBitmap.Bitmap;
@@ -141,17 +134,15 @@ contract EntryPoint is
141134 uint256 internal constant _REFUND_GAS = 50000 ;
142135
143136 ////////////////////////////////////////////////////////////////////////
144- // Constructor
137+ // Main
145138 ////////////////////////////////////////////////////////////////////////
146139
147- constructor (address initialOwner ) payable {
148- _initializeOwner (initialOwner);
140+ /// @dev Allows anyone to sweep tokens from the entry point.
141+ /// If `token` is `address(0)`, withdraws the native gas token.
142+ function withdrawTokens (address token , address recipient , uint256 amount ) public virtual {
143+ TokenTransferLib.safeTransfer (token, recipient, amount);
149144 }
150145
151- ////////////////////////////////////////////////////////////////////////
152- // Main
153- ////////////////////////////////////////////////////////////////////////
154-
155146 /// @dev Executes a single encoded user operation.
156147 /// `encodedUserOp` is given by `abi.encode(userOp)`, where `userOp` is a struct of type `UserOp`.
157148 /// If sufficient gas is provided, returns an error selector that is non-zero
@@ -790,20 +781,6 @@ contract EntryPoint is
790781
791782 receive () external payable virtual {}
792783
793- ////////////////////////////////////////////////////////////////////////
794- // Only Owner Functions
795- ////////////////////////////////////////////////////////////////////////
796-
797- /// @dev Allows the entry point owner to withdraw tokens.
798- /// If `token` is `address(0)`, withdraws the native gas token.
799- function withdrawTokens (address token , address recipient , uint256 amount )
800- public
801- virtual
802- onlyOwner
803- {
804- TokenTransferLib.safeTransfer (token, recipient, amount);
805- }
806-
807784 ////////////////////////////////////////////////////////////////////////
808785 // EIP712
809786 ////////////////////////////////////////////////////////////////////////
0 commit comments