Skip to main content

Melt Native Tokens

Melting native tokens means converting or "melting" them into their foundry. This changes the circulating supply and allows for new tokens to be minted again.

info

If you melt your native tokens, you can still destroy the foundry that created them.

Example Code

  1. Instantiate a Wallet, get Alice's Account which was created in the first guide and sync it.

  2. Melt MELT_AMOUNT native tokens by calling the Account.melt_native_token() function.

sdk/examples/how_tos/native_tokens/melt.rs
loading...

Full Example Code

sdk/examples/how_tos/native_tokens/melt.rs
loading...

Expected Output

Balance before melting: 100
Transaction sent: 0x7b3b152127d3cf2921891ad1ea279ae484d559e4040a0d3ca8940c89cb64b34e
Block included: https://explorer.shimmer.network/testnet/block/0x70d34d37e9a30d19b641ac24529c2fc512f8c9169ffa3521be4b05b7fefe8933
Balance after melting: 90