Skip to content

Developers

Developer docs

Connect to GMMT mainnet (chain ID 8989), then deploy and verify contracts. It is an EVM chain, so the tools you already use work as they are.

1. Network details

Network name
Giant Mammoth Chain
Chain ID
8989 (0x231d)
Currency
GMMT · 18 decimals
RPC
https://rpc.gmmtchain.io
RPC (Asia)
https://rpc-asia.gmmtchain.io
Explorer
https://scan.gmmtchain.io
EVM version
Shanghai (PUSH0 supported)
Block time
~3 seconds

Add the network to MetaMask or another browser wallet in one click.

2. Deploy — Hardhat

Put the network and verification settings in hardhat.config.ts. Deploying needs GMMT for gas.

hardhat.config.ts
// hardhat.config.ts
import "@nomicfoundation/hardhat-toolbox";

export default {
  solidity: {
    version: "0.8.28",
    // GMMT mainnet supports up to Shanghai (no Cancun).
    settings: { evmVersion: "shanghai", optimizer: { enabled: true, runs: 200 } },
  },
  networks: {
    gmmt: {
      url: "https://rpc.gmmtchain.io",
      chainId: 8989,
      accounts: [process.env.PRIVATE_KEY!],
    },
  },
  etherscan: {
    apiKey: { gmmt: "blockscout" }, // Blockscout needs no key; any string works
    customChains: [
      {
        network: "gmmt",
        chainId: 8989,
        urls: {
          apiURL: "https://scan.gmmtchain.io/api",
          browserURL: "https://scan.gmmtchain.io",
        },
      },
    ],
  },
  sourcify: { enabled: false },
};

Compile and deploy.

terminal
npx hardhat compile
npx hardhat ignition deploy ./ignition/modules/MyToken.ts --network gmmt

Publish (verify) the source on GMMT Scan.

terminal
npx hardhat verify --network gmmt <CONTRACT_ADDRESS> <CONSTRUCTOR_ARGS...>

3. Deploy — Foundry

Set the EVM version and RPC in foundry.toml.

foundry.toml
# foundry.toml
[profile.default]
solc = "0.8.28"
evm_version = "shanghai"

[rpc_endpoints]
gmmt = "https://rpc.gmmtchain.io"

Deploy.

terminal
forge create src/MyToken.sol:MyToken \
  --rpc-url gmmt \
  --private-key $PRIVATE_KEY \
  --broadcast

Publish the source with the Blockscout verifier.

terminal
forge verify-contract <CONTRACT_ADDRESS> src/MyToken.sol:MyToken \
  --chain-id 8989 \
  --verifier blockscout \
  --verifier-url https://scan.gmmtchain.io/api/

4. Verify on the explorer

You can also verify from GMMT Scan: open the contract address → Contract → Verify & Publish, and enter the same compiler version, EVM version (shanghai) and optimizer settings you deployed with.

5. JSON-RPC and libraries

GMMT speaks standard Ethereum JSON-RPC. The public RPC is shared, so services that send many requests should run their own node.

curl
curl -X POST https://rpc.gmmtchain.io \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}'

Define the chain in viem or ethers like this.

viem
import { defineChain, createPublicClient, http } from "viem";

export const gmmt = defineChain({
  id: 8989,
  name: "Giant Mammoth Chain",
  nativeCurrency: { name: "GMMT", symbol: "GMMT", decimals: 18 },
  rpcUrls: { default: { http: ["https://rpc.gmmtchain.io"] } },
  blockExplorers: { default: { name: "GMMT Scan", url: "https://scan.gmmtchain.io" } },
});

const client = createPublicClient({ chain: gmmt, transport: http() });
console.log(await client.getBlockNumber());

Good to know

  • The Cancun upgrade (MCOPY, TSTORE, …) is not active. With solc 0.8.25 or later, set evmVersion to "shanghai".
  • PUSH0 is supported from block 39,033,000. Check your settings if a tool replays older blocks.
  • There is no public testnet right now. Test locally (Hardhat Network, Anvil) before deploying to mainnet.
  • Keep private keys out of code and repositories — use environment variables or a hardware wallet.