Comment on page
Adding Mantle Wallet Support
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.
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:
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
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.
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.