From bf2d786700cb857d114dc635f10dde6851dc7fb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ernesto=20Garc=C3=ADa?= Date: Tue, 26 Nov 2024 11:48:53 -0600 Subject: [PATCH] Update contracts/utils/NoncesKeyed.sol --- contracts/utils/NoncesKeyed.sol | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contracts/utils/NoncesKeyed.sol b/contracts/utils/NoncesKeyed.sol index d7bfcc27afc..4d030f72df4 100644 --- a/contracts/utils/NoncesKeyed.sol +++ b/contracts/utils/NoncesKeyed.sol @@ -8,9 +8,9 @@ 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]. * - * Note: This contract extends {Nonces}, and reuses {Nonces}'s storage for key #0. This makes upgrading from {Nonces} - * to {NoncesKeyed} safe, as such an upgrade will NOT reset the current state of nonces. Doing otherwise would enable - * replay attacks where operation that used nonces before the upgrade would be replayable after the upgrade. + * NOTE: This contract inherits from {Nonces} and reuses its storage for the first nonce key (i.e. `0`). This + * makes upgrading from {Nonces} to {NoncesKeyed} safe. Doing so will NOT reset the current state of nonces to + * avoid replay attacks where a nonce is reused after the upgrade. */ abstract contract NoncesKeyed is Nonces { mapping(address owner => mapping(uint192 key => uint64)) private _nonces;