> For the complete documentation index, see [llms.txt](https://docs-v4.nftx.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-v4.nftx.io/contracts/collection-token.md).

# Collection Token

Every collection supported by NFTX v4 gets its own `CollectionToken`, an ERC-20 that is the fungible representation of that ERC-721 collection — the collection's floor token. It's deployed as a minimal-proxy clone per collection, so `initialize` takes the place of a constructor. Minting and burning are owned by the [Locker](/contracts/locker.md), which keeps supply backed 1:1 by the NFTs it holds.

Signatures and descriptions below come from the `ICollectionToken` interface.

### `initialize`

Sets the initial token metadata, registers inherited contracts, and assigns ownership. Called once, at clone deployment.

```solidity
function initialize(string calldata name_, string calldata symbol_) external;
```

**Access:** `initializer` (callable once).

| Parameter | Type     | Description              |
| --------- | -------- | ------------------------ |
| `name_`   | `string` | The name for the token   |
| `symbol_` | `string` | The symbol for the token |

**Returns:** None.

### `mint`

Mints additional collection tokens. Restricted to the owner (the Locker), which mints on deposit.

```solidity
function mint(address _to, uint _amount) external;
```

**Access:** `onlyOwner`. Reverts if `_to` is the zero address.

| Parameter | Type      | Description                       |
| --------- | --------- | --------------------------------- |
| `_to`     | `address` | The recipient of the minted token |
| `_amount` | `uint`    | The number of tokens to mint      |

**Returns:** None.

### `setMetadata`

Updates the token's name and symbol — a safety valve for malformed, unintelligible, or offensive metadata. Emits `MetadataUpdated`.

```solidity
function setMetadata(string calldata name_, string calldata symbol_) external;
```

**Access:** `onlyOwner`.

| Parameter | Type     | Description                  |
| --------- | -------- | ---------------------------- |
| `name_`   | `string` | The new name for the token   |
| `symbol_` | `string` | The new symbol for the token |

**Returns:** None.

### `burn` / `burnFrom`

Destroys tokens. `burn` burns from the caller; `burnFrom` burns from another account, deducting from the caller's allowance.

```solidity
function burn(uint value) external;
function burnFrom(address account, uint value) external;
```

**Access:** public. `burnFrom` reverts if the caller has insufficient allowance.

| Parameter | Type      | Description                                       |
| --------- | --------- | ------------------------------------------------- |
| `account` | `address` | The account to burn tokens from (`burnFrom` only) |
| `value`   | `uint`    | The amount of tokens to burn                      |

**Returns:** None.

{% hint style="info" %}
Beyond these, `CollectionToken` is a standard ERC-20 (with permit) — `transfer`, `approve`, `balanceOf`, `allowance`, and so on behave as usual.
{% endhint %}
