> ## Documentation Index
> Fetch the complete documentation index at: https://docs.unvest.io/llms.txt
> Use this file to discover all available pages before exploring further.

# IFactoryFeeManager.sol

# IFactoryFeeManager

[Git Source](https://github.com/Unvest/protocol/blob/10af66632cb2249fdd76dc9760d2679b39ca2a8f/src/interfaces/IFactoryFeeManager.sol)

**Inherits:**
[IFeeManager](/smart-contracts/protocol/interfaces/IFeeManager.sol)

*Interface that describes the struct and accessor function for the data related to the collection of fees.*

## Functions

### setFeeCollector

FUNCTIONS

\*Set address of fee collector.
Requirements:

* `msg.sender` has to be the owner of the contract.
* `newFeeCollector` can't be address 0x0.\*

```solidity theme={null}
function setFeeCollector(address newFeeCollector) external;
```

**Parameters**

| Name              | Type      | Description                |
| ----------------- | --------- | -------------------------- |
| `newFeeCollector` | `address` | Address of `feeCollector`. |

### scheduleGlobalCreationFee

Sets a new global creation fee value, to take effect after 1 hour.

```solidity theme={null}
function scheduleGlobalCreationFee(uint64 newFeeValue) external;
```

**Parameters**

| Name          | Type     | Description                                                                   |
| ------------- | -------- | ----------------------------------------------------------------------------- |
| `newFeeValue` | `uint64` | Value for `creationFee` that will be charged on `VestingToken`'s deployments. |

### scheduleGlobalTransferFee

Sets a new global transfer fee percentage, to take effect after 1 hour.

\*Percentages and fees are calculated using 18 decimals where 1 ether is 100%.
Requirements:

* `newFeePercentage` must be within minTransferFee and maxTransferFee.\*

```solidity theme={null}
function scheduleGlobalTransferFee(uint64 newFeePercentage) external;
```

**Parameters**

| Name               | Type     | Description                                                                           |
| ------------------ | -------- | ------------------------------------------------------------------------------------- |
| `newFeePercentage` | `uint64` | Value for `transferFeePercentage` that will be charged on `VestingToken`'s transfers. |

### scheduleGlobalClaimFee

Sets a new global claim fee value, to take effect after 1 hour.

```solidity theme={null}
function scheduleGlobalClaimFee(uint64 newFeeValue) external;
```

**Parameters**

| Name          | Type     | Description                                                           |
| ------------- | -------- | --------------------------------------------------------------------- |
| `newFeeValue` | `uint64` | Value for `claimFee` that will be charged on `VestingToken`'s claims. |

### scheduleCustomCreationFee

Sets a new custom creation fee value for a specific underlying token, to be enabled and take effect
after 1 hour from the time of this transaction.

\*Allows the contract owner to modify the creation fee associated with a specific underlying token.
The new fee becomes effective after a delay of 1 hour, aiming to provide a buffer for users to be aware of the
upcoming fee change.
This function updates the fee and schedules its activation, ensuring transparency and predictability in fee
adjustments.
The fee is specified in wei, allowing for granular control over the fee structure. Emits a
`CustomCreationFeeChange` event upon successful fee update.
Requirements:

* The caller must have owner privileges to execute this function.\*

```solidity theme={null}
function scheduleCustomCreationFee(address underlyingToken, uint64 newFeeValue) external;
```

**Parameters**

| Name              | Type      | Description                                                                                          |
| ----------------- | --------- | ---------------------------------------------------------------------------------------------------- |
| `underlyingToken` | `address` | Address of the `underlyingToken`.                                                                    |
| `newFeeValue`     | `uint64`  | The new creation fee amount to be set, in wei, to replace the current fee after the specified delay. |

### scheduleCustomTransferFee

Sets a new custom transfer fee percentage for a specific underlying token, to be enabled and take effect
after 1 hour from the time of this transaction.

\*This function allows the contract owner to adjust the transfer fee for an underlying token.
The fee adjustment is delayed by 1 hour to provide transparency and predictability. Fees are calculated with
precision to 18 decimal places, where 1 ether equals 100% fee.
The function enforces fee limits; `newFeePercentage` must be within the predefined 0-`MAX_TRANSFER_FEE` bounds.
If the custom fee was previously disabled or set to a different value, this operation schedules the new fee to
take effect after the delay, enabling it if necessary.
Emits a `CustomTransferFeeChange` event upon successful execution.
Requirements:

* Caller must be the contract owner.
* `newFeePercentage` must be within the range limited by `MAX_TRANSFER_FEE`.\*

```solidity theme={null}
function scheduleCustomTransferFee(address underlyingToken, uint64 newFeePercentage) external;
```

**Parameters**

| Name               | Type      | Description                                                                                                                |
| ------------------ | --------- | -------------------------------------------------------------------------------------------------------------------------- |
| `underlyingToken`  | `address` | Address of the `underlyingToken`.                                                                                          |
| `newFeePercentage` | `uint64`  | The new transfer fee percentage to be applied, expressed in ether terms (18 decimal places) where 1 ether represents 100%. |

### scheduleCustomClaimFee

Sets a new custom claim fee value for a specific underlying token, to be enabled and take effect
after 1 hour from the time of this transaction.

\*Allows the contract owner to modify the claim fee associated with a specific underlying token.
The new fee becomes effective after a delay of 1 hour, aiming to provide a buffer for users to be aware of the
upcoming fee change.
This function updates the fee and schedules its activation, ensuring transparency and predictability in fee
adjustments.
The fee is specified in wei, allowing for granular control over the fee structure. Emits a
`CustomClaimFeeChange` event upon successful fee update.
Requirements:

* The caller must have owner privileges to execute this function.\*

```solidity theme={null}
function scheduleCustomClaimFee(address underlyingToken, uint64 newFeeValue) external;
```

**Parameters**

| Name              | Type      | Description                                                                                       |
| ----------------- | --------- | ------------------------------------------------------------------------------------------------- |
| `underlyingToken` | `address` | Address of the `underlyingToken`.                                                                 |
| `newFeeValue`     | `uint64`  | The new claim fee amount to be set, in wei, to replace the current fee after the specified delay. |

### toggleCustomCreationFee

Enables or disables the custom creation fee for a given underlying token, with the change taking effect
after 1 hour.

```solidity theme={null}
function toggleCustomCreationFee(address underlyingToken, bool enable) external;
```

**Parameters**

| Name              | Type      | Description                                  |
| ----------------- | --------- | -------------------------------------------- |
| `underlyingToken` | `address` | Address of the `underlyingToken`.            |
| `enable`          | `bool`    | True to enable the fee, false to disable it. |

### toggleCustomTransferFee

Enables or disables the custom transfer fee for a given underlying token, to take effect after 1 hour.

```solidity theme={null}
function toggleCustomTransferFee(address underlyingToken, bool enable) external;
```

**Parameters**

| Name              | Type      | Description                                  |
| ----------------- | --------- | -------------------------------------------- |
| `underlyingToken` | `address` | Address of the `underlyingToken`.            |
| `enable`          | `bool`    | True to enable the fee, false to disable it. |

### toggleCustomClaimFee

Enables or disables the custom claim fee for a given underlying token, with the change taking effect
after 1 hour.

```solidity theme={null}
function toggleCustomClaimFee(address underlyingToken, bool enable) external;
```

**Parameters**

| Name              | Type      | Description                                  |
| ----------------- | --------- | -------------------------------------------- |
| `underlyingToken` | `address` | Address of the `underlyingToken`.            |
| `enable`          | `bool`    | True to enable the fee, false to disable it. |

### minTransferFee

*Exposes the minimum transfer fee.*

```solidity theme={null}
function minTransferFee() external pure returns (uint64);
```

### maxTransferFee

*Exposes the maximum transfer fee.*

```solidity theme={null}
function maxTransferFee() external pure returns (uint64);
```

### feeCollector

Exposes the `FeeData.feeCollector` to users.

```solidity theme={null}
function feeCollector() external view returns (address);
```

### globalCreationFee

Retrieves the current global creation fee to users.

```solidity theme={null}
function globalCreationFee() external view returns (uint64);
```

### globalTransferFee

Retrieves the current global transfer fee percentage to users.

```solidity theme={null}
function globalTransferFee() external view returns (uint64);
```

### globalClaimFee

Retrieves the current global claim fee to users.

```solidity theme={null}
function globalClaimFee() external view returns (uint64);
```

### creationFeeData

Returns the current creation fee for a specific underlying token, considering any pending updates.

```solidity theme={null}
function creationFeeData(address underlyingToken)
    external
    view
    override
    returns (address feeCollectorAddress, uint64 creationFeeValue);
```

**Parameters**

| Name              | Type      | Description                       |
| ----------------- | --------- | --------------------------------- |
| `underlyingToken` | `address` | Address of the `underlyingToken`. |

### transferFeeData

Returns the current transfer fee for a specific underlying token, considering any pending updates.

```solidity theme={null}
function transferFeeData(address underlyingToken)
    external
    view
    override
    returns (address feeCollectorAddress, uint64 transferFeePercentage);
```

**Parameters**

| Name              | Type      | Description                       |
| ----------------- | --------- | --------------------------------- |
| `underlyingToken` | `address` | Address of the `underlyingToken`. |

### claimFeeData

Returns the current claim fee for a specific underlying token, considering any pending updates.

```solidity theme={null}
function claimFeeData(address underlyingToken)
    external
    view
    override
    returns (address feeCollectorAddress, uint64 claimFeeValue);
```

**Parameters**

| Name              | Type      | Description                       |
| ----------------- | --------- | --------------------------------- |
| `underlyingToken` | `address` | Address of the `underlyingToken`. |

## Events

### FeeCollectorChange

EVENTS

```solidity theme={null}
event FeeCollectorChange(address indexed feeCollector);
```

**Parameters**

| Name           | Type      | Description                       |
| -------------- | --------- | --------------------------------- |
| `feeCollector` | `address` | Address of the new fee collector. |

### GlobalCreationFeeChange

```solidity theme={null}
event GlobalCreationFeeChange(uint64 creationFeeValue);
```

**Parameters**

| Name               | Type     | Description                     |
| ------------------ | -------- | ------------------------------- |
| `creationFeeValue` | `uint64` | Value for the new creation fee. |

### GlobalTransferFeeChange

```solidity theme={null}
event GlobalTransferFeeChange(uint64 transferFeePercentage);
```

**Parameters**

| Name                    | Type     | Description                     |
| ----------------------- | -------- | ------------------------------- |
| `transferFeePercentage` | `uint64` | Value for the new transfer fee. |

### GlobalClaimFeeChange

```solidity theme={null}
event GlobalClaimFeeChange(uint64 claimFeeValue);
```

**Parameters**

| Name            | Type     | Description                  |
| --------------- | -------- | ---------------------------- |
| `claimFeeValue` | `uint64` | Value for the new claim fee. |

### CustomCreationFeeChange

```solidity theme={null}
event CustomCreationFeeChange(address indexed underlyingToken, uint64 creationFeeValue);
```

**Parameters**

| Name               | Type      | Description                      |
| ------------------ | --------- | -------------------------------- |
| `underlyingToken`  | `address` | Address of the underlying token. |
| `creationFeeValue` | `uint64`  | Value for the new creation fee.  |

### CustomCreationFeeToggle

```solidity theme={null}
event CustomCreationFeeToggle(address indexed underlyingToken, bool enable);
```

**Parameters**

| Name              | Type      | Description                             |
| ----------------- | --------- | --------------------------------------- |
| `underlyingToken` | `address` | Address of the underlying token.        |
| `enable`          | `bool`    | Indicates the enabled state of the fee. |

### CustomTransferFeeChange

```solidity theme={null}
event CustomTransferFeeChange(address indexed underlyingToken, uint64 transferFeePercentage);
```

**Parameters**

| Name                    | Type      | Description                      |
| ----------------------- | --------- | -------------------------------- |
| `underlyingToken`       | `address` | Address of the underlying token. |
| `transferFeePercentage` | `uint64`  | Value for the new transfer fee.  |

### CustomTransferFeeToggle

```solidity theme={null}
event CustomTransferFeeToggle(address indexed underlyingToken, bool enable);
```

**Parameters**

| Name              | Type      | Description                             |
| ----------------- | --------- | --------------------------------------- |
| `underlyingToken` | `address` | Address of the underlying token.        |
| `enable`          | `bool`    | Indicates the enabled state of the fee. |

### CustomClaimFeeChange

```solidity theme={null}
event CustomClaimFeeChange(address indexed underlyingToken, uint64 claimFeeValue);
```

**Parameters**

| Name              | Type      | Description                      |
| ----------------- | --------- | -------------------------------- |
| `underlyingToken` | `address` | Address of the underlying token. |
| `claimFeeValue`   | `uint64`  | Value for the new claim fee.     |

### CustomClaimFeeToggle

```solidity theme={null}
event CustomClaimFeeToggle(address indexed underlyingToken, bool enable);
```

**Parameters**

| Name              | Type      | Description                             |
| ----------------- | --------- | --------------------------------------- |
| `underlyingToken` | `address` | Address of the underlying token.        |
| `enable`          | `bool`    | Indicates the enabled state of the fee. |
