Skip to main content

Mint Native Tokens

After you have created a native token, you may want to increase the circulating native token supply by minting more tokens.

Example Code

The following example will:

  1. Instantiate a Wallet, get Alice's Account which was created in the first guide and sync it.
  2. Search the account's balance for a foundry and the first native token Id.
sdk/examples/how_tos/native_tokens/mint.rs
loading...
  1. Mint MINT_AMOUNT native tokens by calling the Account.mint_native_token() function.
sdk/examples/how_tos/native_tokens/mint.rs
loading...

Full Example Code

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

Expected Output

Balance before minting: 90
Transaction sent: 0x6dbec7c73ef511c3945eda6265d3de29a4f572a3bd95e39221cff18135e18ca6
Block included: https://explorer.shimmer.network/testnet/block/0x7b677c0562d8b2a7fdc1fd6182bb6364af517d41ec38a9dab9b29a1c7422f574
Balance after minting: 100