# setNonce

Description: setNonce cheatcode documentation

Note: This document was authored using MDX

  Source: https://github.com/NomicFoundation/hardhat-website/tree/main/src/content/docs/docs/reference/cheatcodes/Environment/set-nonce.mdx

{/* This document contains content copied/adapted from the Foundry Book (MIT licensed). See LICENSE in the parent directory. */}

### Signature

```solidity
function setNonce(address account, uint64 nonce) external;
```

### Description

Sets the nonce of the given account.

The new nonce must be higher than the current nonce of the account.

### Examples

```solidity
vm.setNonce(address(100), 1234);
```
