# ILPWhitelist

This is an optional component. If present it controls which Liquidity Providers can deposit or transfer their *eTokens*.

Each *eToken* has a `whitelist` parameter that if not null, points to a contract following this interface. Several *eTokens* can share the same whitelist contract or they can different ones.

## External Methods

### acceptsDeposit

```solidity
function acceptsDeposit(contract IEToken etoken, address provider, uint256 amount) external view returns (bool)
```

Indicates whether or not a liquidity provider can do a deposit in an eToken.

| Name     | Type             | Description                                                          |
| -------- | ---------------- | -------------------------------------------------------------------- |
| etoken   | contract IEToken | The eToken (see {EToken}) where the provider wants to deposit money. |
| provider | address          | The address of the liquidity provider (user) that wants to deposit   |
| amount   | uint256          | The amount of the deposit                                            |

| Name | Type | Description                                          |
| ---- | ---- | ---------------------------------------------------- |
| \[0] | bool | true if `provider` deposit is accepted, false if not |

### acceptsTransfer

```solidity
function acceptsTransfer(contract IEToken etoken, address providerFrom, address providerTo, uint256 amount) external view returns (bool)
```

Indicates whether or not the eTokens can be transferred from `providerFrom` to `providerTo`

| Name         | Type             | Description                                                            |
| ------------ | ---------------- | ---------------------------------------------------------------------- |
| etoken       | contract IEToken | The eToken (see {EToken}) that the LPs have the intention to transfer. |
| providerFrom | address          | The current owner of the tokens                                        |
| providerTo   | address          | The destination of the tokens if the transfer is accepted              |
| amount       | uint256          | The amount of tokens to be transferred                                 |

| Name | Type | Description                                               |
| ---- | ---- | --------------------------------------------------------- |
| \[0] | bool | true if the transfer operation is accepted, false if not. |


---

# 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.ensuro.co/ensuro-docs/smart-contracts/contracts/ilpwhitelist.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.
