Choosing your network

Get familiar with the URLs to choose depending on the network your token is deployed on

This documentation has been written using the Ropsten test network of the Ethereum blockchain, but depending on the blockchain you chose when subscribing to Tokeny, you might need to change this configuration. Follow this simple table to understand which URL you need to use, depending on the network your token has been emitted on:

Network

Subnetwork

Servicing API Base URL

T-REX Factory API Base URL

ethereumNetwork value

Explorer

Ethereum

Ropsten (testnet)

servicing-api-staging.tokeny.com

trex-factory-api-staging.tokeny.com

ROPSTEN

https://ropsten.etherscan.io/

Ethereum

Homestead (mainnet)

servicing-api.tokeny.com

trex-factory-api.tokeny.com

MAINNET

https://etherscan.io/

Polygon

Mumbai (testnet)

servicing-api-testing.tokeny.com

trex-factory-api-testing.tokeny.com

MUMBAI

https://polygon-explorer-mumbai.chainstacklabs.com/

Polygon

Polygon (mainnet)

servicing-api-polygon.tokeny.com

trex-factory-api-polygon.tokeny.com

MATIC

https://polygon-explorer-mainnet.chainstacklabs.com/

For example, if you want to mint tokens on the Ethereum mainnet, use this endpoint:

curl 'https://servicing-api.tokeny.com/api/tokens/:token_id/actions/mint/batch' \
  -H 'authorization: Bearer <jwt>' \
  -H 'content-type: application/json' \
  --data-binary '{
   "ethereumNetwork":"MAINNET",
   "transactions":[
      {
         "address":"<receiver_wallet>",
         "amount":"<amount_ok_tokens>"
      }
   ]
}' \
  --compressed

If you want to do the same operation on the Polygon mainnet, use this configuration instead:

curl 'https://servicing-api-polygon.tokeny.com/api/tokens/:token_id/actions/mint/batch' \
  -H 'authorization: Bearer <jwt>' \
  -H 'content-type: application/json' \
  --data-binary '{
   "ethereumNetwork":"MATIC",
   "transactions":[
      {
         "address":"<receiver_wallet>",
         "amount":"<amount_ok_tokens>"
      }
   ]
}' \
  --compressed