Skip to content

9mm-exchange/migrate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

PulseX V2 β†’ 9mm V3 Migrator

Migrate your PulseX V2 liquidity positions to 9mm V3 with full-range liquidity in a single transaction.

🌐 Live App: https://migrate.9mm.pro


✨ Features

  • πŸ”„ One-Click Migration - Move from V2 to V3 in a single transaction
  • πŸ“¦ Batch Migration - Migrate multiple positions at once
  • 🎯 Full-Range Liquidity - Automatic tick range calculation
  • πŸ’° Zero Platform Fees - Only pay gas
  • πŸ”’ Secure - Audited smart contracts
  • ⚑ Fast - Optimized for PulseChain

πŸš€ Supported Pairs

βœ… 10 Migration Paths (V2 β†’ V3)

  • pHEX/WPLS (V1 & V2)
  • PLSX/WPLS (V1 & V2)
  • WPLS/eDAI (V1 & V2)
  • pHEX/eDAI (V2)
  • eWETH/WPLS (V1)
  • INC/WPLS (V2)
  • INC/PLSX (V2)

πŸ—οΈ Architecture

Smart Contracts

  • Migrator: 0xcD2f7f58Fff604B460c02E08b542de75549177c4
  • 9mm V3 Factory: 0xe50DbDC88E87a2C92984d794bcF3D1d76f619C68
  • Position Manager: 0xCC05bf158202b4F461Ede8843d76dcd7Bbad07f2

Frontend

  • Framework: Next.js 16 (React 19)
  • Web3: wagmi v2 + viem
  • Wallet: RainbowKit
  • Styling: Tailwind CSS v4

πŸ› οΈ Development

Prerequisites

  • Node.js 20+
  • npm or yarn
  • MetaMask or compatible wallet

Local Setup

# Install dependencies
npm install

# Set up environment
cp .env.local.example .env.local
# Edit .env.local with your WalletConnect Project ID

# Run dev server
npm run dev

Visit http://localhost:3000

Build

npm run build
npm start

🐳 Docker

Build Image

docker build -t spiritmonkey/pulsex-migrator:latest .

Run Container

docker run -p 3000:3000 spiritmonkey/pulsex-migrator:latest

☸️ Kubernetes Deployment

Quick Deploy

# Build and push to Docker Hub
./scripts/build-amd64.sh

# Deploy to Kubernetes
kubectl apply -f k8s/

# Check deployment
kubectl get pods -n ninemm-frontend

Access Application

The app is deployed at: https://migrate.9mm.pro

For detailed Kubernetes documentation, see KUBERNETES.md


πŸ”§ Configuration

Environment Variables

# WalletConnect Project ID (required)
NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID=your_project_id

# PulseChain RPC (optional - defaults to public RPC)
NEXT_PUBLIC_PULSECHAIN_RPC=https://rpc.pulsechain.com

Kubernetes Secrets

The following secrets must be configured in Kubernetes:

  • DOCKERHUB_TOKEN - Docker Hub access token
  • DOCKERHUB_USERNAME - Docker Hub username (spiritmonkey)
  • KUBECONFIG - Kubernetes cluster configuration (base64 encoded)

πŸ”„ CI/CD

Automatic Deployment

Every push to main triggers:

  1. βœ… Docker image build (AMD64)
  2. βœ… Push to Docker Hub
  3. βœ… Kubernetes deployment restart
  4. βœ… Rolling update (zero downtime)

See .github/workflows/deploy.yml

Manual Deployment

# Trigger via GitHub Actions UI
# Or push to main branch
git push origin main

πŸ“Š Monitoring

View Logs

kubectl logs -f deployment/migrator -n ninemm-frontend

Check Status

kubectl get all -n ninemm-frontend -l app=pulsex-migrator

Scaling

# Manual scaling
kubectl scale deployment migrator -n ninemm-frontend --replicas=5

# Auto-scaling (HPA configured for 2-10 replicas)
kubectl get hpa -n ninemm-frontend

πŸ§ͺ Testing

Address Verification

All token and LP addresses are verified using Foundry tests:

cd foundry-contracts
forge test --match-path test/VerifyAddresses.t.sol -vv --fork-url https://pulsechain.publicnode.com

See ADDRESS_VERIFICATION_REPORT.md for details.


πŸ”’ Security

Smart Contract Security

  • βœ… Modified UniswapV3 migrator for PulseX compatibility
  • βœ… Handles PulseX's unique burn(address, address) signature
  • βœ… All addresses verified on-chain

Web Security

  • βœ… React 19.2.1 (patched for React2Shell vulnerability)
  • βœ… Next.js 16.0.10 (latest stable)
  • βœ… SSL/TLS via Cloudflare
  • βœ… Rate limiting enabled

πŸ“š Documentation


🀝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Submit a pull request

πŸ“ License

MIT License - see LICENSE file for details


πŸ”— Links


Built with ❀️ for the PulseChain community

About

PulseX V2 to 9mm V3 Liquidity Migrator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors