Changing Mosaic Supply⚓︎
Mosaics created with the supply_mutable flag can have their total supply increased or decreased after
creation.
This tutorial shows how to change a mosaic's supply.
Prerequisites⚓︎
Before you start, make sure to have:
- An account that owns a mosaic with the
supply_mutableflag set. See the Creating a Mosaic tutorial. - XYM to pay for the transaction fee. See Getting Testnet Funds from the Faucet.
For more details, see Supply Mutability in the Textbook.
Increasing Supply (Minting)⚓︎
To mint new units, reuse the supply change step from the Creating a Mosaic tutorial with these parameters:
- Set
actiontoincrease. - Set
deltato the number of atomic units to add. Remember that the delta is expressed in atomic units, so the mosaic's divisibility determines the conversion to whole units.
New units are added to the mosaic creator's account balance.
Decreasing Supply (Burning)⚓︎
To burn existing units, use the same mosaic_supply_change_transaction_v1 type with these parameters:
- Set
actiontodecrease. - Set
deltato the number of atomic units to remove. As with minting, the delta is expressed in atomic units based on the mosaic's divisibility.
Units are removed from the mosaic creator's account balance. If the creator does not hold enough units, the transaction fails with a validation error.