Skip to main content

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);
    event NonceIncremented(address indexed account, uint256 indexed nonceKey, uint64 newNonce);
    error ProtocolNonceNotSupported();
    error InvalidNonceKey();
    error NonceOverflow();
    error ExpiringNonceReplay();
    error ExpiringNonceSetFull();
    error InvalidExpiringNonceExpiry();
}

Modules§

abi
Contains dynamic ABI definitions for this contract.

Structs§

ExpiringNonceReplay
Returned when an expiring nonce tx hash has already been seen Custom error with signature ExpiringNonceReplay() and selector 0x4ba8e2af.
ExpiringNonceSetFull
Returned when the expiring nonce seen set is at capacity Custom error with signature ExpiringNonceSetFull() and selector 0x4adf682a.
INonceInstance
A INonce instance.
InvalidExpiringNonceExpiry
Returned when valid_before is not within the allowed window Custom error with signature InvalidExpiringNonceExpiry() and selector 0xd54ed552.
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.
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.