Skip to content

Commit

Permalink
Add comment describing the data format
Browse files Browse the repository at this point in the history
  • Loading branch information
forshtat committed Sep 18, 2024
1 parent 20d43a6 commit 283140c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions contracts/predeploys/NonceManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 283140c

Please sign in to comment.