How to Build Your First Token on HeLa Chain using Hardhat.

Shivam GargShivam Garg
11 min read

Introduction

GM GM Famm…
So you’ve somehow landed in the wild world of crypto. Maybe you’ve heard people throwing around big words like “smart contracts”, “deploying to chain”, “ERC20”, “Hardhat”, and you’re like:

“Uh… what?” Good. Perfect. That’s exactly where you should be.

Because today, we’re going to build your very own token on HeLa Chain.
Yes, you, even if you’ve never touched code in your life. I’ll be right here, walking you through it like your slightly nerdy friend who won’t shut up about crypto.

Let’s seee… Before we do anything, let’s see what we will be requiring to make this happen..


Introduction to HeLa

You probably know Ethereum — the OG blockchain where a lot of crypto magic happens.
Now imagine Ethereum had a younger, cooler sibling who actually listened to all the complaints people had about blockchains being slow, expensive, and hard to use. That’s HeLa Chain.

HeLa Chain is built for the real world — not just for crypto geeks, but for actual apps and businesses like games, finance apps, AI stuff, and even things like decentralized physical networks (think sensors, devices, drones... pretty wild, right?).

The way HeLa works is kinda like building with Lego blocks. Instead of one big, messy chunk like most blockchains, HeLa splits its system into different pieces (we call these “layers”) that each have a special job:

  • Execution Layer: where smart contracts and apps live — this is where you launch your token.

  • Consensus Layer: makes sure everyone agrees on what happened — no cheating allowed.

  • Guardian Layer: adds extra protection — like a security guard watching over things.

  • AI Layer: this is the cool new part — it lets AI tools plug into the blockchain to make everything smarter.

Because it's built this way, HeLa can scale up easily, handle lots of new apps, and upgrade itself over time like a game that keeps getting updates instead of getting outdated.

In short:
HeLa Chain = fast, flexible, future-proof blockchain that’s actually ready for the real world.

HeLa Chain Deployment Layers

So what’s the deal with HeLa Chain being EVM-compatible?

HeLa Chain embraces a multi-layered architecture, strategically separating the consensus and runtime functionalities into distinct layers. The HeLa runtime layer is specifically designed to be EVM (Ethereum Virtual Machine) compatible, and this decision holds significant advantages for the ecosystem. By being EVM compatible, HeLa Chain ensures seamless compatibility with the vast community of developers and projects already established on the Ethereum platform.

The primary motivation behind this compatibility is to enable the effortless deployment of existing EVM-based projects onto the HeLa Chain. Given that a substantial portion of decentralized applications (dApps) is built using Solidity, the most widely used programming language for smart contracts on Ethereum, HeLa Chain can harness the skills and expertise of this large pool of developers. This paves the way for a faster development cycle, enabling the rapid creation of new use cases and projects on HeLa Chain.

Furthermore, the EVM compatibility allows HeLa Chain to enhance existing dApps with unique features offered exclusively by its platform. Developers can effortlessly integrate these distinctive functionalities into their projects, opening up new possibilities for innovation and creativity.

By creating an EVM compatible runtime layer, HeLa Chain extends a welcoming hand to the Ethereum community, offering an accessible and familiar environment for developers to transition and build upon. This alignment empowers HeLa Chain to foster a thriving ecosystem, where the expertise and resources of the larger Ethereum community can be leveraged to accelerate the growth of HeLa Chain and drive the development of pioneering blockchain solutions. Ultimately, the EVM compatibility of HeLa runtime positions the platform as a powerful and versatile hub for innovation, as it bridges the gap between the existing Ethereum ecosystem and the unique opportunities presented by HeLa Chain.

HeLa Network Information

Here are the HeLa Network information for developers to efficiently configure and deploy their applications on HeLa's testnet and mainnet. These essential details include network setup specifics, deployment guidelines, and essential network parameters. By utilizing this information, developers can seamlessly integrate their projects onto HeLa's blockchain platform, ensuring a smooth and successful deployment process on both the testnet for experimentation and the mainnet for real-world use.

SettingTestnetMainnet
Network NameHeLa TestnetHeLa Official Runtime
RPChttps://testnet-rpc.helachain.comhttps://mainnet-rpc.helachain.com
Chain ID6668888668
SYMBOLHLUSDHLUSD
Block Explorerhttps://testnet-blockexplorer.helachain.comhttps://helascan.io/

🌐 Before We Touch Code: Let’s Get You Ready

Imagine you’re setting up your kitchen before cooking:

  • VS Code: code-editor

  • Node.js :

    This is like the secret language that lets you talk to the blockchain world.

    Open your terminal/CLI and type:

node -v

If it answers you with a version number, you’re good. If it gives you the silent treatment, go to https://nodejs.org/ and download it.

  • Metamask wallet

    Think of this like your wallet, but to store your crypto instead of real cash. Get it here: https://metamask.io/

    Set it up. Save your seed phrase. Hide it like treasure.
    (Seriously. Don't lose it. Don't share it. Ever.)

  • HeLa Testnet faucet

    You’ll need some fake money (test tokens) to pay for gas while we play.

Let’s march.

  1. Create your project folder**:**

Developing Your First Token on HeLa Chain

If you have developed dApps on Ethereum or any EVM compatible chain before, you will feel at home. It is exactly the same. But if you are new, don’t worry, this document will help you embark on your first token development on HeLa chain. There many platforms and utilities that you can use to develop token. For example: REMIX, Truffle, HardHat, Foundry, etc. We will use Hardhat for our first token. Visit

Our first program is to develop our first Token on HeLa Chain

Step:1 Install Hardhat:

mkdir hela-token
cd hela-token
npm init -y
npm install --save-dev hardhat
npx hardhat

Choose "Create a basic sample project"

It will give you options like:

✔ What do you want to do? 
  - Create a JavaScript project
  - Create a TypeScript project
  - ...

👉 Select: “Create a JavaScript project” (use arrow keys and hit enter)

It will create some files for you.

Once done, you should see a folder structure like:

contracts/
scripts/
hardhat.config.js
package.json
...

🧁 Pause. Take a breath. You’ve done a LOT already, and and

🎉 Congrats. You just built yourself a smart contract workspace without writing a single line of code.

  1. Install OpenZeppelin Contracts

OpenZeppelin is a library of pre-built, secure smart contracts — like Lego blocks. We’ll use it to create your token. Since we’re building a token, use OpenZeppelin’s ERC20 standard:

npm install @openzeppelin/contracts
  • OpenZeppelin gives us pre-built secure templates.

  • Because honestly, you don’t want to write token code from scratch.

  • 99% of crypto projects use these same templates.

  1. Go to your project folder. Inside, you will see a contracts/ folder.

Inside contracts/, create a new file called:

MyToken.sol

Write your token contract

Inside contracts/, create a new file MyToken.sol:

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";

contract MyToken is ERC20 {
    constructor(uint256 initialSupply) ERC20("MyFirstHeLaToken", "HLT") {
        _mint(msg.sender, initialSupply);
    }
}

Currently, they only support 0.8.9 solidity version. For Ref: https://docs.helalabs.com/build-on-us/build-on-testnet

Explanation:

  • ERC20("MyFirstHeLaToken", "HLT") — this is your token name and symbol.

  • initialSupply — how many tokens you want to create at the start.

  • msg.sender — the wallet address that deploys the contract will receive all tokens.

You can change the token name and symbol to whatever you want.
For example:

ERC20("BananaCoin", "BAN")
  1. Write deployment script

Let’s write instructions for Hardhat to deploy this contract.
Inside scripts/, edit deploy.js (or create it if not present):

const hre = require("hardhat");

async function main() {
  const initialSupply = hre.ethers.utils.parseEther("1000000"); // 1 million tokens

  const Token = await hre.ethers.getContractFactory("MyToken");
  const token = await Token.deploy(initialSupply);

  await token.deployed();

  console.log("Token deployed to:", token.address);
}

