fix(tron): use decimal CAIP-2 identifiers - #96
Merged
Conversation
roger-gan
force-pushed
the
fix/tron-decimal-caip2
branch
from
August 31, 2026 11:27
82145d2 to
42829dc
Compare
Will-Guan
approved these changes
Sep 1, 2026
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
Use decimal TRON chain IDs as the canonical CAIP-2 references for Mainnet
(
tron:728126428), Nile (tron:3448148188), and Shasta (tron:2494104990).This prepares x402 for the canonical identifiers proposed in
ChainAgnostic/namespaces#170 and removes the
ambiguity between the CAIP-2 reference and TIP-712's numeric
chainId.The migration is tolerant on input and canonical on new configuration:
Breaking change
The values of
TRON_MAINNET,TRON_NILE, andTRON_SHASTAchange to decimal CAIP-2 identifiers.@bankofai/x402-trontherefore has a major changeset; the core compatibility matcher has a patchchangeset. Existing hexadecimal inputs continue to work during migration.
Tests
pnpm --filter @bankofai/x402-tron lint:checkpnpm --filter @bankofai/x402-tron format:checkpnpm --filter @bankofai/x402-tron test— 24 files, 258 tests passedpnpm --filter @bankofai/x402-tron buildpnpm --filter @bankofai/x402-core lint:checkpnpm --filter @bankofai/x402-core format:checkpnpm --filter @bankofai/x402-core test— 22 files, 650 tests passedpnpm --filter @bankofai/x402-core buildpnpm --filter @bankofai/x402-evm test— 38 files, 830 tests passedgit diff --check origin/develop...HEADBranch route
developrelease_*orhotfix/*targetsmainChecklist