Module INonce
Expand description
Nonce interface for managing 2D nonces as per the Account Abstraction spec.
This precompile manages user nonce keys (1-N) while protocol nonces (key 0) are handled directly by account state. Each account can have multiple independent nonce sequences identified by a nonce key.
interface INonce {
function getNonce(address account, uint256 nonceKey) external view returns (uint64 nonce);
function getActiveNonceKeyCount(address account) external view returns (uint256 count);
event NonceIncremented(address indexed account, uint256 indexed nonceKey, uint64 newNonce);
event ActiveKeyCountChanged(address indexed account, uint256 newCount);
error ProtocolNonceNotSupported();
error InvalidNonceKey();
error NonceOverflow();
}Modules§
- abi
- Contains dynamic ABI definitions for this contract.
Structs§
- Active
KeyCount Changed - Event with signature
ActiveKeyCountChanged(address,uint256)and selector0x213a3328d23da89e0b3bd14e43c4fdffe45f7cf41ccf635cb3883609da35bad5. - INonce
Instance - A
INonceinstance. - Invalid
Nonce Key - Custom error with signature
InvalidNonceKey()and selector0xdf9b1c41. - Nonce
Incremented - Event with signature
NonceIncremented(address,uint256,uint64)and selector0x42d98041765078b1557c6a9fe7e4a27230ca413fc141df57d89acd6cc68ffb45. - Nonce
Overflow - Custom error with signature
NonceOverflow()and selector0xadc15572. - Protocol
Nonce NotSupported - Custom error with signature
ProtocolNonceNotSupported()and selector0x1bc81ca9. - getActive
Nonce KeyCount Call - Get the number of active nonce keys for an account
@param account The account address
@return count The number of nonce keys that have been used (nonce > 0)
Function with signature
getActiveNonceKeyCount(address)and selector0x90b8a41f. - getActive
Nonce KeyCount Return - Get the number of active nonce keys for an account
@param account The account address
@return count The number of nonce keys that have been used (nonce > 0)
Container type for the return parameters of the
getActiveNonceKeyCount(address)function. - getNonce
Call - Get the current nonce for a specific account and nonce key
@param account The account address
@param nonceKey The nonce key (must be > 0, protocol nonce key 0 not supported)
@return nonce The current nonce value
Function with signature
getNonce(address,uint256)and selector0x89535803. - getNonce
Return - Get the current nonce for a specific account and nonce key
@param account The account address
@param nonceKey The nonce key (must be > 0, protocol nonce key 0 not supported)
@return nonce The current nonce value
Container type for the return parameters of the
getNonce(address,uint256)function.
Enums§
- INonce
Calls - Container for all the
INoncefunction calls. - INonce
Errors - Container for all the
INoncecustom errors. - INonce
Events - Container for all the
INonceevents.