How to Create an ERC20 Token on ZKsync Era

Learn how to effortlessly create and deploy your own custom ERC20 token on ZKsync Era, even without coding knowledge, using an intuitive no-code tool for a simplified and efficient launch.


This comprehensive, step-by-step guide covers everything you need to know, from understanding token standards to the practical deployment of your digital asset, helping you unlock the power of decentralized finance.

We'll be using the SmartContracts Tools Token Generator, a powerful and intuitive tool that simplifies the entire process.

Token Generator is available on
ZKSync Token Generator

Introduction

In the rapidly evolving world of blockchain and decentralized finance (DeFi), creating your own digital asset has become more accessible than ever. Whether you're planning a new dApp, a community token, or simply want to explore the fascinating world of cryptocurrencies, the ERC20 standard on ZKsync Era provides a robust and widely adopted framework for token creation.

This tutorial will walk you through the entire process of generating and deploying your very own ERC20 token on ZKsync Era, utilizing Token Generator, the user-friendly tool powered by SmartContracts Tools. We'll cover everything from understanding the fundamentals of ERC20 to the practical steps of bringing your token to life. By the end of this tutorial, you'll have a fully functional ERC20 token ready for use on ZKsync Era!

Understanding the ERC20 Standard and ZKsync Era

Before we dive into the creation process, it's essential to grasp what an ERC20 token is and why it's so significant, especially in the context of ZKsync Era.

What is a ERC20 Token?

ERC20 (Ethereum Request for Comment 20) is a technical standard used for all smart contracts on the Ethereum blockchain for fungible tokens. Fungible means that each unit of the token is interchangeable with another identical unit. Think of it like a dollar bill – one dollar bill is worth the same as any other dollar bill.

The ERC20 standard defines a common set of rules that all tokens must adhere to, ensuring interoperability within the Ethereum ecosystem.
These rules include:

  • totalSupply(): The total number of tokens in existence.
  • balanceOf(): The balance of tokens for a specific address.
  • transfer(): To transfer tokens from one address to another.
  • transferFrom(): To allow a third party to transfer tokens on behalf of the token holder.
  • approve(): To allow a spender to withdraw a pre-defined amount of tokens from an account.
  • allowance(): To check the amount of tokens that an owner allowed to a spender.

This standardization is crucial because it allows different dApps, wallets, and exchanges to interact seamlessly with any ERC20 token.

Why ZKsync Era for Your ERC20 Token?

ZKsync Era is a Layer 2 scaling solution for Ethereum that uses zero-knowledge rollups to offer fast, low-cost transactions while preserving Ethereum’s security. It supports smart contracts and is EVM-compatible, enabling seamless dApp deployment and interoperability.
Deploying your ERC20 token on ZKsync Era means you can leverage these advantages, making your token more accessible and cost-effective for users.

ZKsync Era is fully compatible with the Ethereum Virtual Machine (EVM), which means that tools and smart contracts designed for Ethereum can be easily deployed and used on ZKsync Era. This compatibility simplifies the development process and allows for a smooth transition for developers familiar with Ethereum.

Creating and Deploying Your ERC20 Token on ZKsync Era

Step-by-Step Guide

Step 1: Access the Token Generator

Navigate to the ZKSync Token Generator page.

You'll see an interface designed to guide you through the token creation process.

Token Generator Filters

Step 2: Connect Your Wallet

Before you can create and deploy your token, you'll need to connect a Web3 wallet (like MetaMask) to the platform. This wallet will be used to sign transactions and pay for the gas fees associated with deploying your smart contract on the ZKsync Era blockchain.

  1. Click on the "Connect Wallet" button, usually located in the top right corner of the page.
  2. Select your preferred wallet (e.g., MetaMask).
  3. Approve the connection request in your wallet.
  4. Ensure your wallet is set to the ZKsync Era network. If not, the platform will likely prompt you to switch, or you'll need to manually change it in your wallet settings. You'll need some native ETH in your wallet to cover gas fees.

