BLOCX.
  • 👋Welcome
  • SPECIFICATIONS
    • â„šī¸Introduction
    • đŸĒ™Coin Details
    • â›“ī¸Chain Rewards & Fees
    • 📊Emission Schedule
    • đŸ—“ī¸Team Vesting
  • Get Started
    • 🌐Network Details
    • đŸ§ŦNetwork Node Set-Up
    • 👨‍đŸ’ģBuild on BLOCX.
  • VALIDATOR NODE
    • â„šī¸Introduction
    • 📡Installation Process
    • 🔍Monitoring Your Node
    • âš™ī¸Node Maintenance
    • 🛑Exiting the Validator Node
    • 🆘Troubleshooting
    • ❓FAQ
    • 🔐Unlock Masternode
  • GRIDBOX
    • ⚡Add Machine
    • đŸ–Ĩī¸Rent Machine
  • BRIDGE
    • đŸĻŠMainnet Guide
    • đŸĻŠERC20 Guide
    • 🔄Bridge Guide
  • LEDGER
    • 📖Ledger Guide
  • LINKS AND INFORMATION
    • 🔗Links
Powered by GitBook
On this page
  • Find Reference
  • Open Remix
  • Write Your Contract
  • Compile the Contract
  • Connect MetaMask (Injected Provider)
  • Set Deployment Settings
  • Deploy
  • Interact with the Deployed Contract
  1. Get Started

Build on BLOCX.

Guide to Deploy BLOCX-20 Token via Remix + MetaMask on BLOCX Mainnet.

PreviousNetwork Node Set-UpNextIntroduction

Last updated 3 days ago

Find Reference

Reference token:


Open Remix

  • Open Remix at:

  • Next, open the contracts folder and create a new file—in this case, demo.sol."


Write Your Contract

In Remix:

  • Open the Solidity file (e.g., Demo.sol)

  • Import the BLOCX-20 contract from an audited OpenZeppelin ERC-20 source, then set your variables, such as the name, minted amount, and other parameters. Screenshot Reference: Basic.png

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

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

contract Demo is ERC20 {
    constructor(address recipient) ERC20("demo", "demo") {
        _mint(recipient, 10000 * 10 ** decimals());
    }
}

Compile the Contract

  • Go to the Solidity Compiler tab (🔨 icon).

  • Select the correct compiler version (0.8.20).

  • Hit "Compile Demo.sol" ✅.


Connect MetaMask (Injected Provider)

  • Go to the Deploy & Run Transactions tab (Ethereum icon).

  • Under ENVIRONMENT, choose Injected Provider - MetaMask ➤ This connects Remix to MetaMask's current network.

Screenshot Reference: Injected Provider - MetaMask, account shown.

Make sure MetaMask is connected to your target chain (e.g., BLOCX-Mainnet with ID 86996 as in screenshot).


Set Deployment Settings

  • Set Value: Leave at 0 (unless the constructor needs BLOCX).

  • Select Contract: Demo - Demo.sol

  • In the DEPLOY section, enter the recipient address (who will receive the minted tokens).

Make sure it’s a valid BLOCX address (starts with 0x...).


Deploy

  • Click Transact ➝ MetaMask popup appears.

  • Review and Confirm the transaction.

Screenshot Reference: MetaMask deploy confirmation window with fee and data.

Wait for transaction confirmation on-chain â›“ī¸.


Interact with the Deployed Contract

After deployment:

  • Under Deployed Contracts, expand your contract instance.

  • You can now interact with:

    • balanceOf(address)

    • transfer(to, value)

    • approve, transferFrom

    • totalSupply, name, symbol, decimals

Screenshot Reference: Interaction UI with balanceOf, transfer, etc.

For example:

  • Check balance with balanceOf(recipient)

  • Transfer tokens using transfer(to, amount) with appropriate decimals.

👨‍đŸ’ģ
https://blocxscan.com/address/0x17Fe8466DF6a2dD30c87576367CA398ef24128C7
https://remix.ethereum.org/
Page cover image