| name | send-usdc |
| description | Send USDC to another agent or wallet on Base. Direct on-chain transfer, no intermediary, settles in seconds. Use when the agent needs to pay another agent, move funds between wallets, settle a debt in USDC, or make any on-chain payment. |
Send USDC
Agent needs to send USDC to another on-chain address. Both parties are on Base, so no fiat bridge, escrow, or proof generation is needed -- just a direct ERC-20 transfer.
How It Works
- Check USDC balance
- Call ERC-20
transfer() on Base
- Confirmed in seconds, costs < $0.01 gas
No approvals, no escrow, no intermediary. The recipient gets USDC directly.
Quick Example
import { createWalletClient, createPublicClient, http, parseAbi, formatUnits } from 'viem';
import { base } from 'viem/chains';
import { privateKeyToAccount } from 'viem/accounts';
const USDC = '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913' as const;
const ERC20_ABI = parseAbi([
'function transfer(address to, uint256 amount) returns (bool)',
'function balanceOf(address account) view returns (uint256)',
]);
const account = privateKeyToAccount(process.. );
publicClient = ({ : base, : () });
walletClient = ({ account, : base, : () });
(): <> {
raw = (.(amountUsdc * ));
balance = publicClient.({
: , : _ABI, : , : [account.],
});
(balance < raw) {
();
}
txHash = walletClient.({
: , : _ABI, : , : [to, raw],
});
publicClient.({ : txHash });
txHash;
}
tx = ( , );
.();