Skip to content

Commit 638c5f9

Browse files
committed
clean up nonce stuff
1 parent 503b00c commit 638c5f9

File tree

1 file changed

+3
-23
lines changed

1 file changed

+3
-23
lines changed

src/EIP7702Proxy.sol

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -42,36 +42,23 @@ contract EIP7702Proxy is Proxy {
4242
/// @notice Emitted when constructor arguments are zero
4343
error ZeroValueConstructorArguments();
4444

45-
/// @notice Emitted when nonce has already been used
46-
error NonceAlreadyUsed();
47-
48-
/// @notice Address of the global nonce tracker for reset operations
49-
address public immutable nonceTracker;
45+
/// @notice Emitted when caller is not the EOA
46+
error UnauthorizedCaller();
5047

5148
/// @notice Emitted when the implementation is reset
5249
event ImplementationReset(address newImplementation);
5350

54-
/// @notice Emitted when caller is not the EOA
55-
error UnauthorizedCaller();
56-
5751
/// @notice Initializes the proxy with an initial implementation and guarded initializer
5852
/// @param implementation The initial implementation address
5953
/// @param initializer The selector of the `guardedInitializer` function
60-
/// @param _nonceTracker The address of the global nonce tracker for reset operations
61-
constructor(
62-
address implementation,
63-
bytes4 initializer,
64-
address _nonceTracker
65-
) {
54+
constructor(address implementation, bytes4 initializer) {
6655
if (implementation == address(0))
6756
revert ZeroValueConstructorArguments();
6857
if (initializer == bytes4(0)) revert ZeroValueConstructorArguments();
69-
if (_nonceTracker == address(0)) revert ZeroValueConstructorArguments();
7058

7159
proxy = address(this);
7260
initialImplementation = implementation;
7361
guardedInitializer = initializer;
74-
nonceTracker = _nonceTracker;
7562
}
7663

7764
/// @dev Checks if proxy has been initialized by checking the initialized flag
@@ -186,10 +173,3 @@ contract EIP7702Proxy is Proxy {
186173
emit ImplementationReset(newImplementation);
187174
}
188175
}
189-
190-
interface INonceTracker {
191-
function verifyAndUseNonce(
192-
address account,
193-
uint256 nonce
194-
) external returns (bool);
195-
}

0 commit comments

Comments
 (0)