How to create tokens on Mumbai testnet with EY Opschain Token Services

High level overview

1. Go to blockchain.ey.com and click top right "Get started" to register as business user.

2. Fund your Mumbai testnet wallet - you can find out your testnet wallet address at the top right wallet dropdown after you login.

3. Click top left hamburger icon, select Organization Settings, then select Integration menu, you can generate client-id and client secret.

4. Go to developer-portal.blockchain.ey.com home page, click “Sign-in/Sign-up” menu at the top right. You should be able to login automatically if you already login via blockchain.ey.com.

5. Click Products menu after login, then select “Opschain Token Services” product.

6. Type a reference name and click "Subscribe" button, you will be redirected to the Profile page where you can manage your subscriptions later.

7. Click Products menu again, then select "Opschain Token Services" product, select "ERC 721", ”ERC 1155” or ”ERC 20” APIs.

8. Select the API endpoint to the left and click the green Try-it button, then input the value for the headers and payload as per instruction below.

* All parameters part of the "params" of the request needs to be passed as string into an array (ie. ["param1","param2"])

Setting up the headers required

In order to submit requests properly, it is required to provide the following parameters in the request header:

  • client-id: <get from step 3 above>

  • client-secret: <get from step 3 above>

  • network-id: 80001

  • Ocp-Apim-Subscription-Key: <should be auto populated after you complete step 6 using Try-it feature>

* If using postman or other tools, you need to manually set above headers.

Deploy a ERC721 Token Smart Contract

Parameters required for deploying a ERC721 Token Smart Contract

"contractStandard", must be passed as "ERC721_V1"

"params" array must have below 4 input parameters in the exact order:

  • name of the token

  • symbol of the token

  • baseURI for the metadata, can be left empty

  • wallet address that is able to operate on the smart contract, usually is your BEC organisation wallet

Example request payload (JSON) for deploying a ERC721 Smart Contract

Mint a ERC721 Token

Parameters required on the request path for minting a ERC721 token

  • address: contract address

Parameters required for minting a ERC721 token

"params" array must have below 3 input parameters in the exact order:

  • recipient of the mint

  • identifier for the token

  • metadata associated with the token Parameters required for

Example request payload (JSON) for minting a ERC721 token

Fetching User Token Balance

Parameters required on the request path to fetch user token balance

  • address: contract address

  • params: user wallet whose token balance needs to be fetched

Set or Update Token Metadata

Parameters required on the request path to set or update ECR721 token metadata

  • address: contract address

Parameters required to set or update ERC721 token metadata

"params" array must have below 2 input parameters in the exact order:

  • identifier for the token

  • metadata associated with the token Parameters required for

Example request payload (JSON) to set or update a ERC721 token metadata

Fetch metadata associated with a ERC721 Token

Parameters required on the request path to fetch ERC721 token metadata

  • address: contract address

  • params: token id

Transfer a ERC721 Token

Parameters required on the request path for transferring a ERC721 token

  • address: contract address

Parameters required for transferring a ERC721 token

"params" array must have below 2 input parameters in the exact order:

  • recipient of the transfer

  • identifier for the token

Example request payload (JSON) for transferring a ERC721 token

Burn ERC721 Token

Parameters required on the request path for burning a ERC721 token

  • address: contract address

Parameters required for burning a ERC721 token

"params" array must have below 1 input parameters in the exact order:

  • identifier for the token

Example request payload (JSON) for burning a ERC721 token

Deploy a ERC20 Token Contract

Parameters required for deploying a ERC20 Token Contract

"contractStandard", must be passed as "ERC20_V1"

"params" array must have below 3 input parameters in the exact order:

  • name of the token

  • symbol of the token

  • wallet address that is able to operate on the smart contract, usually is your BEC organisation wallet

Example request payload (JSON) for deploying a ERC20 Token Contract

Mint a ERC20 Token

Parameters required on the request path for minting a ERC20 token

  • address: contract address

Parameters required for minting a ERC20 token

"params" array must have below 2 input parameters in the exact order:

  • recipient of the mint

  • amount of tokens to mint

Example request payload (JSON) for minting a ERC20 token

Fetching User Token Balance

Parameters required on the request path to fetch user token balance

  • address: contract address

  • params: user wallet whose token balance needs to be fetched

Transfer a ERC20 token

Parameters required on the request path for transferring a ERC20 token

  • address: contract address

Parameters required for transferring a ERC20 token

"params" array must have below 2 input parameters in the exact order:

  • recipient of the transfer

  • amount of tokens to transfer

Example request payload (JSON) for transferring a ERC20 token

Burn ERC20 Token

Parameters required on the request path for burning a ERC20 token

  • address: contract address

Parameters required for burning a ERC20 token

"params" array must have below 1 input parameters in the exact order:

  • amount of tokens to burn

Example request payload (JSON) for burning a ERC20 token

Deploy a ERC1155 Smart Contract

Parameters required for deploying a ERC1155 Smart Contract

"contractStandard", must be passed as "ERC1155_V1"

"params" array must have below 4 input parameters in the exact order:

  • name of the token

  • symbol of the token

  • baseURI for the metadata, can be left empty

  • wallet address that is able to operate on the smart contract, usually is your BEC organisation wallet

Example request payload (JSON) for deploying a ERC1155 Smart Contract

Mint a ERC1155 Token

Parameters required on the request path for minting a ERC1155 token

  • address: contract address

Parameters required for minting a ERC1155 token

"params" array must have below 4 input parameters in the exact order:

  • recipient of the mint

  • identifier for the token

  • amount of tokens to mint

  • metadata associated with the token parameters required for

Example request payload (JSON) for minting a ERC1155 token

Fetching User Token Balance

Parameters required on the request path to fetch user token balance

  • address: contract address

  • params: wallet address, token id

Set or Update Token Metadata

Parameters required on the request path to set or update ECR1155 token metadata

  • address: contract address

Parameters required to set or update ERC1155 token metadata

"params" array must have below 2 input parameters in the exact order:

  • identifier for the token

  • metadata associated with the token parameters required for

Example request payload (JSON) to set or update a ERC1155 token metadata

Fetch metadata associated with a ERC1155 Token

Parameters required on the request path to fetch ERC1155 token metadata

  • address: contract address

  • params: token id

Transfer a ERC1155 Token

Parameters required on the request path for transferring a ERC1155 token

  • address: contract address

Parameters required for transferring a ERC1155 token

"params" array must have below 4 input parameters in the exact order:

  • owner wallet address of the token (fromWallet)

  • recipient of the transfer

  • identifier for the token

  • amount of tokens to transfer

Example request payload (JSON) for transferring a ERC1155 token

Burn ERC1155 Token

Parameters required on the request path for burning a ERC1155 token

  • address: contract address

Parameters required for burning a ERC1155 token

"params" array must have below 3 input parameters in the exact order:

  • owner wallet address of the token (fromWallet)

  • identifier for the token

  • amount of tokens to burn

Example request payload (JSON) for burning a ERC1155 token