Skip to main content

Create Native Tokens

The stardust update allows you to create your own native tokens Native tokens are minted by a so-called Foundry. The Foundry allows you to specify a max supply once and change the circulating supply. You can also specify some custom metadata in the foundry output or follow a standard like IRC30.
To create a Foundry you need an Alias Output which owns it. This Alias Output only needs to be generated once and can own multiple foundries.

Online Faucet

You can request test funds from the Shimmer Testnet Faucet.

Code Example

The following example will:

  1. Create a wallet.
  2. Get Alice's account which was created in the first guide.
  3. Create the CreateNativeTokenParams.
  4. Create the native token by calling the Account.create_native_token(params, options) function.
sdk/examples/how_tos/native_tokens/create.rs
loading...

Expected Output

Transaction sent: 0x3e7fe86a2b01a7006fe037249be51852d298d32df69507140d3b41c1a6d7fb90
Block included: https://explorer.shimmer.network/testnet/block/0xca4f8150014bc548214be6b02bed3b7d43041adef8838965815a367f73c7272d
Account synced
Preparing transaction to create native token...
Transaction sent: 0xcfc5ffae0c7be8cfb7c334d6f6bb39a2ddff612c9a9048c88e3d9158f7cc4832
Block included: https://explorer.shimmer.network/testnet/block/0x558c0dcede60609bbb641e9f1d9a7802b48a3c3d5827328a054385140d447436
Created token: 0x089dc1b964591b15819ef1912fab48c001fed4558b37766dfa5daa512495d5b25a0100000000
Account synced