AgentSkillsCN

Skill

技能

SKILL.md

USDC Agent Pay

OpenClaw skill for AI agents to send, receive, and manage USDC payments on testnet.

Why Agents Need Native Payments

Agents coordinating work need to pay each other. Current options suck:

  • Humans manually sending payments (slow, defeats the point)
  • Complex smart contract interactions (overkill for simple transfers)
  • No standard way for agents to invoice each other

USDC Agent Pay gives agents simple primitives:

  • Check USDC balance
  • Send USDC to another address
  • Generate payment requests/invoices
  • Verify incoming payments

Supported Networks

NetworkUSDC AddressStatus
Ethereum Sepolia0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238✅ Testnet
Base Sepolia0x036CbD53842c5426634e7929541eC2318f3dCF7e✅ Testnet
Arbitrum Sepolia0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d✅ Testnet

Setup

1. Environment Variables

bash
# Your wallet private key (testnet only!)
USDC_PRIVATE_KEY=0x...

# RPC endpoints
SEPOLIA_RPC_URL=https://eth-sepolia.g.alchemy.com/v2/YOUR_KEY
BASE_SEPOLIA_RPC_URL=https://base-sepolia.g.alchemy.com/v2/YOUR_KEY

# Optional: Default network
USDC_NETWORK=sepolia

2. Get Testnet USDC

Usage

Check Balance

bash
./scripts/balance.sh [address] [network]

# Example
./scripts/balance.sh 0x742d35Cc6634C0532925a3b844Bc9e7595f... sepolia
# Output: 100.00 USDC

Send USDC

bash
./scripts/send.sh <to_address> <amount> [network]

# Example
./scripts/send.sh 0x123...abc 10.50 sepolia
# Output: Sent 10.50 USDC to 0x123...abc
# TX: 0xabc123...

Generate Invoice

bash
./scripts/invoice.sh <amount> <description> [network]

# Example
./scripts/invoice.sh 50 "Code review for PR #42" sepolia
# Output:
# INVOICE: inv_abc123
# Amount: 50.00 USDC
# Pay to: 0x742d35Cc...
# Network: Sepolia
# Description: Code review for PR #42

Verify Payment

bash
./scripts/verify.sh <tx_hash> [expected_amount]

# Example
./scripts/verify.sh 0xabc123... 50
# Output: ✅ Payment verified: 50.00 USDC received

Agent-to-Agent Workflow

code
Agent A (needs code review)
    |
    |-- Posts bounty: "Review my PR, 50 USDC"
    |
Agent B (accepts bounty)
    |
    |-- Does the work
    |-- Sends invoice: ./scripts/invoice.sh 50 "PR review"
    |
Agent A
    |
    |-- Verifies work done
    |-- Pays: ./scripts/send.sh <AgentB_address> 50
    |
Agent B
    |-- Verifies payment: ./scripts/verify.sh <tx_hash> 50
    |-- ✅ Complete

Smart Contract Integration (Advanced)

For escrow and milestone-based payments, use the included EscrowAgent contract:

solidity
// Deploy escrow for a job
createEscrow(worker, amount, milestoneCount)

// Release milestone payment
releaseMilestone(escrowId, milestoneIndex)

// Dispute resolution
raiseDispute(escrowId)

Security Notes

⚠️ TESTNET ONLY — This skill is designed for testnet use. Do not use mainnet private keys.

  • Never commit private keys
  • Use environment variables
  • Rotate keys if exposed
  • Start with small test amounts

Why USDC?

  • Stable — No volatility, 1 USDC = $1
  • Fast — Transactions confirm in seconds
  • Programmable — ERC-20 standard, easy to integrate
  • Circle-backed — Trusted issuer, regulatory compliant

Built For

  • 🦞 Moltbook USDC Hackathon
  • OpenClaw agents
  • Agent-to-agent commerce

License

MIT