Full EVM Compatibility: Deploy Solidity smart contracts using standard EVM tooling - no need to learn new languages!
Prerequisites
Before deploying, make sure you have:- A funded wallet with OM tokens for gas fees
- Your contract compiled and ready to deploy
- Network configuration set up
Network Configuration
Testnet (DuKong)
- RPC URL:
https://evm.dukong.mantrachain.io - Chain ID:
5887 - Explorer: explorer.dukong.io
Mainnet
- RPC URL:
https://evm.mantrachain.io - Chain ID:
5888 - Explorer: blockscout.mantrascan.io
Method 1: Using Hardhat
Hardhat is a popular development environment for Ethereum software.Setup
- Install Node.js (version 18.0 or higher recommended)
-
Create a new project:
-
Configure Hardhat for MANTRA Chain by updating
hardhat.config.js:
Create Deployment Script
Createscripts/deploy.js:
Deploy
Method 2: Using Foundry
Foundry is a fast, portable, and modular toolkit for Ethereum application development.Setup
-
Install Foundry:
-
Create a new project:
Deploy with Forge
Using Scripts
Createscript/Deploy.s.sol:
Method 3: Using Remix
Remix is a web-based IDE that makes it easy to deploy contracts without local setup.Steps
- Go to Remix IDE
- Create or import your Solidity contract
- Compile your contract
- Go to the “Deploy & Run” tab
- Select “Injected Provider” (MetaMask)
- Make sure MetaMask is connected to MANTRA Chain
- Add MANTRA Chain network if needed:
- Network Name: MANTRA Chain Testnet
- RPC URL:
https://evm.dukong.mantrachain.io - Chain ID:
5887 - Currency Symbol: OM
- Add MANTRA Chain network if needed:
- Deploy your contract
After Deployment
Verify Your Contract
After deployment, verify your contract on the block explorer. This allows others to view and interact with your contract source code. See our Verifying Contracts guide for detailed instructions.Interact with Your Contract
Once deployed, you can:- View your contract on the block explorer
- Interact with it using the explorer’s contract interaction features
- Build a frontend application to interact with your contract
Next Steps
- Learn about using precompiles to interact with MANTRA Chain’s unique features
- Explore EVM development on MANTRA Chain
- Check out our architecture documentation to understand MANTRA Chain’s capabilities
- Join our Discord community for support
Resources
- Deploying Contracts Guide - Detailed deployment documentation
- EVM Getting Started - Complete EVM development guide
- Network Details - Network information and endpoints