Skip to content

Dev Environment

Set up a local development environment to build and test Nexus merchant integrations.

Prerequisites

ToolVersionPurpose
Node.js24+Runtime for merchant agents
FoundryLatestSmart contract interaction
Docker24+Local service orchestration
GitLatestSource control

Quick Start

1. Clone and Install

bash
git clone <your-merchant-agent-repo>
cd your-merchant-agent
npm install

2. Configure Environment

Create a .env file with your development credentials:

bash
# PlatON Devnet
PLATON_RPC=https://devnet3openapi.platon.network/rpc
CHAIN_ID=20250407

# Contracts
USDC_ADDRESS=0xFF8dEe9983768D0399673014cf77826896F97e4d
ESCROW_ADDRESS=0xeB33a9C2b4c7D3F44Fd5514F90C355AF6bb79236

# Your merchant wallet
PRIVATE_KEY=your-dev-private-key

# Nexus Core (local or remote)
NEXUS_CORE_URL=https://api.nexus.platon.network
PORTAL_TOKEN=your-portal-token

3. Get Test USDC

Use the Nexus Playground faucet at nexus.platon.network/#/playground to claim test USDC tokens.

4. Run Your Agent

bash
npm run dev

Your merchant agent should now be accessible for Nexus Core to discover via its skill.md manifest.

Testing Payments

Use the Playground's Quick Payment Test module to simulate end-to-end payment flows against your merchant agent.

Troubleshooting

IssueSolution
Transaction stuck pendingUse --legacy flag with Foundry. See PlatON Devnet Skills
"Invalid signature" errorCheck EIP-712 domain — USDC version is "1"
Webhook not receivedVerify your endpoint is publicly accessible