Module INonce

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§

ActiveKeyCountChanged
Event with signature ActiveKeyCountChanged(address,uint256) and selector 0x213a3328d23da89e0b3bd14e43c4fdffe45f7cf41ccf635cb3883609da35bad5.
INonceInstance
A INonce instance.
InvalidNonceKey
Custom error with signature InvalidNonceKey() and selector 0xdf9b1c41.
NonceIncremented
Event with signature NonceIncremented(address,uint256,uint64) and selector 0x42d98041765078b1557c6a9fe7e4a27230ca413fc141df57d89acd6cc68ffb45.
NonceOverflow
Custom error with signature NonceOverflow() and selector 0xadc15572.
ProtocolNonceNotSupported
Custom error with signature ProtocolNonceNotSupported() and selector 0x1bc81ca9.
getActiveNonceKeyCountCall
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 selector 0x90b8a41f.
getActiveNonceKeyCountReturn
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.
getNonceCall
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 selector 0x89535803.
getNonceReturn
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§

INonceCalls
Container for all the INonce function calls.
INonceErrors
Container for all the INonce custom errors.
INonceEvents
Container for all the INonce events.

Functions§

new
Creates a new wrapper around an on-chain INonce contract instance.