Issuing a new token using Kiosk

Kiosk has been updated to use (a mod of) appkit for signing.
This gives us the ability to do almost everything Ergo provides. The only thing missing is the ability to set context variables for inputs being spent. Hopefully this will be added in the coming weeks.

This post will demonstrate how to create a token using Kiosk. The token issuance will follow the EIP-0004 standard. In summary, the EIP suggests that token details be stored in R4, R5 and R6 as shown in the following figure.

Get the latest version of Kiosk from github and run it using sbt run. Once you have Kiosk up and running, open the URL http://localhost:8080 in your browser and follow the steps given below.

Step 1. Clear the existing environment variables

Step 2. Set the environment variables name, description and decimals as per the EIP. We will create a new token called EUR.

Step 3: Verify that the variables are correctly created

Step 4: Using block explorer find the boxId of the box you will spend to create this token. In our example this was cfd0ee0bc5390ec12e0827d9d0c4d4a95ff3f3c484c7cf3845126daf18d32d6b.
The id of the token to be issued is the same as this boxId.
Important: You must know the secret key of the address corresponding to this box. Please reply below if you need help in creating such an address.

Step 5: Create a new box with the new tokens using the variables name, description and decimals created earlier, and using any address where you want to send the tokens to

In our example, we are using the address of the box being spent.

Step 6: Send a transaction with the above created box as the output and the above boxId representing the input

You can use any address as the change address. In our example this is the address corresponding to the above boxId, which turns out tp be 9hTh4u6CDXktMQb9BoRo5nTPnmFN8G5u4PUCURvoUCXmtaaDYdw.

The sent transaction can be viewed on the block explorer here.
The above address may still have some fractional Ergs, which are free for anyone to claim using the private key from the screenshot.

The issued token can be viewed here, as shown in the following screenshot.

1 Like