diff --git a/contracts/utils/NoncesSemiAbstracted.sol b/contracts/utils/NoncesSemiAbstracted.sol index 9f9910bb925..b4f5941fb51 100644 --- a/contracts/utils/NoncesSemiAbstracted.sol +++ b/contracts/utils/NoncesSemiAbstracted.sol @@ -9,7 +9,7 @@ import {Nonces} from "./Nonces.sol"; * Follows the https://eips.ethereum.org/EIPS/eip-4337#semi-abstracted-nonce-support[ERC-4337's semi-abstracted nonce system]. */ abstract contract NoncesSemiAbstracted is Nonces { - mapping(address owner => mapping(uint192 key => uint64)) private _nonce; + mapping(address owner => mapping(uint192 key => uint64)) private _nounces; /** * @dev Returns the next unused nonce for an address. @@ -22,7 +22,7 @@ abstract contract NoncesSemiAbstracted is Nonces { * @dev Returns the next unused nonce for an address and key. Result contains the key prefix. */ function nonces(address owner, uint192 key) public view virtual returns (uint256) { - return (uint256(key) << 64) | _nonce[owner][key]; + return (uint256(key) << 64) | _nounces[owner][key]; } /** @@ -41,13 +41,13 @@ abstract contract NoncesSemiAbstracted is Nonces { */ function _useNonce(address owner, uint192 key) internal virtual returns (uint256) { // TODO: use unchecked here? Do we expect 2**64 nonce ever be used for a single owner? - return _nonce[owner][key]++; + return _nounces[owner][key]++; } /** * @dev Same as {_useNonce} but checking that `nonce` is the next valid for `owner`. * - * This version takes a the key and the nonce in a single uint256 parameter: + * This version takes the key and the nonce in a single uint256 parameter: * - use the first 8 bytes for the key * - use the last 24 bytes for the nonce */ @@ -58,7 +58,7 @@ abstract contract NoncesSemiAbstracted is Nonces { /** * @dev Same as {_useNonce} but checking that `nonce` is the next valid for `owner`. * - * This version takes a the key and the nonce as two different parameters. + * This version takes the key and the nonce as two different parameters. */ function _useCheckedNonce(address owner, uint192 key, uint64 nonce) internal virtual { uint256 current = _useNonce(owner, key);