Step 3: Define Your Token's Properties

This is where you'll personalize your ERC20 token. The Token Generator will provide fields for the following:

  • Token Name: This is the full, human-readable name of your token (e.g., "My Awesome Coin"). Choose something descriptive and unique.
  • Token Symbol: This is the ticker symbol for your token, typically 3-5 characters long (e.g., "MAC"). This is what exchanges and wallets will display.
  • Total Supply: The total number of tokens that will ever exist. This value maybe fixed once the contract is deployed. Be mindful of this number – it impacts the perceived value and scarcity of your token.
  • Decimals: This defines the divisibility of your token. The most common value for ERC20 tokens is 18, meaning your token can be divided into 1018 smaller units. For example, if you have 1 token with 18 decimals, it can be represented as 1,000,000,000,000,000,000 units. Unless you have a specific reason otherwise, it's generally recommended to stick with 18 decimals for broad compatibility.
Token Generator Form

Step 4: Configure Advanced Options (Optional)

Token Generator also provides advanced options to add more functionality to your token.
These might include:

  • Burnable: The Token can be burned. It means that you can choose to reduce the circulating supply by destroying some of your tokens.
  • Mintable: Owner or accounts with minting permission will be able to generate new tokens, up to token max supply. You can also disable minting if you don’t want to generate tokens anymore.
  • Anti Whale Protection: Users cannot hold more than a specific percentage of total supply. Owner can change that percentage or disable it. Owner can exclude some accounts from the anti whale mechanism.
  • Liquidity Pool Setup: A Liquidity Pool pair will automatically be created on DEX. Token owner can set an initial supply amount to add to the liquidity pool and can choose to lock LP tokens forever in the token contract or receive them in their wallet.
  • Deflationary: Token supply will reduce over time. For each transaction, a fee will be automatically burned. Owner can exclude some accounts from the deflation mechanism.
  • Taxable: A tax fee will be added to transfers. For each transaction, a fee will be automatically sent to a predefined address. Owner can exclude some accounts from the taxation mechanism.
  • Reflection: For each transaction, a fee will automatically be divided among token holders to reward them. Owner can exclude some accounts from the fee or from the reflection mechanism.
  • Pausable: Token transfer can be paused. Useful to prevent trades until a period or freezing all token transfers.
  • Capped: You won't be able to generate more tokens than the defined token cap. This ensure people that you will not generate more tokens than declared.
  • Unlimited: You can generate more tokens with no limited supply. Owner can always stop minting to fix the current supply and stop generating new tokens.
  • Whitelist: Owner or authorized users can define which addresses are permitted to send and receive tokens. This is crucial for RWA Tokenization, ensuring that only compliant users (e.g., KYC-verified addresses) can participate in transactions.
  • Controlled: Users with special permissions can freeze accounts and execute controlled operations, such as forcing token transfers between accounts. This is essential for RWA Tokenization, where compliance with legal and financial regulations may require interventions.
  • Ownable Access: Token will have an Owner. Token owner will be able to mint new tokens or to call the finish minting function.
  • Role Based Access: Token will have Roles. You can add or remove ADMIN or MINTER role to addresses. Token will be Ownable too.
  • ERC1363 Callback: ERC1363 is an extension interface for ERC20 tokens that supports executing custom logic on a recipient contract after transfers, or on a spender contract after approvals, all within a single transaction.
  • Token Recover: There are lots of tokens lost forever into Smart Contracts. It allows the contract owner to recover any ERC20 or NFT token sent into the contract for error and send them to a receiver

Carefully consider which of these features are relevant to your token's purpose.

Step 5: Generate and Review Your Contract Parameters

Once you've filled in all the details and selected your desired features, click on the "Create" button. The generator will compile the Solidity code for your ERC20 token based on your inputs.

Before proceeding to deployment, it's crucial to review the contract parameters. While the generator automates the process, understanding the code, even at a high level, is beneficial. You'll typically see a summary of your token's properties.

Token Generator Checkout

Step 6: Deploy Your Token to ZKsync Era

