Deploy Smart Contracts with Remix
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 HeLa using Remix.
Prerequisites
Before you begin, ensure you have:
MetaMask installed and configured for HeLa network
HLUSD tokens in your wallet for gas fees
A test account (recommended to use a separate browser for testing)
Metamask setup hyperlink
Step 1: Open Remix IDE
Step 2: Create ERC-20 Token Contract
In the file explorer, create a new file under the
contracts
folder namedMyToken.sol
Copy and paste the following ERC-20 token contract code:
// 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, 5000 * 10 ** decimals());
}
}
Customizing Your Token
You can customize your token by changing:
"MyFirstHelaToken"
- The token name"HLT"
- The token symbol (appears in MetaMask, max 5 characters)5000
- The initial token supply minted to your wallet </aside>
Step 3: Compile the Contract
Go to the Solidity Compiler tab in the left sidebar
Click Compile MyToken.sol
Ensure you see a green checkmark indicating successful compilation
Step 4: Deploy to HeLa
Navigate to the Deploy & Run Transactions tab
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.
Select your MyToken contract from the dropdown
Click Deploy to deploy your ERC-20 token contract
Confirm the deployment transaction in MetaMask
Step 5: Get Contract Address
After successful deployment, copy the Contract Address from Remix
Step 6: Import Token to MetaMask
In MetaMask, go to Tokens tab and click Import Tokens
Paste the contract address from Remix into the Token Contract Address field
The token information should auto-populate (Token Symbol and Decimals)
Click Add Custom Token and then Import Tokens
Step 7: Verify Token Balance
Check your Tokens tab in MetaMask to see your newly minted tokens
You should see 5000 tokens (or your custom amount) in your wallet
Step 8: Transfer Tokens
Select your token in MetaMask and click Send
Enter the recipient address and amount
Click Next and confirm the transaction
Wait for the transaction to be confirmed
Step 9: Verify on Block Explorer
In MetaMask, click on the transaction and select View on block explorer
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 HLUSD for gas fees
Token not appearing: Double-check the contract address when importing
MetaMask issues: Reset MetaMask via settings if problems persist
Support :
If you encounter any issues during setup or require assistance, please join the HeLa Developer Community for direct support and guidance.
Last updated