Adding Mantle Wallet Support

Mantle v2 Tectonic has been released, please move to the new documentation!

Overview

Mantle network uses $MNT as a native token, and creates an EVM-like code execution environment for transaction and state processing. This means a user on Layer 2 (L2) can use $MNT exactly like they would $ETH on Ethereum, namely to pay gas fees. For this reason, there are changes to how fees are calculated on Mantle network, which you can better understand in the section:Transaction Fees on L2. Any $MNT tokens collected on the L2 as transaction gas fee will be rewarded to validators or burned out on schedule.

Connecting to Mantle

Mantle network shares the Ethereum JSON-RPC API with almost no differences. You can choose to connect to Mantle through any of the following means:

  1. Our rate-limited public endpoint: https://rpc.mantle.xyz

  2. Private endpoints from infrastructure providers (See Node RPC Providers)

  3. Or, by running your own node (See Deploying a Rollup Verifier/Replica Node)

Canonical Token Addresses

The ERC-20 contract address for a token on Mantle network may be different from the address for the same token on Ethereum. Mantle maintains a token list that includes known addresses for many popular tokens.

For example, looking at the $MNT token, the Mantle token list returns the following addresses:

ChainIDNetworkAddress

1

Ethereum

0x1A4b46696b2bB4794Eb3D4c26f1c55F9170fa4C5

5000

Mantle Mainnet

0xDeadDeAddeAddEAddeadDEaDDEAdDeaDDeAD0000

5

Goerli

0xc1dC2d65A2243c22344E725677A3E3BEBD26E604

5001

Mantle Testnet

0xDeadDeAddeAddEAddeadDEaDDEAdDeaDDeAD0000

Transaction Status

A transaction on Mantle network can be in one of these states:

  • Sequencer Confirmed: The transaction has been accepted by the sequencer on Mantle (L2)

  • Confirmed On-Chain: The transaction has been written to Ethereum (L1)

If a transaction is a withdrawal, it can be in one of the following states:

  • Waiting: Confirmed on L1, but still in the challenge period

  • Ready for Relay: Transaction is out of the challenge period, and can be released by submitting a relay message

  • Relayed: A withdrawal is finalized, and the token is released from the bridge

You can use the Mantle SDK to find out your transaction status.

Transaction Fees

Mantle network aims to be EVM-compatible, you can see a summary of the few differences between Mantle and Ethereum here.

Estimating Total Fees

The major portion of the total cost of a transaction on Mantle network comes from the cost of publishing the transaction to Ethereum. Unlike with L2 execution gas fees, users cannot specify a particular gas price or gas limit for this portion of their transaction cost when it rolls up to Ethereum.

In fact, this fee is automatically deducted from the user's $MNT balance on Mantle when the transaction is executed.

The total fee paid by a transaction will be a combination of the normal fee estimation formula (gasPrice * gasLimit) on L2 execution, and in addition to the estimated L1 fee for rollup.

You can read more about this subject in Transaction Fees on L2.

Sending "Max" $MNT

Many wallets allow users to send the maximum amount of a token available in the user's balance. This requires the fee for this transaction to be calculated in advance, and then deducted from the user's $MNT balance being sent.

You MUST deduct both the L2 execution fee, and the L1 data rollup fee from the transaction sending amount. Otherwise, it will exceed the user's balance and the transaction will fail.

Last updated