Run a USDC stablecoin payment on Base end to end: verify the token contract, do the 6-decimal amount math, estimate fees, apply approval gates, pre-send dry-run, and track the transaction to a confirmed receipt. Triggers whenever an agent must send or verify a USDC payment on Base (chain 8453), set up a payment workflow, or audit a planned send.
./install.sh stablecoin-payments-for-agentsname: "stablecoin_payments_for_agents" description: "Run a USDC stablecoin payment on Base end to end: verify the token contract, do the 6-decimal amount math, estimate fees, apply approval gates, pre-send dry-run, and track the transaction to a confirmed receipt. Triggers whenever an agent must send or verify a USDC payment on Base (chain 8453), set up a payment workflow, or audit a planned send."
Move USDC on Base (chain id 8453) safely, with the exact sequence an agent should follow: identity check, amount math, fee estimate, approval gates, dry run, send, confirm, log. This is the payment workflow layer that sits above generic fee tuning and defensive wallet hygiene: a checklist with concrete checks you can actually execute.
0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 (Circle's own registry: https://developers.circle.com/stablecoins/usdc-contract-addresses). Never match by ticker alone. Read decimals() (expect 6) and symbol() over RPC, and confirm the contract on Basescan (basescan.org) before the first send to it.amount_units = round(dollars * 1e6). Print the result back in both dollars and units before signing anything; this is where six-figure bugs are born.transfer(to, amount) is the path when the paying wallet is yours. approve(spender, amount) exists only when a contract (router, escrow, pass minter) will pull the funds. Approval gates: never grant unlimited allowances; scope the approval to the exact amount; treat any approval request above a configured per-payment ceiling as a hard stop that needs human sign-off. Suggested default ceiling: payments over $100 need approval, anything else is fine, adjust per operator policy.eth_estimateGas for the actual transaction, then price it with the current base fee and a tip from the last few blocks (EIP-1559). Fees on Base are normally tiny, but never zero; the estimate feeds the balance check, not your curiosity. Re-estimate if the send is delayed; never reuse a stale estimate from an hour ago.eth_call with the same from, to, data, and fee fields first. A failed call means the real send would burn gas for a revert; fix the cause before proceeding. Confirm the sender balance covers amount plus the fee estimate. Read state on two RPCs if the number looks wrong: public Base RPCs can serve stale balance reads for a few seconds right after a transaction mines, so a suspicious zero deserves a second look, not a panic.eth_getTransactionReceipt with a timeout (Base blocks land about every 2 seconds, so a normal receipt arrives fast). If it is stuck, bump the fee instead of blindly resending the same fields. A receipt with status 1 is inclusion, not finality: for larger amounts wait a few minutes of block depth ("safe" on Base is roughly 2 minutes; full L1-backed finality takes about 20 minutes). Verify the Transfer event on the receipt and cross-check with Basescan or the Blockscout API (https://base.blockscout.com/api/v2).For every payment the agent must produce, in this order: (a) a payment plan stating recipient, amount (both units and dollars), fee estimate, and the approval-gate decision; (b) the signed transaction hash after send; (c) the confirmed receipt with status and Transfer event; (d) the ledger row. If any step fails, the output is the failure evidence and what must change, never a retry loop on the same fields.
Full step-by-step checklist with exact RPC calls, the approval-gate policy template, confirmation depth guidance, the ledger schema, and troubleshooting for stuck or dropped transactions: references/payment-runbook.md.
publisher key 2e43c913833850e6d80f939677e3de76e806d47785c0f1caaca90f9d18c98e1e
No ratings yet — be the first to rate it.