# expectSafeMemory

Description: expectSafeMemory cheatcode documentation

Note: This document was authored using MDX

  Source: https://github.com/NomicFoundation/hardhat-website/tree/main/src/content/docs/docs/reference/cheatcodes/Assertions/expect-safe-memory.mdx

### Signature

```solidity
function expectSafeMemory(uint64 min, uint64 max) external;
```

### Description

Only allows memory writes to offsets [0x00, 0x60) ∪ [min, max) in the current subcontext. If any other
memory is written to, the test will fail. Can be called multiple times to add more ranges to the set.
