> For the complete documentation index, see [llms.txt](https://raiden-network.gitbook.io/raiden-network/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://raiden-network.gitbook.io/raiden-network/raiden-api-1/resources/testing.md).

# Testing

You can mint tokens for testing purposes by making a request to the \_testing endpoint.

| HTTP Method | Resource                                                                                                               | Description |
| ----------- | ---------------------------------------------------------------------------------------------------------------------- | ----------- |
| POST        | [`/api/<version>/_testing/tokens/<token_address>/mint`](/raiden-network/raiden-api-1/resources/testing.md#mint-tokens) | Mint tokens |

{% hint style="warning" %}
Some tokens might require you to have minter privileges.
{% endhint %}

## Mint Tokens

<mark style="color:green;">`POST`</mark> `http://localhost:5001/api/v1/_testing/tokens/0x782C...8209/mint`

The request will return the hash of the minting transaction.

#### Path Parameters

| Name           | Type   | Description        |
| -------------- | ------ | ------------------ |
| version        | string | Version of the API |
| token\_address | string | Address of a token |

#### Request Body

| Name             | Type   | Description                                                                                                                 |
| ---------------- | ------ | --------------------------------------------------------------------------------------------------------------------------- |
| to               | string | An address for which to deposit the minted tokens                                                                           |
| value            | string | Amount of tokens to be minted                                                                                               |
| contract\_method | string | Name of the minting method in the smart contract, must be set to either **"mint"**, **"mintFor"**, or **"increaseSupply"**. |

{% tabs %}
{% tab title="200 Successful transaction" %}

```bash
{
    "transaction_hash": "0x90896386c5b218d772c05586bde5c37c9dc90db5de660bba5bd897705c976edb"
}
```

{% endtab %}

{% tab title="400 If Raiden runs in production mode minting is not allowed. Furthermore, if the provided arguments are not valid the request will fail" %}

```
The request failed
```

{% endtab %}

{% tab title="402 If there is not enough ETH to submit the minting transaction" %}

```
[critical ] Transaction to call smart contract function failed [raiden.network.rpc.client
[error    ] Error processing request       [raiden.api.rest_utils]
```

{% endtab %}
{% endtabs %}

#### Example request:

```bash
{
    "to": "0x2c4b0Bdac486d492E3cD701F4cA87e480AE4C685",
    "value": "1000",
    "contract_method": "mintFor"
}
```
