# LPManualWhitelist

This is an implementation of the [ILPWhitelist](https://docs.ensuro.co/ensuro-docs/smart-contracts/contracts/ilpwhitelist) interface that just has a mapping (address -> bool) indicating whether or not a liquidity provider with a given address is whitelisted.

All the addresses are blacklisted by default. To whitelist an address, an authorized user with the LP\_WHITELIST component role needs to call `whitelistAddress(provider, whitelisted)`.

## **Component roles**

The specific roles and functions of the contract are as follows:

<table><thead><tr><th>Role</th><th width="98" data-type="checkbox">Global*</th><th>Description</th><th>Methods Accessible</th></tr></thead><tbody><tr><td>LP_WHITELIST_ROLE</td><td>false</td><td><p></p><p>Whitelist or un-whitelist addresses manually.</p></td><td><ul><li><a href="#whitelistaddress">whitelistAddress</a>: Adds or removes provider addresses from the whitelist manually.</li></ul></td></tr><tr><td>LP_WHITELIST_ADMIN</td><td>false</td><td>Manages the LP whitelisting system.</td><td><ul><li>setWhitelistDefaults: Set the default whitelist status for LP addresses.</li></ul></td></tr></tbody></table>

( \* ) Global means that the role can be delegated to a user at the protocol level (for all components) or only for a specific component. Non-global roles can only be granted for a specific component.

## Events

### LPWhitelisted

```solidity
event LPWhitelisted(address provider, bool whitelisted)
```

| Name        | Type    | Description                              |
| ----------- | ------- | ---------------------------------------- |
| provider    | address | The address to be whitelisted.           |
| whitelisted | bool    | If `true`, the provider was whitelisted. |

## External Methods

### whitelistAddress

```solidity
function whitelistAddress(address provider, bool whitelisted) external
```
