Skip to main content

Mint Universal ERC-20 Tokens

10 mins

In this tutorial, you'll create, deploy, and interact with a simple ERC-20 token on Push Chain. The main difference is that this ERC-20 token is a universal token that can be minted by anyone on any chain.

By the end of this tutorial you’ll be able to:

  • ✅ Build a universal ERC-20 token, we will call it $UNICORN.
  • ✅ Have users from any chain connect and interact with it.

Write the Contract

We will start with taking the ERC-20 contract from OpenZeppelin. The only change we will make is removing the restriction of onlyOwner modifier in the functionality of minting new tokens.

Universal ERC-20 Contract
ERC20.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.22;

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

contract Token is ERC20 {
constructor(string memory name, string memory symbol) ERC20(name, symbol) {
_mint(msg.sender, 1_000_000 * 10 ** decimals());
}

function mint(address to, uint256 amount) external {
_mint(to, amount);
}
}

Understanding the Contract

This contract is a simple ERC-20 token:

  • We are minting 1,000,000 tokens with 18 decimals and giving it to the deployer of the contract.
  • We have removed onlyOwner from mint() function in order to enable anyone to mint freely from this contract.

Compile & Deploy

You can use any of the following guides to build and deploy this contract on Push Chain:

  1. Remix IDE
  2. Foundry Configuration
  3. Hardhat Configuration

Once deployed, you can interact with the ERC-20 contract just like on any other EVM-compatible chain.

Verify Contract

If you are using Foundry or Hardhat, the contract is already verified for you. If you are using Remix, you can verify the contract on the Push Chain Explorer by going to verify and publish contract.

Interact with Universal ERC-20 Token

The Universal ERC-20 contract is deployed on Push Chain Testnet.
This app lets any user — whether on Ethereum, Solana, or Push Chain — mint $UNICORN tokens directly from the frontend.

Demo Token ERC-20 Contract Address: 0x0165878A594ca255338adfa4d48449f69242Eb8F

Steps to interact:

  1. Connect your wallet (Ethereum, Solana, or Push Chain).
  2. Click the Mint Token button — this calls the ERC-20’s mint() function through Push Universal Transactions.
  3. Wait for the transaction to confirm.
  4. Your $UNICORN balance will update in the UI automatically.
  5. (Optional) Click View in Explorer to inspect the transaction on Push Chain Explorer.

💡 Tip: Why this matters
This is the simplest form of a Universal Token.
Without bridges or wrapped assets, users on any chain can mint and hold the same ERC-20 natively on Push Chain.

Live Playground

REACT PLAYGROUND
LIVE APP PREVIEW

Source Code

What we Achieved

In this tutorial, we built the simplest possible ERC-20-style token interaction.

  • We wrote and deployed a minimal ERC-20 contract with an open mint() function.
  • We minted tokens and confirmed balances via the frontend.

With just these two functions, you now have the foundation of a token system.

Next Tutorial

Up until now, we’ve been sending one transaction at a time.

In real-world apps, users often need to perform several actions together (for example: approve → transfer, or multiple contract calls in a single flow).


In the next tutorial, we’ll explore batching multiple transactions as one universal transaction:

  1. How to combine several actions into a single transaction.
  2. Why batching improves user experience (fewer wallet popups, less friction).
  3. Practical code examples of executing multiple calls in sequence or atomically.

This will help you take the step from simple token interactions to more powerful app logic on Push Chain. 🚀