Docs
Docs
Home
Getting Started
Agent Tooling
CLI
Supported Chains
Acala
Aptos
Arbitrum
Arc
Asset Hub
Astar
Avalanche
Base
Berachain
Bifrost
Binance Smart Chain
Bittensor
Blast
Boba Network
Bridge Hub
Celo
Centrifuge
Chiliz
Cronos
Enjin
Ethereum
Etherlink
Flow EVM Gateway
Gnosis
Hydration
Hyperliquid
Immutable
Ink
IoTeX
Kusama
Linea
LISK
Manta Atlantic
Manta Pacific
Mantle
MegaETH
Monad
Movement
Neuroweb
opBNB
Optimism
Plasma
Polkadot
Polygon
Pulsechain
Robinhood
Ronin
Scroll
Sonic
Starknet
Taiko
Tempo
Sui
TRON
Unichain
Viction
World Chain
XDC Network
XX Network
Zetachain
zkSync Era
Zora
Supported Chains

Mantle - Modular L2 Documentation

Complete guide to Mantle Network integration with Dwellir RPC. Learn how to build on Mantle's modular Layer 2, access JSON-RPC methods, and optimize your dApp performance.

Mantle RPC endpoint: endpoint URLs, plans and pricing.

Mantle icon

Mantle RPC

With Dwellir, you get access to our global Mantle network which always routes your API requests to the nearest available location, ensuring low latency and the fastest speeds.

Get your API key

Mantle RPC plans and rate limits

  • Free plan: 20 responses per second, up to 100,000 responses a day.
  • Plans: $49/mo, $299/mo, $999/mo with 25M, 150M, and 500M included responses. Overages billed at $5/$3/$2 per million responses respectively.
  • Paid rate limits: 100 to 5,000 responses per second (bursts from 500 to 10,000), no daily limit.
  • Billing: 1 response = 1 API credit on every shared plan, over HTTPS or WebSocket (WSS) where Mantle supports it.

Details: Pricing · Rate limits · Authentication · Archive nodes

Why Build on Mantle?

Mantle Network is the first modular Layer 2 solution, pioneering the use of EigenDA for data availability. Built on the OP Stack with innovative architectural designs, Mantle offers:

Modular Performance

  • Sub-second block times - Fast finality with optimistic rollup
  • Up to 500x lower costs than Ethereum mainnet
  • 20,000+ TPS capacity - High throughput for demanding applications

Advanced Security

  • EigenDA integration - First L2 with decentralized data availability
  • Optimistic rollup security - Fraud proof protection with 7-day challenge period
  • Ethereum inheritance - Full L1 security guarantees

Developer Excellence

  • Full EVM compatibility - Deploy existing contracts without changes
  • MNT gas token - Native token for gas and governance
  • OP Stack foundation - Battle-tested infrastructure

Quick Start with Mantle

Connect to Mantle in seconds with Dwellir's optimized endpoints:

Mantle iconMantle RPC Endpoints
HTTPS
curl -sS -X POST https://api-mantle-mainnet.n.dwellir.com/<your-api-key> \  -H 'Content-Type: application/json' \  -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'

Installation & Setup

JavaScript
import { JsonRpcProvider } from 'ethers';

// Connect to Mantle mainnet
const provider = new JsonRpcProvider(
  'https://api-mantle-mainnet.n.dwellir.com/YOUR_API_KEY'
);

// Get network info
const network = await provider.getNetwork();
console.log('Connected to Mantle:', network.chainId); // 5000

// Query blockchain data
const blockNumber = await provider.getBlockNumber();
const balance = await provider.getBalance('0x...');
const gas = await provider.getFeeData();

Network Information

Mainnet Configuration

ParameterValueDetails
Network NameMantle Network
Chain ID5000 (0x1388)
CurrencyMNT
Block ExplorerMantle Explorer
BridgeMantle Bridge

Testnet Configuration (Sepolia)

ParameterValueDetails
Network NameMantle Sepolia
Chain ID5003 (0x138B)
CurrencyMNT (Testnet)
Block ExplorerMantle Sepolia Explorer
FaucetMantle Sepolia Faucet

Available RPC Methods

Mantle supports all standard Ethereum JSON-RPC methods plus L2-specific extensions:

Core Methods

  • Transaction Management - Send, sign, and track transactions
  • State Queries - Get balances, code, storage
  • Block Information - Query blocks and receipts
  • Event Logs - Filter and retrieve events
  • Gas Estimation - Estimate fees including L1 costs

L2-Specific Methods

  • eth_estimateL1Fee - Calculate L1 data posting costs
  • rollup_gasPrices - Get current L1/L2 gas prices
  • rollup_getInfo - Query rollup configuration

Debug & Trace Methods

  • debug_traceTransaction - Detailed transaction execution traces
  • debug_traceBlock - Trace all transactions in a block
  • debug_traceCall - Simulate and trace calls

Architecture Overview

Modular Design

Mantle's modular architecture separates core blockchain functions for optimal performance:

  1. Execution Layer - Processes transactions using the EVM
  2. Settlement Layer - Posts state commitments to Ethereum
  3. Data Availability Layer - Uses EigenDA for efficient data storage
  4. Consensus Layer - Inherits security from Ethereum L1

EigenDA Integration

As the first L2 to integrate EigenDA, Mantle benefits from:

  • Lower costs - Reduced data storage expenses
  • Higher throughput - More efficient data availability
  • Decentralization - Distributed DA layer
  • ETH restaking - Additional security through EigenLayer

