Skip to content

feat(evm): add Celo to default stablecoin registry#244

Open
viral-sangani wants to merge 1 commit into
coinbase:mainfrom
viral-sangani:add-celo-default-assets
Open

feat(evm): add Celo to default stablecoin registry#244
viral-sangani wants to merge 1 commit into
coinbase:mainfrom
viral-sangani:add-celo-default-assets

Conversation

@viral-sangani

Copy link
Copy Markdown

Summary

Adds Celo to the default stablecoin registry across all three SDKs, following the process in DEFAULT_ASSETS.md:

  • Celo mainneteip155:42220
  • Celo Sepolia (testnet) — eip155:11142220

Default asset is USDC on both, matching how Base/Polygon/Arbitrum are registered.

Network USDC address EIP-712 name version decimals transfer
Celo mainnet (42220) 0xcebA9300f2b948710d2653dD7B07f33A8B32118C USDC 2 6 EIP-3009
Celo Sepolia (11142220) 0x01C5C0122039549AD1493B8220cABEdD739BC44E USDC 2 6 EIP-3009

Files changed (per the Cross-SDK Checklist)

  • typescript/packages/mechanisms/evm/src/shared/defaultAssets.tsDEFAULT_STABLECOINS
  • go/mechanisms/evm/constants.goNetworkConfigs (+ ChainIDCelo / ChainIDCeloSepolia)
  • python/x402/mechanisms/evm/constants.pyNETWORK_CONFIGS
  • typescript/.changeset/add-celo-default-assets.md — changeset (@x402/evm patch)

Verification

The EIP-712 domain values are the part that must be exactly right (wrong name/version silently breaks EIP-3009 signature verification), so they were confirmed on-chain rather than assumed:

  • name() / version() / decimals() read directly from both USDC contracts → "USDC", "2", 6.
  • Reconstructed each contract's DOMAIN_SEPARATOR from name="USDC", version="2", chainId, verifyingContract and confirmed it matches the on-chain DOMAIN_SEPARATOR() byte-for-byte.
  • Both contracts implement EIP-3009 transferWithAuthorization (no Permit2 fallback needed).
  • Addresses are checksum-valid in all three files.

There is a live x402 facilitator running on Celo (mainnet + Sepolia) that settles USDC/USDT via EIP-3009, so these defaults are in active use.

Tests

  • Go: go test ./mechanisms/evm/ok
  • TypeScript: pnpm --filter @x402/evm build + test → builds clean, 341 tests pass
  • Python: module parses; entries present in NETWORK_CONFIGS

Rationale for asset selection

USDC is the natural default for Celo: it's a native (not bridged) EIP-3009 deployment on both mainnet and Sepolia, 6 decimals, and is the asset the Celo x402 facilitator already settles. (Celo USDT also supports EIP-3009 but uses a different domain — name: "Tether USD", version: "1" — so USDC is the cleaner single default; USDT can be added later if desired.)

AI usage disclosure

Per CONTRIBUTING.md: this PR was prepared with significant AI assistance (Claude). All addresses and EIP-712 domain values were verified on-chain as described above, and the SDK test suites were run locally — but reviewers may still wish to double-check the domain values against the contracts.

Add Celo mainnet (eip155:42220) and Celo Sepolia (eip155:11142220) to the
default stablecoin maps across the TypeScript, Go, and Python SDKs, using USDC
as the default asset per the DEFAULT_ASSETS.md process.

EIP-712 domain values (name: "USDC", version: "2", decimals: 6, EIP-3009)
were verified on-chain by reconstructing each token's DOMAIN_SEPARATOR:
- Celo USDC (mainnet): 0xcebA9300f2b948710d2653dD7B07f33A8B32118C
- Celo USDC (Sepolia): 0x01C5C0122039549AD1493B8220cABEdD739BC44E

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@cb-heimdall

Copy link
Copy Markdown

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 1
Sum 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants