Skip to content

Manage Tokens

Introduction

Any appchain deployed through Tanssi is sovereign and free to define the governance model that best fits its use case. The appchain governor has superpowers over the chain administration. Consequently, they can call privileged functions, such as updating the runtime and managing native token-related operations, among other actions.

There are some actions related to the native token management that are available to the appchain governor on the Tanssi dApp:

  • Mint tokens - mints new tokens, increasing the total supply
  • Update balances - increases or decreases the balance of an account, affecting the total supply
  • Transfer tokens - executes a forced token transfer from one account to another
  • Configure gas dynamics - only available on EVM-compatible appchains, this action changes the EIP-1559 configuration, affecting the transaction pricing mechanism

In this guide, you'll learn how to execute the previously listed actions using the Tanssi dApp.

Checking Prerequisites

For the examples in this guide, you will need to have the following:

  • A Tanssi appchain (Snap or Dedicated)
  • The account you used when registering the appchain, imported in any of the supported wallets
  • Your appchain's Sudo account, also imported in any of the supported wallets

Note

The appchain's registration account is always a Substrate one, whereas the appchain's Sudo account depends on the chain type. If the chain is EVM-compatible, then the Sudo account will be an Ethereum type and, otherwise, a Substrate type.

Retrieving the Registration Account

If you're unsure what your registration account is, you can query it directly from the Tanssi orchestrator chain, which keeps records of every registered appchain. To do so, head to the Chain state section on the Polkadot.js Apps connected to the orchestrator chain for snap appchains or dedicated appchains, and take the following steps:

  1. Select the registrar storage module
  2. Select registrarDeposit
  3. Insert your appchain ID
  4. Press + icon

You'll see the registration account at the bottom.

Locating your registration account

Note

The dApp will show your appchain in the dashboard only if you have the registration account properly set.

Retrieving the Sudo Account

If you're unsure what your Tanssi appchain's Sudo account is, you can find it in your Tanssi Dashboard underneath the Properties section.

Locating your Sudo address on apps.tanssi.network

Warning

It's critical to protect your Sudo account key with the utmost security precautions, as it grants privileged access to your Tanssi appchain.

Accessing the Token Management Panel

The Tanssi dApp implements a smooth interface, allowing the appchain governor to access and execute privileged functions. To do so, head to the Tanssi dApp, and then:

  1. Click on the Manage button
  2. Click on the Token Management button.

Accessing the token management panel

Now you have direct access to the actions presented in the introduction:

  1. Mint Tokens
  2. Update Balances
  3. Transfer Tokens
  4. Configure Gas Dynamics

The token management panel

Note

If you don't see your appchain's details on the dashboard, make sure to comply with the prerequisites.

Minting Tokens

The appchain governor can mint new tokens, increasing its total supply. To do so, in the Token Management panel, click on the Mint tokens button, and then:

  1. Insert the address that will hold the newly minted tokens

    Note

    The destination address must be Ethereum type if the chain is EVM-compatible and a Substrate type otherwise.

  2. Insert the amount of tokens to mint

  3. Click on Mint

Mint tokens

You'll be asked to sign the transaction with the appchain's governor account. Once the transaction has gone through, the destination account's balance will have been increased by the desired amount.

Updating Balances

The appchain governor can increase or decrease the balance of any account, thus affecting the total supply. To do so, in the Token Management panel, click on the Update Balances button, and then:

  1. Insert the address that will hold the newly minted tokens. Once you enter the address, its current balance will be displayed

    Note

    The destination address must be Ethereum type if the chain is EVM-compatible and a Substrate type otherwise.

  2. Insert the new balance the address will hold

  3. Click on Update

Update Balances

You'll be asked to sign the transaction with the appchain's governor account. Once the transaction has gone through, the destination account's balance will reflect exactly the desired amount, regardless of previous holdings.

Executing Forced Transfers

The appchain governor can reassign balances, forcing a token transfer from one account to another. To do so, in the Token Management panel, click on the Transfer Tokens button, and then:

  1. Insert the origin address that will transfer its tokens
  2. Insert the destination address that will receive the tokens

    Note

    The origin and destination addresses must be Ethereum type if the chain is EVM-compatible and Substrate type otherwise.

  3. Insert the amount of tokens to transfer

  4. Click on Transfer

Transfer Tokens

You'll be asked to sign the transaction with the appchain's governor account. Once the transaction has gone through, the destination account will have received the number of tokens from the origin address.

Setting Gas Dynamics

Note

This option only applies to EVM-compatible appchains.

The governor of an EVM-compatible appchain can change its EIP-1559 configuration, affecting the transaction pricing mechanism. To do so, in the Token Management panel, click on the Gas Dynamics button, and then:

  1. Insert the new base fee, expressed in Wei units (10-18)
  2. Insert the elasticity value
  3. Click on Update Dynamics

Configure Gas Dynamics

You'll be asked to sign the transaction with the appchain's governor account. Once the transaction has gone through, the appchain's fee mechanism will run with the new transaction pricing parameters.

Last update: August 28, 2024
| Created: June 4, 2024