POST
/
api
/
v1
/
erc20
/
create
curl --location --request POST 'https://groupos.xyz/api/points/collection/create' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <token>' \
--data-raw '{
    "chainId": 5,
    "name": "Racing XP",
    "symbol": "ZED.XP"
}'
{
  "success": true,
  "transactionHash": "0x...",
  "transactionUrl": "https://polygonscan.com/tx/0x...",
  "token": {
    "contractAddress": "0x...",
    "name": "Racing XP",
    "symbol": "ZED.XP"
  }
}

How token creation works

Tokens are represented on the blockchain through a smart contract that manages the accounting of how many tokens each person owns. To create a new token collection, we create a new smart contract designed to manage it and then are able to distribute tokens. The smart contract is analogous to a spreadsheet, it is the home that defines the structure and content of the records.

This API route will take in parameters for creating a new token collection and return an address where this new smart contract is deployed. This contract address uniquely identifies your token collection and will be used in other API routes.

Body

chainId
number
required

The id of the chain supporting the token. This cannot be changed after creation.

name
string
required

The name of the collection. This cannot be changed after creation.

symbol
string
required

The symbol of the collection. This cannot be changed after creation.

Response

success
boolean

Indicates whether the call was successful.

transactionHash
string

Transaction hash for the newly created token collection.

transactionUrl
string

Wraps transactionHash with the appropriate network-specific URL for convenience.

token
object

The newly created token smart contract.