feat(evm): add Celo to default stablecoin registry#244
Open
viral-sangani wants to merge 1 commit into
Open
Conversation
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>
🟡 Heimdall Review Status
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds Celo to the default stablecoin registry across all three SDKs, following the process in
DEFAULT_ASSETS.md:eip155:42220eip155:11142220Default asset is USDC on both, matching how Base/Polygon/Arbitrum are registered.
nameversion0xcebA9300f2b948710d2653dD7B07f33A8B32118CUSDC20x01C5C0122039549AD1493B8220cABEdD739BC44EUSDC2Files changed (per the Cross-SDK Checklist)
typescript/packages/mechanisms/evm/src/shared/defaultAssets.ts—DEFAULT_STABLECOINSgo/mechanisms/evm/constants.go—NetworkConfigs(+ChainIDCelo/ChainIDCeloSepolia)python/x402/mechanisms/evm/constants.py—NETWORK_CONFIGStypescript/.changeset/add-celo-default-assets.md— changeset (@x402/evmpatch)Verification
The EIP-712 domain values are the part that must be exactly right (wrong
name/versionsilently 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.DOMAIN_SEPARATORfromname="USDC",version="2",chainId,verifyingContractand confirmed it matches the on-chainDOMAIN_SEPARATOR()byte-for-byte.transferWithAuthorization(no Permit2 fallback needed).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 test ./mechanisms/evm/→okpnpm --filter @x402/evm build+test→ builds clean, 341 tests passNETWORK_CONFIGSRationale 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.