Explore the Future of Web3: Shardeum's Whitepaper Released!

How to Mint Your Cryptocurrency on Shardeum Testnet using Remix – Part 1

How to Mint Your Cryptocurrency on Shardeum Testnet using Remix – Part 1

Shardeum alpha-testnet was launched recently and this is the right time for you to build your dApps and become a leader in the...

Back to top

How to mint crypto on the Shardeum Testnet (Alphanet) using Remix? In this post, we give you a detailed view into the process to mint tokens on Shardeum Testnet! But first, a brief glimpse into Shardeum, and what we do:

Introduction to Shardeum

Shardeum is an EVM based, linearly scalable smart contract platform. It’s key features include low transaction fees on the network forever, true decentralization and solid security. Essentially, Shardeum will be the network that solves blockchain’s trilemma issue for once and for all. The issue refers to blockchain’s inherent limitation in allowing all its three properties – scalability, decentralization and security – to coexist at the same time. Since security is a core feature of Web 3 technologies like blockchain, existing networks often make a trade off between decentralization and scalability. So a blockchain network today either lacks in speed or decentralization.

Shardeum will use ‘sharding’ and more specifically ‘dynamic state sharding’ to solve blockchain trilemma. Sharding breaks the job of validating and confirming a ton of commercial transactions into small and manageable bits, or shards. This helps the network to process transactions parallelly across shards at a much faster rate. Dynamic state shardin enables the network to scale linearly i.e. the throughput/speed increases as more nodes join the network. This allows for true decentralization and will prevent network congestion/outages we have been accustomed to on many blockchain networks especially during peak times. Further, consensus on the network will be done at a transaction level as opposed to block level which is the case with typical blockchains today. Once each transaction is validated/confirmed across shards, they are then added to a block at regular intervals.

Shardeum Testnet (Alphanet)

If you are from software field of work, you might be aware of different life cycles when you develop a software product. When software lands on a user’s device, it has to be the most refined version built with rigorous research and testing minus any major bugs. Before the product achieves that level of precision, it has to pass through many phases. One of them is the alpha phase or also known alphanet, which is basically a testing phase. This phase may have many errors on its code structure which are also known as bugs. You can expect significant crashes, network resets among other common issues a network will face in a testnet. Many companies complete testing this phase internally and release a beta phase (also called betanet) to limited outside users for a more rigorous stress testing.

As far as Shardeum is concerned, its core principle is OCC which is an abbreviation for Open, Collaborative and Community Driven. Shardeum wants the community to be closer to every phase of the development cycle so they can be one among the first asides from initial developers to help stress test the network with a transparent feedback loop. Also that way anyone from the community can start testing their own products they are looking to deploy and develop on the network. As the testnet progresses, Shardeum will rely on their feedback to keep improving and eventually fix all the bugs reported prior to beta-net phase.

Using Shardeum Sphinx Dapp Testnet To Deploy dApps

Before we dive into specifics of the development environment to deploy some cool stuff on Shardeum, you might be aware of the blockchain network-native coins or tokens that is necessary to pay gas fees at various transactions points. So let’s start with getting some test SHM coins to play around the network. The first step is to set up a wallet address to receive the SHM coins from Sphinx Dapp testnet faucet’ We will use the MetaMask chrome extension for that. Use this guide to add Sphinx Dapp network to your MetaMask account. To get some test coins, head towards Faucet Link which will have easy to follow instructions.

Minting Your Tokens On Shardeum Sphinx Dapp

Since the network is EVM-based or EVM-compatible, all the essential tools you may use in Ethereum network works here. Shardeum’s core developers constantly strive to bring the best developer-friendly tools on Shardeum to make your development experience smooth.

There are many ways to deploy a smart contract on the network. Let’s use a more straightforward online tool like Remix instead of developer-savvy ones like Hardhat and Truffle. Head towards Remix to start coding your first smart contract. You can further review Shardeum’s developer documentation to make sure you don’t miss anything.

In this blog, I will guide you to deploy your first smart contract token on Shardeum.

First, let’s create a new file called MyToken.sol.

Now copy-paste the following code into the IDE workspace.

pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";

