> **Can't find what you're looking for?** Use `search_docs` on the docs MCP server at `https://www.getfoundry.sh/api/mcp` to find what you need.
>
> **Have feedback?** Use `submit_feedback` on the same MCP server.

## `cool`

### Signature

```solidity
function cool(address target) external;
```

### Description

Marks the account `target` and every storage slot of it that the current transaction has loaded as cold. Under [EIP-2929](https://eips.ethereum.org/EIPS/eip-2929), the next access to the account, such as `BALANCE`, `EXTCODESIZE` or a call, costs 2600 gas instead of 100, and the next read of each slot costs 2100 gas instead of 100.

Storage values, balance, nonce and code are unchanged.

### Parameters

| Parameter | Type      | Description                   |
|-----------|-----------|-------------------------------|
| `target`  | `address` | The account to mark as cold   |

### Examples

```solidity [test/Warmth.t.sol]
// [!include ~/snippets/projects/storage_warmth/test/Warmth.t.sol:cool]
```

```bash
$ forge test --root src/snippets/projects/storage_warmth --match-contract WarmthTest
```

### Gotchas

* Precompiles and the transaction's `block.coinbase` ([EIP-3651](https://eips.ethereum.org/EIPS/eip-3651)) stay warm, as do the accounts in the running transaction's access list. The transaction's recipient, such as the test contract, is cooled.
* With [call isolation](/forge/testing#call-isolation), the default, each top-level call from the test runs as its own transaction, so the slots of another contract are cold in the next call to it anyway. `cool` still cools the account in the test's own transaction, so the test's next call to it pays the 2600 gas cold account access instead of 100.

### Related Cheatcodes

* [`coolSlot`](/reference/cheatcodes/cool-slot) - Marks one storage slot as cold
* [`warmSlot`](/reference/cheatcodes/warm-slot) - Marks a storage slot as warm
