# IWhitelist

Interface for managing address whitelisting

## Functions

### setWhitelisted

Set the address whitelisted status

```solidity
function setWhitelisted(address addr, bool isAddressWhitelisted) external;
```

**Parameters**

| Name                   | Type      | Description                                         |
| ---------------------- | --------- | --------------------------------------------------- |
| `addr`                 | `address` | The address to add/remove from the whitelist        |
| `isAddressWhitelisted` | `bool`    | Whether address should be whitelisted going forward |

### isWhitelisted

Checks if the address is whitelisted

```solidity
function isWhitelisted(address addr) external view returns (bool);
```

**Parameters**

| Name   | Type      | Description          |
| ------ | --------- | -------------------- |
| `addr` | `address` | The address to check |

**Returns**

| Name     | Type   | Description                                      |
| -------- | ------ | ------------------------------------------------ |
| `<none>` | `bool` | True if the addr is whitelisted, false otherwise |

### getAllWhitelisted

Get all whitelisted addresses

```solidity
function getAllWhitelisted() external view returns (address[] memory);
```

**Returns**

| Name     | Type        | Description                           |
| -------- | ----------- | ------------------------------------- |
| `<none>` | `address[]` | An array of all whitelisted addresses |

## Events

### WhitelistSet

Emitted when an address whitelist status is updated

```solidity
event WhitelistSet(address indexed addr, bool isAddressWhitelisted);
```

**Parameters**

| Name                   | Type      | Description                                   |
| ---------------------- | --------- | --------------------------------------------- |
| `addr`                 | `address` | The address whose whitelist status is updated |
| `isAddressWhitelisted` | `bool`    | Whether the address is whitelisted            |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.aera.finance/the-protocol/core/iwhitelist.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
