Skip to content

fix(aip18): auto-mint 1,000 test USDC for pay-only buyers on publish#25

Merged
DamirAGI merged 1 commit into
mainfrom
fix/buyer-auto-mint
Jun 8, 2026
Merged

fix(aip18): auto-mint 1,000 test USDC for pay-only buyers on publish#25
DamirAGI merged 1 commit into
mainfrom
fix/buyer-auto-mint

Conversation

@DamirAGI

@DamirAGI DamirAGI commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

The bug (mine — from the pay-only short-circuit)

A pure buyer (intent: pay) skips on-chain activation (DEC-3) — but activation is exactly where providers receive their 1,000 test USDC. So a buyer linked successfully yet ended up with a zero balance and could buy nothing. A buyer that can't buy is pointless.

Fix

In the pay-only publish branch, mint 1,000 test USDC to the buyer's Smart Wallet via the same gasless, paymaster-sponsored UserOp providers use — just the mint, no registration. Idempotent (only mints an empty wallet, so re-publishing doesn't top up), best-effort (failure warns, never blocks the link). Also fixed the success copy: "top up with actp mint""on testnet you start with 1,000 test USDC" (actp mint is mock-only).

Verified live + closes the gasless question

Re-publishing a linked buyer (beyer-again) minted 1,000 USDC gaslessly — the EOA holds 0 ETH (confirmed on-chain) → balance 1,000.00 USDC. That sponsored UserOp (touching MockUSDC, from a 0-ETH wallet) empirically confirms the buyer's auto wallet + USDC are paymaster-sponsored — so the earlier "allowlist must change" worry is retracted, now proven unnecessary. No contracts changed; buyer = requester on the existing allowlist.

Full SDK suite green (2320). Builds on #24.

🤖 Generated with Claude Code

A pure buyer (intent: pay) skips on-chain activation (DEC-3) — but activation
is exactly where providers receive their 1,000 test USDC. So a buyer linked
successfully yet ended up with a ZERO balance and could buy nothing, which
defeats the point of a buyer.

Fix: in the pay-only publish branch, mint 1,000 test USDC to the buyer's Smart
Wallet via the same gasless, paymaster-sponsored UserOp providers use — just
the mint, no registration. Idempotent (only mints an empty wallet, so
re-publishing doesn't top up), best-effort (a failure warns but never blocks
the link).

Also corrects the buyer success output: "top up with `actp mint`" → "on
testnet you start with 1,000 test USDC" (`actp mint` is mock-only).

Verified live: re-publishing a linked buyer minted 1,000 USDC gaslessly
(EOA holds 0 ETH) → balance 1,000.00 USDC. This also empirically confirms the
buyer's auto wallet + MockUSDC are paymaster-sponsored — no allowlist change
needed. Full SDK suite green (2320).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@DamirAGI DamirAGI requested a review from roosch269 as a code owner June 8, 2026 21:35
@DamirAGI DamirAGI merged commit cbb6397 into main Jun 8, 2026
7 of 9 checks passed
DamirAGI added a commit that referenced this pull request Jun 8, 2026
A buyer now receives 1,000 test USDC on first publish (gasless), so it can
actually pay — previously the pay-only short-circuit skipped the mint and left
buyers with a zero balance. Source merged in #25.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant