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

# DeBridgeToken

> DeBridgeToken contract details - fields and functions.

ERC20 token that is used as wrapped asset to represent the native token value on the other chains.

***

## Variables

### MINTER\_ROLE

```solidity theme={null}
bytes32 public constant MINTER_ROLE;
```

Minter role identifier

### PAUSER\_ROLE

```solidity theme={null}
bytes32 public constant PAUSER_ROLE;
```

Pauser role identifier

### DOMAIN\_SEPARATOR

```solidity theme={null}
bytes32 public DOMAIN_SEPARATOR;
```

Domain separator as described in [EIP-712](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-712.md#rationale)

### PERMIT\_TYPEHASH

```solidity theme={null}
bytes32 public constant PERMIT_TYPEHASH;
```

Typehash as described in [EIP-712](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-712.md#rationale).

```
typehash = keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)")
```

### nonces

```solidity theme={null}
mapping(address => uint256) public nonces;
```

Transfers counter

### \_decimals

```solidity theme={null}
uint8 internal _decimals;
```

Asset's decimals

***

## Functions

### initialize

```solidity theme={null}
function initialize(
    string name_,
    string symbol_,
    uint8 decimals_,
    address admin,
    address[] minters
) public
```

Constructor that initializes the most important configurations.

#### Parameters:

| Name       | Type       | Description                              |
| ---------- | ---------- | ---------------------------------------- |
| name\_     | string     | Asset's name.                            |
| symbol\_   | string     | Asset's symbol.                          |
| decimals\_ | uint8      | Asset's decimals.                        |
| admin      | address    | Address to set as asset's admin.         |
| minters    | address\[] | The accounts allowed to mint new tokens. |

***

### mint

```solidity theme={null}
function mint(
    address _receiver,
    uint256 _amount
) external
```

Issues new tokens.

#### Parameters:

| Name       | Type    | Description          |
| ---------- | ------- | -------------------- |
| \_receiver | address | Token's receiver.    |
| \_amount   | uint256 | Amount to be minted. |

***

### burn

```solidity theme={null}
function burn(
    uint256 _amount
) external
```

Destroys existing tokens.

#### Parameters:

| Name     | Type    | Description         |
| -------- | ------- | ------------------- |
| \_amount | uint256 | Amount to be burnt. |

***

### permit

```solidity theme={null}
function permit(
    address _owner,
    address _spender,
    uint256 _value,
    uint256 _deadline,
    uint8 _v,
    bytes32 _r,
    bytes32 _s
) external
```

Approves the spender by signature.

#### Parameters:

| Name       | Type    | Description             |
| ---------- | ------- | ----------------------- |
| \_owner    | address | Token's owner.          |
| \_spender  | address | Account to be approved. |
| \_value    | uint256 | Amount to be approved.  |
| \_deadline | uint256 | The permit valid until. |
| \_v        | uint8   | Signature part.         |
| \_r        | bytes32 | Signature part.         |
| \_s        | bytes32 | Signature part.         |

***

### decimals

```solidity theme={null}
function decimals() public returns (uint8)
```

Asset's decimals

***

### pause

```solidity theme={null}
function pause() public
```

Pauses all token transfers. The caller must have the `PAUSER_ROLE`.

***

### unpause

```solidity theme={null}
function unpause() public
```

Unpauses all token transfers. The caller must have the `PAUSER_ROLE`.

***

### \_beforeTokenTransfer

```solidity theme={null}
function _beforeTokenTransfer(
    address from,
    address to,
    uint256 amount
) internal
```
