From 283140c4d6a89bcdb05596b9006dd5602a582187 Mon Sep 17 00:00:00 2001 From: Alex Forshtat Date: Wed, 18 Sep 2024 17:56:51 +0200 Subject: [PATCH] Add comment describing the data format --- contracts/predeploys/NonceManager.sol | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/contracts/predeploys/NonceManager.sol b/contracts/predeploys/NonceManager.sol index d241fb7..f264937 100644 --- a/contracts/predeploys/NonceManager.sol +++ b/contracts/predeploys/NonceManager.sol @@ -11,6 +11,13 @@ contract NonceManager { /// @notice The EntryPoint address defined at RIP-7560. address internal constant AA_ENTRY_POINT = 0x0000000000000000000000000000000000007560; + /// @notice There are no public functions in the NonceManager and the action is determined by the caller address. + /// + /// In order to query the current 'nonceSequence' of an address for a given 'nonceKey' make a view call with data: + /// sender{20 bytes} nonceKey{32 bytes} + /// + /// In order to validate and increment the current 'nonceSequence' of an address AA_ENTRY_POINT calls it with data: + /// sender{20 bytes} nonceKey{32 bytes} nonceSequence{32 bytes} fallback(bytes calldata data) external returns (bytes memory) { if (msg.sender == AA_ENTRY_POINT) { _validateIncrement(data);