Phone Portal ↗ Preorder
Developers

Developer Hub

Build on MAGNE L1 and M Hash L2. Get network configuration, developer tools, and documentation.

magne-cli — developer
$ magne dev init
MAGNE Dev Environment
network: MAGNE L1 + M Hash L2
chain-id: 20250810 (L1) / 20250827 (L2)
tools: Hardhat, Foundry, ethers.js
 
$ magne dev start
Connected to testnet
rpc: https://rpc.testnet.magicalhash.com

Network Configuration

Current configuration parameters for MAGNE L1 and M Hash L2 testnets

⛓️

MAGNE L1 Testnet

Testnet Live
Chain ID20250810
TokenMHA
RPChttps://rpc.testnet.magicalhash.com
Explorerexplorer.testnet.magicalhash.com
🚀

M Hash L2 Testnet

Testnet Live
Chain ID20250827
TokenMHA
RPChttps://l2-rpc.testnet.magicalhash.com
Explorerl2-explorer.testnet.magicalhash.com
Note: Testnet parameters are subject to change. Do not use testnet endpoints for production deployments. Testnet tokens have no monetary value.

Quick Start

Four steps to start building on MAGNE

STEP 01

Add Network to Wallet

Add MAGNE L1 or M Hash L2 testnet to MetaMask or your preferred Web3 wallet using the network configuration above.

Chain ID: 20250810 (L1) / 20250827 (L2)
STEP 02

Get Testnet MHA

Visit the faucet to get testnet MHA tokens for development and testing.

Faucet in dev — contact @MagneAI
STEP 03

Deploy Contracts

Deploy smart contracts to the testnet using Hardhat, Foundry, or your preferred development framework.

npx hardhat run scripts/deploy.js --network magne-l1
STEP 04

Build DApp

Connect your DApp to the MAGNE network using ethers.js, web3.js, or viem.

ethers.JsonRpcProvider('https://rpc.testnet.magicalhash.com')

Developer Tools

Tools and services needed for building on the MAGNE network

🔍

L1 Explorer

MAGNE L1 block explorer

🔍

L2 Explorer

M Hash L2 block explorer

💧

Faucet

Get testnet MHA tokens

📂

GitHub

Access sample code and tools

Code Examples

Common integration examples

ethers.js Connection

const { ethers } = require('ethers'); const provider = new ethers.JsonRpcProvider( 'https://rpc.testnet.magicalhash.com' ); const wallet = new ethers.Wallet( process.env.TESTNET_PRIVATE_KEY, provider ); const balance = await provider.getBalance(wallet.address); console.log('Balance:', ethers.formatEther(balance), 'MHA'); // Security: use a dedicated test wallet. // Never expose private keys in frontend code or public repos.

Hardhat Configuration

// hardhat.config.js module.exports = { networks: { 'magne-l1': { url: 'https://rpc.testnet.magicalhash.com', chainId: 20250810, }, 'magne-l2': { url: 'https://l2-rpc.testnet.magicalhash.com', chainId: 20250827, }, }, };

Agent Pay Integration Reference

Understand the target integration architecture for MAGNE Agent Pay, testnet environment, currently disclosed evidence, and development boundaries.