# Whitelist

**Inherits:** IWhitelist, Auth2Step

Contract for managing a whitelist of addresses

## State Variables

### whitelist

Mapping of addresses to whether they are whitelisted

```solidity
EnumerableMap.AddressToUintMap internal whitelist;
```

## Functions

### constructor

```solidity
constructor(address initialOwner, Authority initialAuthority) Auth2Step(initialOwner, initialAuthority);
```

### setWhitelisted

Set the address whitelisted status

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

**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 |
