Developing on Mantle

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

Check out our repository of Mantle-specific tutorials on the Mantle GitHub!

Network Details

The official Mantle RPC employs rate limiting to ensure stability during traffic spikes. If your particular use case involves calling the Mantle API frequently, you might run into issues that arise due to rate limiting. For such use cases, consider connecting to third-party RPCs instead. You can find the list of available RPC providers here: Node RPC Providers

Contract Addresses

The most updated list of addresses of the contracts deployed on Ethereum and Mantle Network are available on Github. Follow the links below to navigate to the respective address repos.

Please note that there are some common ERC20 contract operations currently inactive for the native $MNT token, namely:

  • transfer()

  • approve()

  • transferFrom()

  • increaseAllowance()

  • decreaseAllowance()

If your dApps use any of the above operations, we recommend using the wrapped token $WMNT instead. The L2 Mainnet contract address for $WMNT is 0x78c1b0c915c4faa5fffa6cabf0219da63d7f4cb8

Connecting to Mantle Testnet

Use the info listed in the Network Details table above to connect your wallets and apps to Mantle testnet.

Test $MNT Faucets

The official Mantle Network faucet is deployed on Goerli, and so you'll need to bridge the minted $MNT if you want to use it on L2. Also, make sure you have sufficient test Goerli $ETH in your wallet before minting tokens. You can use the Paradigm or Alchemy faucet to acquire test $ETH on Goerli.

GitHub

Our GitHub is a good place to familiarize yourself with the Mantle tech stack and find tools and usage examples for reference that'll help you set up a local development environment, integrate our SDK, invoke node RPC endpoints, and more.

Tooling Quick Access

Find the complete list of tools that will help you develop and deploy your dApps on Mantle Network here: Resources and Tooling

Mantle SDK

You can learn more about the Mantle SDK in Mantle Client SDK. The SDK provides support for the following:

  • Inter-network message-passing

  • Token deposit and withdrawal between Layer 1 (L1) and Layer 2 (L2) networks

  • Creation of ERC-20 tokens on L2 mapping to L1 token

  • Monitoring of contract calls, emit messages, etc.

By combining SDK modules, Mantle network can be easily connected to wallets, exchanges, and other application scenarios. Use the link below to navigate to our SDK docs.

Thirdweb SDK

The thirdweb web3 development framework supports deploying apps to Mantle Network. Learn more about how to use the thirdweb CLI to deploy contracts, and the thirdweb SDK to build your applications connecting to Mantle Network on the Thirdweb SDK page.

Using Mantle Node API

dApps need access to nodes to fetch block data and send transactions. Mantle network supports Ethereum's JSON-RPC API implementation with some added custom methods and can be connected to using HTTPS and WebSocket. Find out more on the Mantle Node API page.

Tutorials

You can find the tutorials Github repo here: https://mantlenetworkio.github.io/mantle-tutorial/

Graph Node

TestnetMainnet

Deploy endpoint

in works

Query subgraph using name

in works

Query subgraph using ID

in works

Check subgraph status

in works

IPFS server

in works

Network parameter

testnet

in works

Opcode Differences Between EVM and Mantle VM

0x40 range - ‘BASEFEE

Introduced in EIP1559

EVMMantle VM

// 0x40 range - block operations.

const (

BLOCKHASH OpCode = 0x40

COINBASE OpCode = 0x41

TIMESTAMP OpCode = 0x42

NUMBER OpCode = 0x43

DIFFICULTY OpCode = 0x44

RANDOM OpCode = 0x44 // Same as DIFFICULTY

GASLIMIT OpCode = 0x45

CHAINID OpCode = 0x46

SELFBALANCE OpCode = 0x47

BASEFEE OpCode = 0x48

)

const (

BLOCKHASH OpCode = 0x40 + iota

COINBASE

TIMESTAMP

NUMBER

DIFFICULTY

GASLIMIT

CHAINID = 0x46

SELFBALANCE = 0x47

L1BLOCKNUMBER = 0x4B

)

0x50 range - ‘PUSH0

Introduced in EIP3855

EVMMantle VM

// 0x50 range - 'storage' and execution.

const (

POP OpCode = 0x50

MLOAD OpCode = 0x51

MSTORE OpCode = 0x52

MSTORE8 OpCode = 0x53

SLOAD OpCode = 0x54

SSTORE OpCode = 0x55

JUMP OpCode = 0x56

JUMPI OpCode = 0x57

PC OpCode = 0x58

MSIZE OpCode = 0x59

GAS OpCode = 0x5a

JUMPDEST OpCode = 0x5b

PUSH0 OpCode = 0x5f

)

// 0x50 range - 'storage' and execution. const (

POP OpCode = 0x50 + iota

MLOAD

MSTORE

MSTORE8

SLOAD

SSTORE

JUMP

JUMPI

PC

MSIZE

GAS

JUMPDEST

)

0xf0 range - ‘INVALID

Introduced in EIP141

EVMMantle VM

// 0xf0 range - closures.

const (

CREATE OpCode = 0xf0

CALL OpCode = 0xf1

CALLCODE OpCode = 0xf2

RETURN OpCode = 0xf3

DELEGATECALL OpCode = 0xf4

CREATE2 OpCode = 0xf5

STATICCALL OpCode = 0xfa

REVERT OpCode = 0xfd

INVALID OpCode = 0xfe

SELFDESTRUCT OpCode = 0xff

)

// 0xf0 range - closures.

const (

CREATE OpCode = 0xf0 + iota

CALL

CALLCODE

RETURN

DELEGATECALL

CREATE2

STATICCALL = 0xfa

REVERT = 0xfd

SELFDESTRUCT = 0xff

)

Troubleshooting

Follow the link below to see solutions and fixes for issues that hackers commonly encounter.

pageTroubleshooting

Support

  • If you’re a partner - Please get in touch with us by tagging any relevant team members in "Mantle <> your org’s" telegram chat

  • If you’re a hacker building on Mantle Network - Please reach out to us via our official Discord channel or Mantle Devs telegram channel

  • If you’re a developer just trying out the network - Please reach out to us via Discord in the #dev-discussions channel, or raise a ticket for fast response

Last updated