# TokenManager

TokenManagers can be applied to your contracts in order to govern how your tokens can be transferred or have their metadata updated. You can write your own custom logic, set the TokenManager to your contract, and your hooks will be invoked before the metadata update function or the transfer function can be successfully invoked.&#x20;

A simple example of how you might use this is to freeze the metadata for your whole collection, or specific tokens, to demonstrate to holders that it can never change. Another simple example is creating soulbound tokens. More complex or novel examples might involve letting owners update the metadata for their own tokens, or letting anybody update token metadata based on specific criteria, or even letting groups of users vote on decisions to transfer tokens not owned by them.

See the interface at [ITokenManager](https://github.com/highlightxyz/hl-evm-contracts/blob/main/contracts/tokenManager/interfaces/ITokenManager.sol).sol for all the relevant functions, notably `canSwap` and `canRemoveItself` which allow the modules themselves to dictate whether they can be swapped out for another module. This allows developers to write modules which contain logic about whether or not they can be replaced, allowing you to do things like provably freezing metadata for a token set.&#x20;

See the TokenManager [directory](https://github.com/highlightxyz/hl-evm-contracts/tree/main/contracts/tokenManager) in Github for example implementations and more ideas about how this can be used.&#x20;


---

# 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://support.highlight.xyz/knowledge-base/for-developers/management-modules/tokenmanager.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.
