# IBeforeTransferHook

Interface for token transfer hooks used for vault units in multi-depositor vaults

## Functions

### setIsVaultUnitsTransferable

Set whether vault units should be transferable

```solidity
function setIsVaultUnitsTransferable(address vault, bool isTransferable) external;
```

**Parameters**

| Name             | Type      | Description                              |
| ---------------- | --------- | ---------------------------------------- |
| `vault`          | `address` | The vault to update status for           |
| `isTransferable` | `bool`    | Whether the vault units are transferable |

### beforeTransfer

Perform before transfer checks

```solidity
function beforeTransfer(address from, address to, address transferAgent) external view;
```

**Parameters**

| Name            | Type      | Description                                          |
| --------------- | --------- | ---------------------------------------------------- |
| `from`          | `address` | Address that is sending the units                    |
| `to`            | `address` | Address that is receiving the units                  |
| `transferAgent` | `address` | Address that is always allowed to transfer the units |

## Events

### VaultUnitTransferableSet

Emitted when vault unit transferability is updated

```solidity
event VaultUnitTransferableSet(address indexed vault, bool isTransferable);
```

**Parameters**

| Name             | Type      | Description                              |
| ---------------- | --------- | ---------------------------------------- |
| `vault`          | `address` | The vault address                        |
| `isTransferable` | `bool`    | Whether the vault units are transferable |

## Errors

### Aera\_\_NotVaultOwner

```solidity
error Aera__NotVaultOwner();
```

### Aera\_\_VaultUnitsNotTransferable

```solidity
error Aera__VaultUnitsNotTransferable(address vault);
```


---

# 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/ibeforetransferhook.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.
