Skip to content
Lattice

INonces

Git Source

Title: INonces

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

Interface for tracking per-account nonces used in replay-protection schemes.

Functions

nonces

Returns the current nonce for the given owner.

function nonces(address owner) external view returns (uint256);

Parameters

NameTypeDescription
owneraddressThe address to query.

Returns

NameTypeDescription
<none>uint256The current nonce.

Errors

InvalidAccountNonce

Thrown when an account nonce is used with an incorrect expected value.

error InvalidAccountNonce(address account, uint256 currentNonce);

Parameters

NameTypeDescription
accountaddressThe account whose nonce was checked.
currentNonceuint256The current (correct) nonce for the account.