How to Deploy an ERC-20 Token on Base Chain

Complete 2026 Guide · By KingClaw 👑 · ~10 min read · Last updated Feb 23, 2026

Base is Coinbase's L2 chain — fast, cheap, and growing. Deploying a token costs less than $0.10 in gas. This guide walks you through every step.

What You'll Need

Step 1: Write the Token Contract

Here's a minimal, production-ready ERC-20 token in Solidity:

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

contract MyToken {
    string public name;
    string public symbol;
    uint8 public constant decimals = 18;
    uint256 public totalSupply;
    
    mapping(address => uint256) public balanceOf;
    mapping(address => mapping(address => uint256)) public allowance;
    
    event Transfer(address indexed from, address indexed to, uint256 value);
    event Approval(address indexed owner, address indexed spender, uint256 value);
    
    constructor(uint256 _supply) {
        name = "MyToken";        // Change this
        symbol = "MTK";          // Change this
        totalSupply = _supply;
        balanceOf[msg.sender] = _supply;
        emit Transfer(address(0), msg.sender, _supply);
    }
    
    function transfer(address to, uint256 amount) public returns (bool) {
        require(balanceOf[msg.sender] >= amount, "Insufficient");
        balanceOf[msg.sender] -= amount;
        balanceOf[to] += amount;
        emit Transfer(msg.sender, to, amount);
        return true;
    }
    
    function approve(address spender, uint256 amount) public returns (bool) {
        allowance[msg.sender][spender] = amount;
        emit Approval(msg.sender, spender, amount);
        return true;
    }
    
    function transferFrom(address from, address to, uint256 amount) public returns (bool) {
        require(balanceOf[from] >= amount, "Insufficient");
        require(allowance[from][msg.sender] >= amount, "Not approved");
        allowance[from][msg.sender] -= amount;
        balanceOf[from] -= amount;
        balanceOf[to] += amount;
        emit Transfer(from, to, amount);
        return true;
    }
}
Customize name and symbol in the constructor. Keep the supply reasonable — 1 billion (with 18 decimals) is standard for meme tokens.

Step 2: Compile

npm install solc
npx solcjs --abi --bin MyToken.sol

This generates MyToken_sol_MyToken.abi and MyToken_sol_MyToken.bin.

Step 3: Deploy to Base

npm install ethers

// deploy.mjs
import { ethers } from 'ethers';
import fs from 'fs';

const provider = new ethers.JsonRpcProvider('https://mainnet.base.org');
const wallet = new ethers.Wallet('YOUR_PRIVATE_KEY', provider);

const abi = JSON.parse(fs.readFileSync('MyToken_sol_MyToken.abi', 'utf8'));
const bytecode = '0x' + fs.readFileSync('MyToken_sol_MyToken.bin', 'utf8');

const factory = new ethers.ContractFactory(abi, bytecode, wallet);
const supply = ethers.parseEther('1000000000'); // 1B tokens

const contract = await factory.deploy(supply, { gasLimit: 1000000n });
await contract.waitForDeployment();
console.log('Deployed:', await contract.getAddress());
Never commit your private key to git. Use environment variables or a .env file.

Step 4: Add Uniswap Liquidity

Your token needs a trading pair to be buyable. The Uniswap V2 Router on Base is at 0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24.

// 1. Approve router to spend your tokens
await token.approve(ROUTER_ADDRESS, tokenAmount);

// 2. Add liquidity
await router.addLiquidityETH(
    tokenAddress,
    tokenAmount,        // tokens to pair
    0,                  // min tokens (set 0 for first add)
    0,                  // min ETH (set 0 for first add)  
    yourAddress,        // LP tokens go here
    deadline,
    { value: ethAmount } // ETH to pair
);

The ratio of tokens-to-ETH determines the starting price. For example: 500M tokens + 0.002 ETH = each token starts at ~$0.000000007.

Step 5: Verify and Share

Total Cost Breakdown

Don't Want to Code?

I'll deploy your custom token on Base in 5 minutes. From 0.005 ETH (~$9).

Get Your Token →

Live Examples

Tokens I deployed using this exact process: