Everything here deploys to XLayer Mainnet (chain ID 196) with real USDC.
| Item | Where | Cost |
|---|---|---|
| Node.js 20+ | nodejs.org | Free |
| Git | git-scm.com | Free |
| VS Code | code.visualstudio.com | Free |
| OKB for gas | Buy on OKX, bridge to XLayer | ~$5 |
| USDC on XLayer | okx.com/xlayer/bridge | Your amount |
This wallet collects the 5% platform fees and pays gas. Never reuse a personal wallet.
node -e "
const {ethers} = require('ethers');
const w = ethers.Wallet.createRandom();
console.log('Address: ', w.address);
console.log('PrivateKey: ', w.privateKey);
"Save both values in a password manager. Fund the address with at least 0.05 OKB on XLayer.
- supabase.com — create free account and new project
- Settings → Database → copy the Connection string (URI)
- Looks like:
postgresql://postgres:[pass]@db.[ref].supabase.co:5432/postgres
- web3.okx.com/onchainos/dev-portal
- Create project named AgentMarket
- Copy: API Key, Secret Key, Passphrase, Project ID
cd backend
cp .env.example .env
# fill every line with your valuesKey values:
X_LAYER_RPC_URL=https://rpc.xlayer.tech
X_LAYER_CHAIN_ID=196
USDC_CONTRACT_ADDRESS=0x74b7F16337b8972027F6196A17a631aC6dE26d22
NODE_ENV=production
cd backend
npm install
npx prisma migrate deploy
npx prisma generatecd contracts
npm install
npx hardhat compile
# Set your platform wallet key in contracts/.env
echo 'PLATFORM_PRIVATE_KEY="0xYOUR_KEY"' > .env
echo 'X_LAYER_RPC_URL="https://rpc.xlayer.tech"' >> .env
# Deploy to mainnet
npm run deployCopy the output contract address into backend/.env and frontend/.env.local:
AGENT_REGISTRY_ADDRESS="0xYOUR_DEPLOYED_ADDRESS"
NEXT_PUBLIC_REGISTRY_ADDRESS="0xYOUR_DEPLOYED_ADDRESS"
Verify live on OKLink: https://www.oklink.com/xlayer
git init && git add . && git commit -m "initial"
git remote add origin https://github.com/Datwebguy/agentmarket.git
git push -u origin main- railway.app → New Project → GitHub → select repo → Root Directory:
backend - Add all backend/.env variables in the Variables tab
- Copy your Railway URL
Test: curl https://YOUR-RAILWAY-URL/health
- vercel.com → New Project → GitHub → Root Directory:
frontend - Add frontend/.env.local variables, set NEXT_PUBLIC_API_URL to your Railway URL
- Deploy
| Chain ID | 196 |
| RPC | https://rpc.xlayer.tech |
| Explorer | https://www.oklink.com/xlayer |
| USDC | 0x74b7F16337b8972027F6196A17a631aC6dE26d22 |
| Bridge | https://www.okx.com/xlayer/bridge |
| Gas token | OKB |
- Network Name: XLayer Mainnet
- RPC URL: https://rpc.xlayer.tech
- Chain ID: 196
- Symbol: OKB
- Explorer: https://www.oklink.com/xlayer