Skip to content
Lattice

Nonces

Git Source

Title: Nonces

Author: Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Nonces.sol)

Thin facet exposing the nonces(address) view for per-account nonce tracking.

Other nonce operations (useNonce, useCheckedNonce) are internal helpers consumed by other modules (e.g. ERC20Permit). Only the query function needs a public entry point.

Notes:

  • lattice-version: 0.1.0
  • lattice-source: OpenZeppelin v5.1.0

Functions

nonces

Returns the current nonce for the given owner.

function nonces(address owner) public view virtual returns (uint256);

Parameters

NameTypeDescription
owneraddressThe address to query.

Returns

NameTypeDescription
<none>uint256The current nonce for the account.

exportSelectors

ERC-8153 selector export: this facet's cuttable selectors, tightly packed (4 bytes each).

Excludes exportSelectors() itself (0x0ef22643) - it is never cut into a diamond. Order matches forge inspect Nonces methodIdentifiers (alphabetical by signature); kept in exact parity by ExportSelectorsParityTest. Chunks: nonces(address) 0x7ecebe00

function exportSelectors() external pure virtual returns (bytes memory selectors);

Returns

NameTypeDescription
selectorsbytes