Shardeum Documentation
DevelopersSmart ContractsDeploy

Deploy ERC-20 Tokens with Remix

Shardeum release is a phased rollout, and the initial test version of dApp & smart contract support is expected to be available in Q2 of 2025. Our aim is to work with the community to make this the fastest, parallel executing and affordable EVM platform and we can't wait to get started
Smart contracts and dApps are not yet supported on Shardeum. The beta version is expected in Q2 2025, with full launch planned for Q3 2025. We are working closely with the community to build the fastest, most affordable parallel-executing EVM platform and we can't wait to get started.

Remix IDE is an open source web and desktop application that provides a fast development cycle with intuitive GUIs and a rich set of plugins. This guide will walk you through deploying an ERC-20 token contract on Shardeum using Remix.

Prerequisites

Before you begin, ensure you have:

  1. MetaMask installed and configured for Shardeum network
  2. SHM tokens in your wallet for gas fees
  3. A test account (recommended to use a separate browser for testing)
MetaMask Setup

If you haven't set up MetaMask for Shardeum yet, please refer to our MetaMask setup guide first.

Step 1: Open Remix IDE

  1. Visit https://remix.ethereum.org

Step 2: Create ERC-20 Token Contract

  1. In the file explorer, create a new file under the contracts folder named MyToken.sol

  2. Copy and paste the following ERC-20 token contract code:

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
 
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";
 
contract MyToken is ERC20, ERC20Permit {
    constructor() ERC20("MyToken2", "MT2") ERC20Permit("MyToken2") {
        _mint(msg.sender, 5000 * 10 ** decimals());
    }
}
Customizing Your Token

You can customize your token by changing:

  • "MyToken2" - The token name
  • "MT2" - The token symbol (appears in MetaMask, max 5 characters)
  • 5000 - The initial token supply minted to your wallet

Step 3: Compile the Contract

  1. Go to the Solidity Compiler tab in the left sidebar
  2. Click Compile MyToken.sol
  3. Ensure you see a green checkmark indicating successful compilation

remix_2

Step 4: Deploy to Shardeum

  1. Navigate to the Deploy & Run Transactions tab
  2. In the Environment dropdown, select Injected Provider - MetaMask
Network Detection

If Injected Provider cannot detect the network, refresh the Remix IDE page and switch between networks in MetaMask.

remix_3

  1. Select your MyToken contract from the dropdown
  2. Click Deploy to deploy your ERC-20 token contract

remix_4

  1. Confirm the deployment transaction in MetaMask

remix_5

Step 5: Get Contract Address

  1. After successful deployment, copy the Contract Address from Remix

remix_6

Step 6: Import Token to MetaMask

  1. In MetaMask, go to Tokens tab and click Import Tokens
  2. Paste the contract address from Remix into the Token Contract Address field
  3. The token information should auto-populate (Token Symbol and Decimals)
  4. Click Add Custom Token and then Import Tokens

Step 7: Verify Token Balance

  1. Check your Tokens tab in MetaMask to see your newly minted tokens
  2. You should see 5000 tokens (or your custom amount) in your wallet

Step 8: Transfer Tokens

  1. Select your token in MetaMask and click Send
  2. Enter the recipient address and amount
  3. Click Next and confirm the transaction
  4. Wait for the transaction to be confirmed

Step 9: Verify on Block Explorer

  1. In MetaMask, click on the transaction and select View on block explorer
  2. Verify that the ERC-20 token transfer is displayed correctly on the explorer
Testing Tips
  • Test token transfers between different MetaMask accounts
  • Verify all transactions appear correctly on the block explorer
  • If you encounter issues, try resetting MetaMask via settings

Troubleshooting

If you encounter issues:

  • Network not detected: Refresh Remix and switch networks in MetaMask
  • Transaction fails: Ensure you have sufficient SHM for gas fees
  • Token not appearing: Double-check the contract address when importing
  • MetaMask issues: Reset MetaMask via settings if problems persist

For more advanced smart contract development, check out our guides on Hardhat and Foundry deployment.

On this page