Skip to content

Latest commit

 

History

History
22 lines (15 loc) · 492 Bytes

get_nonce.md

File metadata and controls

22 lines (15 loc) · 492 Bytes

getNonce

Description

The getNonce cheatcode will get the current nonce of account.

Example

// Obtain our cheat code contract reference.
IStdCheats cheats = CheatCodes(0x7109709ECfa91a80626fF3989D68f67F5b1DD12D);

// Get nonce and verify that the sender has sent at least one transaction
address acc = address(msg.sender);
assert(cheats.getNonce(acc) > 0);

Function Signature

function getNonce(address account) external returns (uint64);