Mint tokens
This page describes the endpoint used to mint ERC20 tokens.
When minting an ERC20 token, you can provide a destination. The freshly created ERC20 token will be immediately sent to the destination wallet address.
Minting is done by using the endpoint:
Request Endpoint: reference
POST /api/v3/erc20/tokens/mints
Request Body Parameters
Parameter | Param Type | Description | Type | Required |
---|---|---|---|---|
chain | Body | The blockchain of the token contract | String | ✅ |
contractAddress | Body | The token contract address | String | ✅ |
destinations | Body | The array includes all the wallet addresses and the number of ERC20 tokens to mint per wallet address | Array of objects | ✅ |
destinations.address | Body | The wallet address to mint and send the ERC20 tokens to | String | ✅ |
destinations.amount | Body | The number of ERC20 tokens you want to mint and send | Number | ✅ |
Example Request
In this example, we will mint and send ERC20 tokens to two wallet addresses. The first wallet will get twenty ERC20 tokens and the second wallet will get thirty-five tokens. You can add multiple wallet addresses.
POST /api/v3/erc20/tokens/mints
{
"chain": "MATIC",
"contractAddress": "0x1e857475040b732d5adf3f8b2e7cd712914cdd23",
"destinations": [
{
"address": "0xb811Fac088E8E80F56258a5f29D47d0FF1a37BD5",
"amount": "20"
},
{
"address": "0xf2b1cEB69E765469a80E8d4c8635B05269889fa7",
"amount": "35"
}
]
}
Response Body
The
result.mint.id
param can be used to track the token mint request.
{
"success": true,
"result": {
"mints": [
{
"id": "7f78e6ed-d733-430c-83a4-5fc28032e667",
"createdOn": "2024-09-23T09:28:49.562087061",
"status": "PENDING",
"destination": {
"address": "0xf2b1cEB69E765469a80E8d4c8635B05269889fa7",
"amount": 35
}
},
{
"id": "d06ff454-b603-4279-8439-39d6949abf67",
"createdOn": "2024-09-23T09:28:49.608913941",
"status": "PENDING",
"destination": {
"address": "0xb811Fac088E8E80F56258a5f29D47d0FF1a37BD5",
"amount": 20
}
}
],
"contract": {
"address": "0x1e857475040b732d5adf3f8b2e7cd712914cdd23",
"name": "Infinity Token",
"symbol": "IFT",
"maxSupply": 100,
"burnable": true,
"owner": "0x7312750DF4d2057b758a61C7017729c6Ec9bB3E9",
"type": "ERC_20"
}
}
}
Updated 17 days ago