main().catch((error) => {
  console.error(error);
  process.exitCode = 1;
});

Explanation:

  • initialSupply — we're creating 1 million tokens (you can change this amount).

  • hre.ethers.utils.parseEther("1000000") — converts "1 million tokens" into the smallest units ("wei").

  • getContractFactory("MyToken") — tells Hardhat to deploy the MyToken.sol contract you wrote.

  1. Configure Hardhat to connect to HeLa Chain

Now we need to tell Hardhat where HeLa Testnet lives.

Edit hardhat.config.js and add the network config for HeLa.

1️⃣ Install dotenv package

It’s safer to store your private key in a .env file, even for testnet practice:

npm install dotenv

2️⃣ Create a file called .env in your project root folder.

Inside .env, paste:

PRIVATE_KEY=27015ed9348599b64f1c5f56389e2105072a3a061a64611

Where do you get this private key?
Open Metamask → Account Details → Export Private Key.
(Never share your private key with anyone except your trusted computer.)

3️⃣ Edit your hardhat.config.js

Open hardhat.config.js and replace the contents with this:

require("@nomicfoundation/hardhat-toolbox");
require("dotenv").config();

module.exports = {
  solidity: "0.8.20",
  networks: {
    hela: {
      url: "https://testnet-rpc.helachain.com",
      chainId: 666888,
      accounts: [process.env.PRIVATE_KEY]
    }
  }
};

Explanation:

  • We loaded your private key securely from .env

  • We added HeLa Testnet RPC URL & Chain ID

  • Now Hardhat knows exactly how to deploy to HeLa Testnet.

  1. Deploy Your Token on HeLa Testnet

    Make sure:

    ✅ You’re inside the project folder
    ✅ Your .env file exists
    ✅ You have some testnet $HELA (for gas)

    From here you can get some $HELA token for your gas : https://testnet-faucet.helachain.com
    what you need to do is just simple paste your wallet address, make sure you have setup the custom network in your wallet ( in our case we used metamask wallet ) Ref : https://docs.helalabs.com/build-on-us/metamask

1️⃣ Run the deployment command:

npx hardhat run scripts/deploy.js --network hela

What you should see in your terminal:

Token deployed to: 0xYourContractAddressHere

Go check it on HeLa Testnet Explorer : https://testnet-blockexplorer.helachain.com/

Did your token deploy successfully?
Do you see your contract address?

If YES — you just deployed your first token! 🎉

🧨 ERRORS WILL HAPPEN. And that’s part of the fun.

The first time I did this, I ran into these classic beginner errors:

  • "Cannot read properties of undefined (reading ‘parseEther’)"

  • "token.deployed is not a function"

Both happen because newer versions of EthersJS (v6) changed how things work.

The good news?
You already have the fixed code below that works perfectly with Ethers v6, incase if you still face the issues.

So even if you see those errors elsewhere, you’re prepared.

#1 ERROR:


Giving error saying TypeError: Cannot read properties of undefined (reading 'parseEther')
    at main (/Users/shivam/hela-token/scripts/deploy.js:4:42)
    at Object.<anonymous> (/Users/shivam/hela-token/scripts/deploy.js:14:1)
    at Module._compile (node:internal/modules/cjs/loader:1554:14)
    at Object..js (node:internal/modules/cjs/loader:1706:10)
    at Module.load (node:internal/modules/cjs/loader:1289:32)
    at Function._load (node:internal/modules/cjs/loader:1108:12)
    at TracingChannel.traceSync (node:diagnostics_channel:322:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:220:24)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:170:5)
    at node:internal/main/run_main_module:36:49

You're getting this error:

TypeError: Cannot read properties of undefined (reading 'parseEther')

This means you're trying to use hre.ethers.utils.parseEther(...), but hre.ethers isn't available in that context.

Fix: Use ethers directly

Let’s rewrite your deploy.js properly.

Step-by-step fix:

  1. Modify deploy.js like this:

const { ethers } = require("hardhat");

