How to Mint your First Token on Stardust
Building a great game takes time, and developers need to focus on many areas to build a great game. When a new technology like blockchain comes along to enhance in-game experiences, it requires time to understand and implement, which can take some of the focus away from gameplay.
While adding true player ownership of in-game items has a ton of potential to make gaming even better, the challenge is that writing and deploying smart contracts is an entirely new space for a game developer to learn. Game developers should be able to focus solely on building the best experience and game possible for their players. That’s where Stardust comes in.
We can help solve both of these issues with an API to create seamless game experiences through custodial wallets and the ability to quickly mint game assets on-chain without any blockchain development knowledge for game developers. This post will walk you through creating your first blockchain game on Stardust in our Developer Dashboard, from creating a template to minting an in-game NFT to viewing it on Polygonscan.
Create a game
- Click “Add Game”
- Give a name, description, optional image, and choose a blockchain. You can pick between Solana and Polygon. If you are following along step by step, please use Polygon (mainnet) as we will use Polygonscan in a later step.
3. Click “Confirm”.
4. Find the tile for your newly create game and click “Select”. You’ve now provisioned a Stardust game on-chain.
A template is an item type definition for your game. You must mint tokens from a previously created template. Examples of templates can be a camouflage skin, resources like dirt, or categories of NFTs that you’ll later mint.
- In the left nav, click “Templates”.
2. Click “Add template”.
3. Give a name, description, image, and supply cap.
4. Select “NFT”.
5. Add a custom property. This will create a metadata property on all NFTs minted from this template.
6. Press “Confirm” to create the template.
Player / Wallet Creation
- In the left nav, click “Players”.
2. Click “Add Player”.
3. Provide a unique ID for the player.
4. Add a custom property for Stardust to store about this user. This is optional. As an example, add VIP as the name, change the type to “boolean”, or select “True”.
5. Click “Confirm” to create the player.
6. Open the player by clicking “View details” on the new tile.
From this page, you can see the player’s inventory (empty right now), their ID, wallet address, and custom properties created about this player.
Minting a token
- Within the newly created player’s info page, scroll down to the Inventory section.
- Click “+ Add” in the upper right corner of this box.
3. Select the template that was created earlier.
4. You can now add properties specific to the NFT. It will inherit the property we added earlier to the template and append the token specific properties added now.
5. Click “Confirm”.
You’ve now minted a token on-chain. You should now see the item in this player’s inventory and can view the Token ID.
Viewing the token on Polygonscan
- To view this token on Polygonscan, first copy the Wallet Address in the upper left of the player’s info page underneath their image and player ID.
2. Go to https://polygonscan.com/
3. Paste the wallet address in the search bar.
4. Tab over to “ERC-1155 Txns”.
5. You should then see a transaction showing the mint! This “Token ID” will match the Stardust “Token ID”.
The Stardust Developer Dashboard makes it easy for developers to add player ownership on-chain using our Developer Dashboard. By creating a seamless Web3 onboarding experience through custodial wallets, the chances of onboarding the next 100 million users to Web3 increases. Game developers can focus on what they do best, building great games, while being able to create custodial wallets and mint tokens to players without blockchain development knowledge like writing any Solidity or deploying smart contracts.