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

Mint tokens

Some tokens might require you to have minter privileges.

post
Mint Tokens

http://localhost:5001/api/v1/_testing/tokens/0x782C...8209/mint
The request will return the hash of the minting transaction.
Request
Response
Request
Path Parameters
version
required
string
Version of the API
token_address
required
string
Address of a token
Body Parameters
to
required
string
An address for which to deposit the minted tokens
value
required
string
Amount of tokens to be minted
contract_method
required
string
Name of the minting method in the smart contract, must be set to either "mint", "mintFor", or "increaseSupply".
Response
200: OK
Successful transaction
{
"transaction_hash": "0x90896386c5b218d772c05586bde5c37c9dc90db5de660bba5bd897705c976edb"
}
400: Bad Request
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
402: Payment Required
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]

Example request:

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