Build on Mandala
Quickstart
Deploy a Solidity contract to Mandala in five minutes. Foundry or Hardhat.
Five minutes from now you have a contract on Mandala. The path: install your tool, fund a wallet with testnet KPGT, run one command.
The chain at a glance
| Detail | Mainnet | Testnet |
|---|---|---|
| Chain ID | 20010 | 20011 |
| RPC | https://rpc1-mainnet.mandalachain.io | https://rpc1-testnet.mandalachain.io |
| Gas token | KPG | KPGT |
| Settles to | Ethereum L1 | Sepolia |
| Explorer | explorer.mandalachain.io | explorer.testnet.mandalachain.io |
This quickstart uses testnet so you do not spend real KPG. Get KPGT from the Testnet & Faucet page, or bridge Sepolia ETH through the Arbitrum Portal.
The contract
Counter.sol:
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
contract Counter {
uint256 public count;
function increment() external { count += 1; }
}Deploy
# Install Foundry (one-time)
curl -L https://foundry.paradigm.xyz | bash && foundryup
# New project
forge init counter && cd counter
# Replace src/Counter.sol with the contract above, then deploy
forge create src/Counter.sol:Counter \
--rpc-url https://rpc1-testnet.mandalachain.io \
--private-key $PRIVATE_KEY \
--broadcast# New project
mkdir counter && cd counter
npm init -y
npm install --save-dev hardhat @nomicfoundation/hardhat-toolbox dotenv
npx hardhat init # pick "Create a TypeScript project"Replace hardhat.config.ts:
import "dotenv/config";
import { HardhatUserConfig } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox";
const config: HardhatUserConfig = {
solidity: "0.8.24",
networks: {
mandalaTestnet: {
url: "https://rpc1-testnet.mandalachain.io",
chainId: 20011,
accounts: [process.env.PRIVATE_KEY!],
},
},
};
export default config;Put PRIVATE_KEY=0x... in .env, save Counter.sol to contracts/Counter.sol, then:
npx hardhat ignition deploy ignition/modules/Counter.ts --network mandalaTestnetThe address that comes back is your contract. Open it in explorer.testnet.mandalachain.io and you have proof of deployment.
That is the whole 5-minute path. The rest of this section covers the same flow in more depth, plus verification and frontend integration.

