# Fee Collector

## ITTUFeeCollector

*This contract handles TokenTable service fee calculation.*

### DefaultFeeSet

```solidity
event DefaultFeeSet(uint256 bips)
```

### CustomFeeSet

```solidity
event CustomFeeSet(address unlockerAddress, uint256 bips)
```

### getFee

```solidity
function getFee(address unlockerAddress, uint256 tokenTransferred) external view returns (uint256 tokensCollected)
```

Returns the amount of fees to collect.

#### Parameters

| Name             | Type    | Description                                         |
| ---------------- | ------- | --------------------------------------------------- |
| unlockerAddress  | address | The address of the Unlocker. Used to fetch pricing. |
| tokenTransferred | uint256 | The number of tokens transferred.                   |

#### Return Values

| Name            | Type    | Description                              |
| --------------- | ------- | ---------------------------------------- |
| tokensCollected | uint256 | The number of tokens to collect as fees. |


---

# 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.tokentable.xyz/for-developers/unlocker/evm/apis/utilities/fee-collector.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.
