# allowCheatcodes

Description: allowCheatcodes cheatcode documentation

Note: This document was authored using MDX

  Source: https://github.com/NomicFoundation/hardhat-website/tree/main/src/content/docs/docs/reference/cheatcodes/Forking/allow-cheatcodes.mdx

  Components used in this page:
    - :::note: An informational callout block. Supports custom title `:::note[Title]` and icon `:::note{icon="name"}` syntax.

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

### Signature

```solidity
function allowCheatcodes(address) external;
```

### Description

In forking mode, explicitly grant the given address cheatcode access.

By default, the test contract, and its deployer are allowed to access cheatcodes. In addition to that, cheatcode
access is granted if the contract was deployed by an address that already has cheatcode access.
This will prevent cheatcode access from accounts already deployed on the forked network.

:::note
This is only useful for more complex test setups in forking mode.
:::