Transaction Lifecycle

  1. Submission - Users submit transactions to Mantle sequencer
  2. Execution - Transactions processed in batches
  3. Data Posting - Transaction data posted to EigenDA
  4. Settlement - State root submitted to Ethereum L1
  5. Finality - After 7-day challenge period

Development Resources

Smart Contract Deployment

Deploy your contracts to Mantle without modifications:

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

contract MantleApp {
    mapping(address => uint256) public balances;

    function deposit() public payable {
        balances[msg.sender] += msg.value;
    }

    function withdraw(uint256 amount) public {
        require(balances[msg.sender] >= amount, "Insufficient balance");
        balances[msg.sender] -= amount;
        payable(msg.sender).transfer(amount);
    }
}

Using MNT Token

MNT is used for gas payments on Mantle:

JavaScript
// Send MNT
const tx = await signer.sendTransaction({
  to: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb',
  value: ethers.parseEther('1.0') // 1 MNT
});

// Estimate gas in MNT
const gasEstimate = await provider.estimateGas(tx);
const gasPrice = await provider.getFeeData();
const gasCost = gasEstimate * gasPrice.gasPrice; // Cost in MNT

Bridging Assets

Bridge assets between Ethereum and Mantle:

JavaScript
// Bridge configuration
const BRIDGE_ADDRESS = '0x...'; // Mantle Bridge contract
const L1_TOKEN = '0x...'; // Token on Ethereum
const L2_TOKEN = '0x...'; // Token on Mantle

// Deposit from L1 to L2
async function depositToMantle(amount) {
  const bridge = new Contract(BRIDGE_ADDRESS, BRIDGE_ABI, l1Signer);
  const tx = await bridge.depositERC20(
    L1_TOKEN,
    L2_TOKEN,
    amount,
    { value: bridgeFee }
  );
  await tx.wait();
}

Gas Optimization

Understanding Mantle Fees

Mantle fees consist of two components:

  1. L2 Execution Fee - Cost to run transaction on Mantle
  2. L1 Data Fee - Cost to post data to Ethereum (via EigenDA)
JavaScript
// Calculate total fee
const l2GasPrice = await provider.getGasPrice();
const l2GasUsed = await provider.estimateGas(tx);
const l1Fee = await provider.send('eth_estimateL1Fee', [tx]);

const totalFee = (l2GasPrice * l2GasUsed) + BigInt(l1Fee);
console.log('Total fee:', ethers.formatEther(totalFee), 'MNT');

Optimization Tips

  1. Batch Operations - Combine multiple operations in one transaction
  2. Use Events - Cheaper than storage for data that doesn't need to be on-chain
  3. Optimize Calldata - Minimize transaction input data
  4. Storage Packing - Pack multiple values into single storage slots

Common Use Cases

DeFi Protocols

  • Lower fees enable more frequent rebalancing and smaller trades
  • High throughput supports order book DEXs
  • Fast finality improves user experience

Gaming & NFTs

  • Affordable minting and trading
  • High-frequency game actions
  • Complex on-chain game logic

DAOs & Governance

  • Cost-effective voting
  • More frequent proposal submissions
  • On-chain treasury management

Best Practices

Error Handling

JavaScript
try {
  const tx = await contract.someMethod();
  const receipt = await tx.wait();

  if (receipt.status === 0) {
    throw new Error('Transaction reverted');
  }
} catch (error) {
  if (error.code === 'CALL_EXCEPTION') {
    console.error('Contract reverted:', error.reason);
  } else if (error.code === 'INSUFFICIENT_FUNDS') {
    console.error('Not enough MNT for gas');
  }
}

Rate Limiting

JavaScript
// Implement exponential backoff
async function retryWithBackoff(fn, maxRetries = 3) {
  for (let i = 0; i < maxRetries; i++) {
    try {
      return await fn();
    } catch (error) {
      if (i === maxRetries - 1) throw error;

      const delay = Math.pow(2, i) * 1000;
      await new Promise(resolve => setTimeout(resolve, delay));
    }
  }
}

Support & Resources

Official Resources

  • Documentation: docs.mantle.xyz
  • GitHub: github.com/mantlenetworkio
  • Discord: discord.gg/mantle
  • Twitter: @0xMantle

Dwellir Support

  • Dashboard: dashboard.dwellir.com
  • Status Page: status.dwellir.com
  • Support: support@dwellir.com

Start Building

Ready to build on Mantle? Get your free API key and start developing:

Launch Your Mantle dApp Today

Get instant access to Mantle's modular L2 with our high-performance RPC endpoints

Get Your Free API Key


Need help? Check our API reference or contact support.

eth_coinbase

Check the legacy eth_coinbase compatibility method on Manta Pacific. Public endpoints may return an address, `unimplemented`, or another unsupported-method response depending on the client.

eth_blockNumber

Get the current block height on Mantle. Essential for syncing dApps, monitoring transaction confirmations, and blockchain state tracking.

On this page

Mantle RPC plans and rate limitsWhy Build on Mantle?Modular PerformanceAdvanced SecurityDeveloper ExcellenceQuick Start with MantleInstallation & SetupNetwork InformationMainnet ConfigurationTestnet Configuration (Sepolia)Available RPC MethodsCore MethodsL2-Specific MethodsDebug & Trace MethodsArchitecture OverviewModular DesignEigenDA IntegrationTransaction LifecycleDevelopment ResourcesSmart Contract DeploymentUsing MNT TokenBridging AssetsGas OptimizationUnderstanding Mantle FeesOptimization TipsCommon Use CasesDeFi ProtocolsGaming & NFTsDAOs & GovernanceBest PracticesError HandlingRate LimitingSupport & ResourcesOfficial ResourcesDwellir SupportStart Building