async function main() {
  const initialSupply = ethers.utils.parseEther("1000000"); // 1 million tokens

  const Token = await ethers.getContractFactory("MyToken");
  const token = await Token.deploy(initialSupply);

  await token.deployed();

  console.log("Token deployed to:", token.address);
}

main().catch((error) => {
  console.error(error);
  process.exitCode = 1;
});

What changed:

  • Instead of hre.ethers, we now use const { ethers } = require("hardhat"), which is the correct way to access it when importing directly.

  • This gives us access to ethers.utils.parseEther(...) and all other EthersJS tools Hardhat gives you.

  1. Try running again:

npx hardhat run scripts/deploy.js --network hela

#2 ERROR:

error : 
TypeError: Cannot read properties of undefined (reading 'parseEther')
    at main (/Users/shivam/hela-token/scripts/deploy.js:4:38)
    at Object.<anonymous> (/Users/shivam/hela-token/scripts/deploy.js:14:1)
    at Module._compile (node:internal/modules/cjs/loader:1554:14)
    at Object..js (node:internal/modules/cjs/loader:1706:10)
    at Module.load (node:internal/modules/cjs/loader:1289:32)
    at Function._load (node:internal/modules/cjs/loader:1108:12)
    at TracingChannel.traceSync (node:diagnostics_channel:322:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:220:24)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:170:5)
    at node:internal/main/run_main_module:36:49

Explicit import of EthersJS

  1. First, install Ethers (the standalone library):

npm install ethers
  1. Then modify your deploy.js as:

const hre = require("hardhat");
const { ethers } = require("ethers");

async function main() {
  const initialSupply = ethers.parseEther("1000000"); // 1 million tokens

  const Token = await hre.ethers.getContractFactory("MyToken");
  const token = await Token.deploy(initialSupply);

  // Wait for the contract to be mined
  await token.waitForDeployment();

  console.log("Token deployed to:", await token.getAddress());
}

main().catch((error) => {
  console.error(error);
  process.exitCode = 1;
});

Key Changes:

  • We import { ethers } from "ethers" (not from hardhat directly)

  • In Ethers v6+, parseEther is now used like: ethers.parseEther("1000000") (no utils)

Summary:

  • The Hardhat version you're using comes with Ethers v6

  • Ethers v6 has some breaking changes from Ethers v5.

  • I am writing this now for Ethers v6 so you're fully future-proof.

Now try again..

npx hardhat run scripts/deploy.js --network hela

🎉 Boom.

Your token now exists on HeLa Testnet.

See your token on HeLa Block Explorer : https://testnet.helascan.io

Add your token to Metamask

  • In Metamask, select your HeLa Testnet network.

  • Click Import Tokens.

  • Paste your contract address.

  • Your token balance should show up.

🎉 And that’s it, my friend.

You have officially created your first token.


❤️ Final words from your DevRel buddy:

You thought this was hard.
But look at you. You did it.

The secret is, blockchain is NOT about coding.
It’s about breaking it into small steps.
And you just climbed the first mountain.

0
Subscribe to my newsletter

Read articles from Shivam Garg directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Shivam Garg
Shivam Garg

A Developer Advocate with a deep passion for people and community building. My journey ignited during my university years as a Lead organiser for the Google Developers Club, where I proudly represented India at a flagship Google WoW conference 🌏. Over the years, I've been deeply involved in building and scaling impactful community programs, connecting with over 100k learners both within India and across borders. My experience extends significantly into the Web3 space, where I've built community programs and marketing strategies from the ground up. This involved acquiring 50k+ users for ecosystems and Web3 products, scaling 10+ global Ambassador Programs to 5000+ members, and organizing 30+ high-quality tech events with names like Google, Socrates, HiveChain, CoreDao, Chainlink, and BeraChain, engaging 5000+ developers in 10 months. My passion for fostering growth has also led to the curation of renowned Developer Camps and conferences, with two of them even trending on Twitter (now X) Currently, I lead the marketing and community efforts for Socrates, where we focus on sparking creativity, driving mass adoption in the crypto ecosystem, and making Web3 accessible to all.