USDC Escrow Agent (AgenticCommerce)
This skill-pack is a minimal, testnet-only demonstration of agentic commerce:
- •A client agent deposits USDC into an onchain escrow task.
- •A worker agent autonomously accepts the task.
- •The client agent completes the task and triggers an onchain USDC payout.
Coordination is purely via smart contract state/events (no UI, no human-in-loop after start).
Chain
- •Base Sepolia (chainId
84532) - •USDC uses
6decimals
What proves it worked
- •
TaskCreated,TaskAccepted,TaskCompletedevents (tx hashes) - •Final USDC balance of the worker wallet (printed by
client)
Setup
- •Install dependencies
bash
npm install
- •Create
.env(never commit it)
bash
# copy example and fill real values cp .env.example .env
Required env:
- •
RPC_URL(Base Sepolia JSON-RPC) - •
USDC_ADDRESS(USDC token on Base Sepolia testnet) - •
DEPLOYER_PRIVATE_KEY(deploy contract) - •
CLIENT_PRIVATE_KEY(approves + creates + completes) - •
WORKER_PRIVATE_KEY(accepts)
- •Verify env
bash
npm run check
- •Fund wallets (recommended)
bash
npm run fund
Deploy
bash
npm run deploy
Copy the printed address into ESCROW_ADDRESS in .env.
PowerShell shortcut (auto-write ESCROW_ADDRESS):
powershell
$env:WRITE_ENV='true'; npm run deploy; Remove-Item Env:WRITE_ENV
Run agents (two terminals)
Worker:
bash
npm run worker
Client:
bash
npm run client
Proof (BaseScan links)
bash
npm run proof
Notes for OpenClaw / Clawdbot users
- •In OpenClaw, you can install this skill-pack (via ClawHub) and have your bot run
npm run workerandnpm run clientas autonomous actions. - •The bot’s “agent-ness” is validated by the onchain trail (events + balances), not by a UI.