Skip to content

Conversation

@madisoncarter1234
Copy link
Contributor

Summary

  • The v2 @x402/evm package was missing USDC address mappings for most supported networks
  • Only Base, Base Sepolia, Ethereum, and Sepolia were configured in getDefaultAsset()
  • This caused transactions on other networks (like SKALE) to either fail or use wrong addresses

Root Cause of #773

The transactions in the issue were sent to 0x036CbD53842c5426634e7929541eC2318f3dCF7e (Base Sepolia USDC)
on SKALE chain, where that address has no code. This explains:

  • "Settlement succeeds but no funds transferred" - tx hits empty address, succeeds, does nothing
  • "Same data can be settled multiple times" - no contract = no nonce tracking
  • "balanceOf/authorizationState missing" - wrong address has no code

The SKALE USDC contract (0x2e08028E3C4c2356572E096d8EF835cD5C6030bD) is fully EIP-3009 compliant.

Changes

  • packages/mechanisms/evm/src/exact/server/scheme.ts - Added all 15 EVM networks to getDefaultAsset()
  • packages/mechanisms/evm/src/utils.ts - Added all networks to getEvmChainId()
  • Added tests for new network mappings

Fixes #773

  The v2 EVM mechanism package was missing USDC address mappings for most
  supported networks. Only Base, Base Sepolia, Ethereum, and Sepolia were
  configured, causing transactions on other networks to fail or use wrong
  addresses.

  Added mappings for:
  - Avalanche (mainnet + Fuji testnet)
  - Polygon (mainnet + Amoy testnet)
  - Sei (mainnet + testnet)
  - Abstract (mainnet + testnet)
  - IoTeX
  - Peaq
  - Story
  - Educhain
  - SKALE Base Sepolia

  Also updated getEvmChainId() to include all supported networks.

  Fixes coinbase#773
@cb-heimdall
Copy link

🟡 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 0
Sum 1

@vercel
Copy link

vercel bot commented Dec 12, 2025

@madisoncarter1234 is attempting to deploy a commit to the Coinbase Team on Vercel.

A member of the Team first needs to authorize it.

@phdargen
Copy link
Contributor

phdargen commented Dec 24, 2025

Thanks for the suggestions @madisoncarter1234!

We are planning some changes to the defaultAsset policy, see #799. I will come back to this once it is finalized.

In any case, getDefaultAsset() is only needed for the moneyParser of eg price: '$0.001', you can always use 'asset' and 'amount' (in atomic units) instead to use your preferred (EIP-3009) token

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

[bug] The skale-base-sepolia network is not yet ready for public testing and should not be introduced into x402 prematurely.

3 participants