feat(evm): add XDC Network (50) and XDC Apothem testnet (51) default assets#217
Open
AnilChinchawale wants to merge 1 commit into
Open
feat(evm): add XDC Network (50) and XDC Apothem testnet (51) default assets#217AnilChinchawale wants to merge 1 commit into
AnilChinchawale wants to merge 1 commit into
Conversation
…assets
Registers XDC Network mainnet and Apothem testnet in the EVM default-asset
registries (TypeScript, Go, Python) so USD-string pricing ("$0.01") resolves
to native USDC on XDC.
XDC has native Circle USDC (not bridged) with EIP-3009
transferWithAuthorization, so the default exact scheme works without Permit2.
EIP-712 domain values were read on-chain:
- mainnet (eip155:50): 0xfA2958CB79b0491CC627c1557F441eF849Ca8eb1,
name "USDC", version "2", 6 decimals
- apothem (eip155:51): 0xb5AB69F7bBada22B28e79C8FFAECe55eF1c771D4,
name "USDC", version "2", 6 decimals
Note: the EIP-712 domain name is "USDC" (not "USD Coin").
Native USDC + CCTP V2 launched on XDC in Aug 2025.
🟡 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 XDC Network mainnet (
eip155:50) and XDC Apothem testnet (eip155:51) to the EVM default-asset registries, followingDEFAULT_ASSETS.md. This lets USD-string pricing (price: "$0.10") resolve to native USDC on XDC out of the box, across all three SDKs.Changes
Per the cross-SDK checklist in
DEFAULT_ASSETS.md, same CAIP-2 key / address / EIP-712name+version/ decimals in each:typescript/packages/mechanisms/evm/src/shared/defaultAssets.tsDEFAULT_STABLECOINSgo/mechanisms/evm/constants.goNetworkConfigs(+ChainIDXDC/ChainIDXDCApothemvars)python/x402/mechanisms/evm/constants.pyNETWORK_CONFIGSAsset selection & on-chain-verified values
XDC's default asset is native Circle USDC — Circle launched native USDC + CCTP V2 on XDC Network in August 2025 (native issuance, not a bridge wrapper). Native USDC implements EIP-3009
transferWithAuthorization, so the defaultexactscheme works with no Permit2 fallback required.The EIP-712 domain values below were read directly from the token contracts on-chain (not from docs), since
DEFAULT_ASSETS.mdrequiresname/versionto match the domain separator exactly:eip155:50)eip155:51)0xfA2958CB79b0491CC627c1557F441eF849Ca8eb10xb5AB69F7bBada22B28e79C8FFAECe55eF1c771D4name()USDCUSDCversion()22decimals()66authorizationState()Validation
go build ./mechanisms/evm/andgo vet ./mechanisms/evm/pass;gofmtclean.python -m py_compileonconstants.pypasses.DEFAULT_STABLECOINSshape exactly.eth_call/eth_getCodeagainst XDC mainnet (https://rpc.xdc.org) and Apothem (https://rpc.apothem.network).Ecosystem note
XDC mainnet already has the canonical Permit2 (
0x0000…78BA3) and the x402 exact-permit2 proxy (0x402085…0001) deployed, so both the EIP-3009 and Permit2 paths are viable there. (Multicall3 is not yet deployed on XDC; flagging in case facilitator batch-verification relies on it.)This follows
DEFAULT_ASSETS.mdexactly (the three registry files). Happy to add a changeset or touch the legacy/e2e network tables if maintainers would like parity there.