Docs

Network Info

Network Overview (Mainnet / Testnet)

Somnia has two networks: Mainnet and Testnet. Each runs the Global L1 and the Tokyo Subchain. Somnia networks lists every chain on both. Both serve different purposes in the ecosystem, and knowing when to use which is essential for building and deploying applications effectively.


Somnia Mainnet

The Mainnet is the official production blockchain of Somnia. All transactions on this chain are final and irreversible and require SOMI tokens as gas.

Key Characteristics

  • Real-value environment secured by Somnia’s validator set.
  • Integrated with wallets, explorers, bridges, and infrastructure providers.
  • Permanent and immutable transaction history.
  • Designed for live dApps, end-users, and production-ready deployments.

When to Use Mainnet

  • Deploying audited and tested smart contracts.
  • Running dApps with real users and assets.
  • Managing liquidity, staking, governance, or NFT projects.
  • Partner integrations requiring security and finality.

Example

Deploy to Somnia Mainnet

# Deploying a contract to Somnia Mainnet
# hardhat.config.js needs a somnia_mainnet network: url "https://api.infra.mainnet.somnia.network", chainId 5031
npx hardhat run scripts/deploy.js --network somnia_mainnet

Somnia Global Testnet

The Testnet is a sandbox environment that mirrors mainnet behavior but uses STT test tokens with no real-world value. It allows safe experimentation and rapid iteration without financial risk.

Key Characteristics

  • Transactions use STT tokens, available via the faucet.
  • Close-to-mainnet parameters for realistic testing.
  • Safe for prototyping, debugging, and QA.
  • Commonly used in workshops, hackathons, and developer onboarding.

When to Use Testnet

  • Learning how to connect and deploy on Somnia.
  • Prototyping features or building MVPs.
  • Debugging smart contracts or dApp flows.
  • Preparing for audits and production deployment.

Example

Deploy to Somnia Global Testnet

# Deploying a contract to Somnia Testnet
# hardhat.config.js needs a somnia_testnet network: url "https://api.infra.testnet.somnia.network", chainId 50312
npx hardhat run scripts/deploy.js --network somnia_testnet

Quick Comparison

Feature Mainnet (Production) Global testnet
Currency SOMI (real value) STT (valueless, faucet)
Purpose Production deployments Development & testing
Transactions Permanent and irreversible Experimental and disposable
Typical Use Live dApps, DeFi, staking, NFT Prototyping, QA, education
Risk Financial impact possible No financial risk

Best Practices

Note

  • Start on Testnet: Validate contracts and flows on the Global testnet before mainnet.
  • Audit before launch: Ensure contracts are reviewed and secure.
  • Use separate configs: Keep .env files distinct for testnet and mainnet.
  • Stay updated: Follow official announcements for upgrades and changes.

Tip

Tip: Treat Testnet as your safe playground and Mainnet as your production stage. Every project should pass through Testnet before moving to Mainnet.

Send feedback

Agents: POST the same to /api/feedback.