This is the final and most exciting step!

  1. After reviewing, click on the "Create Token" button.
  2. Your connected Web3 wallet (e.g., MetaMask) will pop up, asking you to confirm the transaction. This transaction will deploy your smart contract to the ZKsync Era blockchain.
  3. Review the gas fees carefully. Gas fees are paid in ETH and compensate the network validators for processing your transaction. The fee can fluctuate depending on network congestion.
  4. Confirm the transaction in your wallet.

Once you confirm, the transaction will be submitted to the ZKsync Era network. This may take a few seconds to a few minutes, depending on network conditions.

Token Generator Wallet

Step 7: Verify Your Deployment

After the transaction is confirmed, you'll receive a transaction hash (TxID) and the contract address of your newly deployed ERC20 token.

  1. Copy your Contract Address: This is the unique identifier for your token on the ZKsync Era blockchain.
  2. View on Block Explorer: Click on the provided link to the ZKsync Era block explorer (e.g., ZKsync Era Etherscan).

On the block explorer, you can verify your token's details, including its total supply, the deploying address, and all the functions defined by the ERC20 standard. You can also view the source code of your deployed contract.

Token Generator Transaction

Adding Your Token to Your Wallet

Now that your token is live on ZKsync Era, you'll likely want to see it in your wallet.
Here's how to add a custom token to MetaMask:

Option 1.

Click on the "Add to Wallet" button. MetaMask will prompt you to accept token addition. Confirm.

Option 2.

  1. Open your MetaMask wallet.
  2. Ensure you are connected to the ZKsync Era network.
  3. Scroll down and click on "Import tokens."
  4. Select "Custom Token."
  5. Paste your token's contract address into the "Token Contract Address" field.
  6. The "Token Symbol" and "Token Decimal" fields should auto-populate. If not, enter them manually.
  7. Click "Add Custom Token" and then "Import Tokens."

Your new ERC20 token should now appear in your MetaMask wallet!

Next Steps for Your ERC20 Token on ZKsync Era

Congratulations! You've successfully created and deployed your own ERC20 token on the ZKsync Era blockchain. What's next?

  • Share Your Token:
    Let others know about your new token! Share the contract address and block explorer link.
  • Integrate with dApps:
    If you're building a decentralized application, you can now integrate your token into its functionality.
  • List on Exchanges:
    For broader adoption, you might consider listing your token on decentralized exchanges (DEXs) on ZKsync Era, such as Uniswap. This typically involves providing liquidity.
  • Build a Community:
    Foster a community around your token.
