Manage Tokens¶
Introduction¶
Any network deployed through Tanssi is sovereign and free to define the governance model that best fits its use case. The network 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 network 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 networks, 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-powered network (Quick Trial or Dedicated)
- The account you used when registering the network, imported in any of the supported wallets
- Your network's Sudo account, also imported in any of the supported wallets
Note
The network's registration account is always a Substrate one, whereas the network'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 network. To do so, head to the Chain state section on the Polkadot.js Apps connected to the orchestrator chain for quick trial networks or dedicated networks, and take the following steps:
- Select the registrar storage module
- Select registrarDeposit
- Insert your network ID
- Press + icon
You'll see the registration account at the bottom.
Note
The dApp will show your network in the dashboard only if you have the registration account properly set.
Retrieving the Sudo Account¶
If you're unsure what your Tanssi network's Sudo account is, you can find it in your Tanssi Dashboard underneath the Properties section.
Warning
It's critical to protect your Sudo account key with the utmost security precautions, as it grants privileged access to your Tanssi network.
Accessing the Token Management Panel¶
The Tanssi dApp implements a smooth interface, allowing the network governor to access and execute privileged functions. To do so, head to the Tanssi dApp, and then:
- Click on the Manage button
- Click on the Token Management button.
Now you have direct access to the actions presented in the introduction:
- Mint Tokens
- Update Balances
- Transfer Tokens
- Configure Gas Dynamics
Note
If you don't see your network's details on the dashboard, make sure to comply with the prerequisites.
Minting Tokens¶
The network 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:
-
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.
-
Insert the amount of tokens to mint
- Click on Mint
You'll be asked to sign the transaction with the network'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 network 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:
-
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.
-
Insert the new balance the address will hold
- Click on Update
You'll be asked to sign the transaction with the network'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 network 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:
- Insert the origin address that will transfer its tokens
-
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.
-
Insert the amount of tokens to transfer
- Click on Transfer
You'll be asked to sign the transaction with the network'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 networks.
The governor of a Tanssi-powered EVM-compatible network 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:
- Insert the new base fee, expressed in Wei units (10-18)
- Insert the elasticity value
- Click on Update Dynamics
You'll be asked to sign the transaction with the network's governor account. Once the transaction has gone through, the network's fee mechanism will run with the new transaction pricing parameters.
| Created: June 4, 2024