# Token Contract

### Key Features

* **Token Minting:**  Controlled minting via MINTER\_ROLE with no supply cap.
* **Transfer Restriction:** Token transfers are initially disabled. Only addresses with TRANSFER\_ROLE, the owner, or mint operations can transfer tokens before transfers are enabled. Transfers can be permanently enabled via the admin using `enableTransfers()`.
* **Access Control Management:** Role-based access control using OpenZeppelin's AccessControlDefaultAdminRules
  * **Default Admin:** Grants the ability to enable transfers and manage roles.
  * **Transfer Role:** Addresses assigned TRANSFER\_ROLE can execute transfers even when transfers are disabled.
  * **Minter Role:** Addresses assigned MINTER\_ROLE are authorized to mint new tokens.

{% embed url="<https://github.com/bio-xyz/token-contracts>" %}

### Token Contract

**Features**

* **Role-Based Access Control**: Implements OpenZeppelin's AccessControlDefaultAdminRules
  * `DEFAULT_ADMIN_ROLE`: Can enable transfers and manage other roles
  * `MINTER_ROLE`: Can mint new tokens
  * `TRANSFER_ROLE`: Can transfer tokens before transfers are enabled
* **Controlled Token Transfers**:
  * Transfers are initially disabled
  * Only addresses with `TRANSFER_ROLE`, the owner, or minting operations can transfer tokens when transfers are disabled
  * Transfers can be enabled by admin (one-way operation - cannot be disabled once enabled)
* **Token Minting**:
  * Controlled minting through `MINTER_ROLE`
  * No maximum supply cap

**Inheritance**

* OpenZeppelin's ERC20
* OpenZeppelin's ERC20Burnable
* OpenZeppelin's AccessControlDefaultAdminRules

**Key Functions**

* `mint(address to, uint256 amount)`: Allows `MINTER_ROLE` to mint new tokens
* `enableTransfers()`: Allows admin to enable transfers for all holders
* `burn(uint256 amount)`: Allows token holders to burn their tokens (inherited from ERC20Burnable)


---

# 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.bio.xyz/bio/developers/dao-setup/evm-contracts/token-contract.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.