Create on ZKsync Era
HelloERC20
A minimal ERC20 token designed to help beginners understand how tokens work. The HelloERC20 template includes the essential features of the ERC20 standard without any advanced functionality and a limited supply. This is ideal for learning purposes or testing basic token operations. It provides a clean and lightweight implementation for newcomers.
StandardERC20
The industry-standard ERC20 token template offering robust and reliable token functionalities. It supports essential ERC20 operations while keeping an eye on security. This template is widely compatible with decentralized exchanges and other blockchain tools. StandardERC20 is ideal for projects looking for a stable, tried-and-tested token solution.
BurnableERC20
The BurnableERC20 token allows token holders to burn their tokens, permanently removing them from circulation. The burn mechanism reduces the total supply over time, creating scarcity that can positively influence token value. It is particularly useful for deflationary token models and projects aiming to control supply. Burning tokens can be done manually by holders.
PowerfulERC20
PowerfulERC20 includes a robust set of features such as minting, burning, ERC1363, role management and token recovery. It is a versatile token template tailored for large-scale projects and advanced DeFi applications. This template empowers token owners to implement comprehensive tokenomics with ease.
TaxableERC20
The TaxableERC20 token allows the owner to set a tax fee on every transaction. The collected tax is automatically transferred to a predefined wallet address, which can be used for funding, development, or other purposes. Owners can exclude specific accounts from taxation to accommodate unique project needs. It is highly suitable for projects requiring funding mechanisms.
RWAERC20
The RWAERC20 is a specialized token designed for real-world asset (RWA) tokenization, ensuring compliance through a built-in whitelist system. Transfers are strictly controlled, allowing only approved wallets to send and receive tokens, while role-based access ensures different administrative permissions for enhanced security. It supports batch operations to improve efficiency in large-scale transactions. This token is ideal for regulated environments, institutional adoption, and asset-backed tokenization projects.
ReflectionERC20
ReflectionERC20 rewards token holders by redistributing a percentage of transaction fees back to them. This automatic reflection mechanism incentivizes long-term holding and passive income generation. Holders receive rewards proportional to their holdings, while transactions continue seamlessly. It is ideal for community-driven projects and reward-based models.
SimpleERC20
An ERC20 token that focuses on providing basic token operations with minimal complexity. SimpleERC20 is perfect for projects that require a simple token without additional features like minting or burning. This template ensures fast deployment and smooth operation for projects with straightforward needs. It adheres strictly to the ERC20 standard for compatibility.
CommonERC20
Combining the core ERC20 functionalities with useful extensions like burning and minting, the CommonERC20 template offers a well-rounded token implementation. It is ideal for projects requiring standard operations while enabling token supply control. This template strikes a balance between simplicity and flexibility, making it suitable for diverse use cases.
MintableERC20
The MintableERC20 token allows authorized accounts or the contract owner to create new tokens and increase the supply. This functionality is particularly useful for projects needing ongoing token issuance, such as rewards or incentives. The minting process can be restricted to ensure supply caps are respected. It provides flexibility for evolving token economies.
AmazingERC20
A highly flexible and advanced token template, AmazingERC20 combines premium features like minting, burning, ERC1363, and token recovery. It is designed for ambitious projects that require a wide range of functionalities in a single token. This template caters to complex tokenomic models and multi-feature requirements.
PausableERC20
PausableERC20 allows token transfers to be paused and resumed by the contract owner. This feature is essential for addressing emergencies, vulnerabilities, or maintenance needs. It adds an extra layer of security and control, making it ideal for risk-averse projects requiring operational safety.
UnlimitedERC20
The UnlimitedERC20 token removes all supply restrictions, allowing infinite token issuance. This template is particularly useful for projects requiring continuous token generation, such as reward-based systems or inflationary models. It provides full control over supply dynamics and supports flexible token economies.
AntiWhaleERC20
AntiWhaleERC20 introduces a holding limit to prevent individual wallets from holding more than a specific percentage of the total token supply. This feature helps promote decentralization by discouraging large holders (whales) from dominating the token economy. It ensures a fairer token distribution and is suitable for community-focused projects.
DeflationaryERC20
The DeflationaryERC20 token reduces its supply over time by burning a portion of tokens during each transaction. This automatic deflation mechanism helps create scarcity and supports long-term value appreciation. Owners can exclude specific accounts from deflation if necessary. It is ideal for projects that emphasize controlled supply reduction.
PayableERC20
The PayableERC20 token supports payable functionality. Integrating the ERC1363 standard, allows users to transfer tokens and execute callbacks in a single transaction. It is useful for projects that integrate payments, subscriptions, or any token operations within a single transfer. This feature makes it easier to interact with smart contracts requiring tokens transfer.
StarterERC20
A streamlined ERC20 token template designed for projects at the starting phase. It provides all the standard ERC20 functionalities while keeping the implementation simple and easy to deploy. Perfect for small-scale projects or teams who want a straightforward token launch. The StarterERC20 template offers a great balance between simplicity and utility but with non customizable supply.
PermitERC20
The PermitERC20 token implements ERC2612 functionality, enabling gasless approvals via off-chain signatures. Users can approve token spending without sending an on-chain transaction, which significantly improves user experience. This feature is particularly valuable for DeFi applications requiring frequent approvals. It reduces costs and friction for token holders.

Ready to deploy your ERC20 Token on ZKsync Era?

Create ERC20 Token
Token Generator is available on