contract testToken is ERC20 {
 constructor(uint256 initialSupply) ERC20("testToken", "TSTKN") { _mint(msg.sender, initialSupply);

Here is the explanation of the above code and how you can modify it to deploy your custom token.

Line 1 : Indicates the compiler version you are using to compile the smart contract. Computers understands a low-level byte language. The compiler can help transition from a high-level language (e.g. Solidity) to low-level code.

Line 2 : This line indicates the import statement. An import statement will allow you to use other contracts/files from Remix or GitHub repositories in your contract while developing and testing. We are using ‘openzepellins‘ ERC-20 contract. It has the default implementation of a standard ERC-20 token with functionalities such as approval, transfer, safetransfer, and balanceOf.

Line 3 : This is the actual line where most smart contracts begin. We can now specify the name of our smart contract. In our case, it’s a ‘testtoken’, preceding with the contract keyword and followed by the interface implementation. In our case, its ERC20. You can always change the name of the smart contract on this line testToken => Anything.

Line 4 : Here, we define our constructor argument. A constructor is a special function declared using the constructor keyword. It is an optional function and is used to initialize the state variables of a contract. In our case, we take one constructor argument from the user and its initial supply which basically indicates the initial supply of the token we are creating. You can pass a value of the supply and note, it should always be in Gwei.

Next, we initialize our ERC20 interface. It takes two arguments. First is the token’s name; in our case, it’s “testToken.” The second one is the ticker of your token which in our case is “TSTKN.” You can always change the values of these parameters if you want a different name and ticker symbol for your token.

Line 5 : Here we mint the initial supply passed in the constructor argument to the address deploying the contract. You can change the address to mint the token by changing the ‘msg.sender’ with another address variable. ‘_mint’ is an internal function in openzeppelin ERC20 implementation that helps with minting your tokens.

Compile and Deploy Smart Contract

Note, you can always hop on to Solidity Docs to learn more about Solidity. Now that you are all set with your contract, your MetaMask setup, and some test SHM coins loaded, it’s time to deploy your contract on Sphinx Dapp testnet!!

Compile the smart contract using the Remix GUI and deploy it using ‘injected Web3‘ (make sure to select Shardeum Sphinx Dapp 1.X on MetaMask before deploying the contract). Then proceed to approve the transaction from metamask. Within a few seconds of the approval, the contract will be deployed on the test network.

Why You Should Deploy your dApps on Shardeum Testnet

Shardeum is the first layer 1 blockchain that aims to solve the blockchain trilemma and achieve true decentralization with the help of community. As the alpha-testnet was launched recently in April 2022, this is the right time to hop onto the network to develop your dApps and become a leader in the ecosystem. Starting right away offers you the head start in many ways including to build and stay in touch with a strong, vibrant community and get the attention of Shardeum’s core development team in building your Web 3 products and services. Shardeum is also bringing developer grants soon so you too stand a chance to secure some much needed grants/funding for your project.


We do hope this post helps you understand the functioning of Shardeum better, along with giving you an initial idea of how the Shardeum Testnet operates, and how to mint crypto on said testnet with Remix. Shardeum is dedicated to solving the scalability trilemma most blockchain projects today are facing, without having to resort to compromising any of the core attributes of a blockchain (security, decentralization, and scalability). The Shardeum community is excited to welcome you as we work toward building a diverse ecosystem of web3 projects!

Popular Searches

Layer 1 Crypto Projects 2022  |  Types of DDos Attack  |  What is AMM in Crypto  |  How to Mint Crypto  |  What is a Dao Crypto  |  How to Avoid Crypto Scams  |  Types of Cryptocurrency Scams  |  What is Decentralization  |  What is Miner Extractable Value  |  What is White Paper in Cryptocurrency  |  How to Make and Sell NFT  |  Learn Web 3.0  |  What is a Blockchain Node  |  Deploy ERC20 Token  |  Best Blockchain Bridge  |  Peer to Peer Money Transfer  |  Pros and Cons of Blockchain Technology  | What is Chainlink  | DAO Guide  |  Blockchain Technology Explained

Opinions expressed in this publication are those of the author(s). They do not necessarily purport to reflect the opinions or views of Shardeum Foundation.

About the Author : Shailesh Khote has been in blockchain development since Jan 2021. He worked with solidity smart contracts for DEX, NFTs, Yield Farming, IDOs, and Yield Aggregation and his core competencies include Solidity, web3.js and ReactJs. You can follow him on Twitter

The Shard

Sign up for The Shard community newsletter

Stay updated on major developments about Shardeum.

  • Share