feat: add arbitrum and arbitrum-sepolia to NetworkSchema#180
Open
tdnupe3 wants to merge 1 commit into
Open
Conversation
🟡 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.
Description
Adds
arbitrum(chain ID 42161) andarbitrum-sepolia(chain ID 421614) to the TypeScriptNetworkSchemaenum,SupportedEVMNetworksarray, andEvmNetworkToChainIdmap intypescript/packages/legacy/x402/src/types/shared/network.ts.Why Arbitrum: Second-largest EVM chain by TVL. Circle issues native USDC on Arbitrum One (
0xaf88d065e77c8cC2239327C5EDb3A432268e5831) with full EIP-3009 (transferWithAuthorization) support — the same transfer method used by Base and Polygon. No Permit2 fallback needed.What was already in the repo (this PR completes the picture):
typescript/packages/mechanisms/evm/src/shared/defaultAssets.ts—eip155:42161andeip155:421614already defined ✅go/mechanisms/evm/constants.go—ChainIDArbOneandChainIDArbSepoliaalready defined ✅This PR adds the missing network shortname entries so that clients and servers can reference
"arbitrum"by name, consistent with how"polygon","avalanche", and other chains are registered.Tests
Verified end-to-end against a live x402 infrastructure with real USDC settlement on Arbitrum One using the native
0xaf88d065e77c8cC2239327C5EDb3A432268e5831token contract. EIP-3009transferWithAuthorizationsignatures produce valid on-chain USDC transfers on Arbitrum One, confirming the chain is fully compatible with the existing exact-evm scheme.The TypeScript change is additive only (new enum values, no logic changes), so existing tests for other networks are unaffected.
Checklist