Step 9: Get Testnet Funds

Phase: implement

Context

You have the build_plan confirmed. If payment_network is "base-sepolia" (testnet), you need free test USDC before creating the project. If mainnet, skip this step.

What to do

If using testnet (default)

You need a wallet address on Base Sepolia to receive test USDC. If you (the agent) have wallet capabilities, use your own wallet. If not, you'll need the user to provide a wallet address.

Call the faucet:

POST https://run402.com/v1/faucet
Content-Type: application/json

{
  "address": "0x...user_or_agent_wallet_address"
}

Response (success):

{
  "transactionHash": "0x...",
  "amount": "0.25",
  "token": "USDC",
  "network": "base-sepolia"
}

Rate limit: 1 faucet drip per 24 hours per IP address. If you get a 429 response, tell the user: "We need to wait before getting more test funds. Let's try again in a bit."

What to tell the user:

"I'm grabbing some free test funds to set up your project. This is completely free — just test money for trying things out."

If using mainnet

Skip this step. The user will pay with real USDC when creating the project. Proceed directly to Step 10.

Expected output

  • wallet_address — The wallet address that received test USDC
  • faucet_tx — Transaction hash from the faucet (or "skipped" if mainnet)

Memory directive