Build on BLOCX.
Guide to Deploy BLOCX-20 Token via Remix + MetaMask on BLOCX Mainnet.
Last updated
Guide to Deploy BLOCX-20 Token via Remix + MetaMask on BLOCX Mainnet.
Last updated
Reference token:
Open Remix at:
Next, open the contracts folder and create a new fileâin this case, demo.sol
."
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
Go to the Solidity Compiler tab (đ¨ icon).
Select the correct compiler version (0.8.20
).
Hit "Compile Demo.sol" â .
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 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...
).
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 âī¸.
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.