Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions go/mechanisms/evm/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ var (
ChainIDPolygon = big.NewInt(137)
ChainIDArbOne = big.NewInt(42161)
ChainIDArbSepolia = big.NewInt(421614)
ChainIDXDC = big.NewInt(50)
ChainIDXDCApothem = big.NewInt(51)

// Network configurations
// See DEFAULT_ASSET.md for guidelines on adding new chains
Expand Down Expand Up @@ -196,6 +198,26 @@ var (
Decimals: DefaultDecimals,
},
},
// XDC Network Mainnet
"eip155:50": {
ChainID: ChainIDXDC,
DefaultAsset: AssetInfo{
Address: "0xfA2958CB79b0491CC627c1557F441eF849Ca8eb1", // USDC on XDC (Circle, native)
Name: "USDC",
Version: "2",
Decimals: DefaultDecimals,
},
},
// XDC Apothem Testnet
"eip155:51": {
ChainID: ChainIDXDCApothem,
DefaultAsset: AssetInfo{
Address: "0xb5AB69F7bBada22B28e79C8FFAECe55eF1c771D4", // USDC on XDC Apothem (Circle, native)
Name: "USDC",
Version: "2",
Decimals: DefaultDecimals,
},
},
}

// EIP-3009 ABI for transferWithAuthorization with v,r,s (EOA signatures)
Expand Down
20 changes: 20 additions & 0 deletions python/x402/mechanisms/evm/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,26 @@ class NetworkConfig(_NetworkConfigRequired, total=False):
"decimals": 6,
},
},
# XDC Network Mainnet
"eip155:50": {
"chain_id": 50,
"default_asset": {
"address": "0xfA2958CB79b0491CC627c1557F441eF849Ca8eb1",
"name": "USDC",
"version": "2",
"decimals": 6,
},
},
# XDC Apothem Testnet
"eip155:51": {
"chain_id": 51,
"default_asset": {
"address": "0xb5AB69F7bBada22B28e79C8FFAECe55eF1c771D4",
"name": "USDC",
"version": "2",
"decimals": 6,
},
},
}

# V1 legacy constants are in x402.mechanisms.evm.v1.constants
Expand Down
12 changes: 12 additions & 0 deletions typescript/packages/mechanisms/evm/src/shared/defaultAssets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,18 @@ export const DEFAULT_STABLECOINS: Record<string, ExactDefaultAssetInfo> = {
assetTransferMethod: "permit2",
supportsEip2612: true,
}, // Mezo Testnet mUSD (no EIP-3009, supports EIP-2612)
"eip155:50": {
address: "0xfA2958CB79b0491CC627c1557F441eF849Ca8eb1",
name: "USDC",
version: "2",
decimals: 6,
}, // XDC Network mainnet USDC (Circle, native)
"eip155:51": {
address: "0xb5AB69F7bBada22B28e79C8FFAECe55eF1c771D4",
name: "USDC",
version: "2",
decimals: 6,
}, // XDC Apothem testnet USDC (Circle, native)
};

/**
Expand Down
Loading