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
Name | Mainnet | Testnet |
---|---|---|
RPC URL | ||
WebSocket URL | wss://wss.mantle.xyz | wss://ws.testnet.mantle.xyz |
Chain ID | 5000 | 5001 |
Explorer | ||
DTL service URL | ||
Faucet | N/A |
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
https://www.incepthink.com/mantle/faucet (Drips on L2)
https://fusionx.finance/faucet (Drips on L2)
https://faucet.testnet.mantle.xyz/ (Drips on Goerli - requires bridging)
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
Category | Tools and Links |
---|---|
SDK | |
RPCs |
|
Multisig Wallet |
|
Chain Data and Monitoring |
|
Cross-chain Messaging | |
Price Feed Oracles |
|
Explorer API |
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
Type | Links |
---|---|
Basics | |
Smart Contracts | |
Bridging | |
Inter-layer Message Passing |
You can find the tutorials Github repo here: https://mantlenetworkio.github.io/mantle-tutorial/
Graph Node
Testnet | Mainnet | |
---|---|---|
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 |
| in works |
Opcode Differences Between EVM and Mantle VM
0x40 range - ‘BASEFEE
’
BASEFEE
’Introduced in EIP1559
EVM | Mantle 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
’
PUSH0
’Introduced in EIP3855
EVM | Mantle 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
’
INVALID
’Introduced in EIP141
EVM | Mantle 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.
TroubleshootingSupport
Channel | Link |
---|---|
Discord | |
Telegram |
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