# revokePersistent

Description: revokePersistent 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/revoke-persistent.mdx

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

### Signature

```solidity
function revokePersistent(address) external;
function revokePersistent(address[] calldata) external;
```

### Description

The counterpart of [`makePersistent`](/docs/reference/cheatcodes/forking/make-persistent), that makes the given contract not persistent across fork swaps

### Examples

Revoke a persistent status of a contract

```solidity
contract SimpleStorageContract {
  string public value;

  function set(uint256 _value) public {
    value = _value;
  }
}

function testRevokePersistent() public {
  // select a specific fork
  cheats.selectFork(mainnetFork);

  // create a new contract that's stored in the `mainnetFork` storage
  SimpleStorageContract simple = new SimpleStorageContract();

  // `simple` is not marked as persistent
  assert(!cheats.isPersistent(address(simple)));

  // make it persistent
  cheats.makePersistent(address(simple));

  // ensure it is persistent
  assert(cheats.isPersistent(address(simple)));

  // revoke it
  cheats.revokePersistent(address(simple));

  // contract no longer persistent
  assert(!cheats.isPersistent(address(simple)));
}
```

### SEE ALSO

- [isPersistent](/docs/reference/cheatcodes/forking/is-persistent)
- [revokePersistent](/docs/reference/cheatcodes/forking/revoke-persistent)
- [createFork](/docs/reference/cheatcodes/forking/create-fork)
- [selectFork](/docs/reference/cheatcodes/forking/select-fork)
