feat: integrate Cronos (chainId 25) as second-class EVM chain#11910
feat: integrate Cronos (chainId 25) as second-class EVM chain#11910gomesalexandre merged 35 commits intodevelopfrom
Conversation
…Relay bridge support Add support for Mantle (MNT native gas) including CAIP constants, chain adapter, plugin, feature flag, Relay swapper mapping, HDWallet support flags, CSP headers, asset generation script, and all required shared-file entries. Part of #11902
…lay bridge support Add support for Cronos (CRO native gas) including CAIP constants, chain adapter, plugin, feature flag, Relay swapper mapping, HDWallet support flags, CSP headers, asset generation script, and all required shared-file entries. Part of #11902
📝 WalkthroughWalkthroughThis pull request implements comprehensive support for the Cronos blockchain (chainId 25) across the entire ShapeShift ecosystem. The integration includes CAIP constants, EVM chain adapters, wallet capability flags, asset data generation, feature gating, plugin registration, transaction status utilities, and configuration setup. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Add src/lib/utils/mantle.ts with getMantleTransactionStatus using eth_getTransactionReceipt via the Mantle RPC. Add KnownChainIds.MantleMainnet case to useSendActionSubscriber.tsx so Mantle transactions resolve in the action center.
Add src/lib/utils/cronos.ts with getCronosTransactionStatus using eth_getTransactionReceipt via the Cronos RPC. Add KnownChainIds.CronosMainnet case to useSendActionSubscriber.tsx so Cronos transactions resolve in the action center. Add CHAIN_REFERENCE.CronosMainnet case to relayTokenToAssetId.ts to prevent runtime crash on Relay swaps involving Cronos.
Address PR review feedback: - Add mantleChainId to getCoingeckoSupportedChainIds (feature-flagged) - Add mantle to ZERION_CHAINS array and ZERION_CHAINS_MAP - Across does not support Mantle, skipped
Address PR review feedback: - Add cronosChainId to getCoingeckoSupportedChainIds (feature-flagged) - Add cronos to ZERION_CHAINS array and ZERION_CHAINS_MAP - Across does not support Cronos, skipped
…tle-relay # Conflicts: # .env # .env.development # packages/caip/src/adapters/coingecko/generated/index.ts # packages/caip/src/adapters/coingecko/index.ts # packages/caip/src/adapters/coingecko/utils.test.ts # packages/caip/src/adapters/coingecko/utils.ts # packages/caip/src/constants.ts # packages/chain-adapters/src/evm/EvmBaseAdapter.ts # packages/chain-adapters/src/types.ts # packages/contracts/src/ethersProviderSingleton.ts # packages/contracts/src/viemClient.ts # packages/hdwallet-coinbase/src/coinbase.ts # packages/hdwallet-core/src/ethereum.ts # packages/hdwallet-core/src/wallet.ts # packages/hdwallet-gridplus/src/gridplus.ts # packages/hdwallet-keepkey/src/keepkey.ts # packages/hdwallet-ledger/src/ledger.ts # packages/hdwallet-metamask-multichain/src/shapeshift-multichain.ts # packages/hdwallet-native/src/ethereum.ts # packages/hdwallet-phantom/src/phantom.ts # packages/hdwallet-trezor/src/trezor.ts # packages/hdwallet-vultisig/src/vultisig.ts # packages/hdwallet-walletconnectv2/src/walletconnectV2.ts # packages/swapper/src/swappers/RelaySwapper/constant.ts # packages/swapper/src/swappers/RelaySwapper/utils/relayTokenToAssetId.ts # packages/types/src/base.ts # packages/types/src/zerion.ts # packages/utils/src/assetData/baseAssets.ts # packages/utils/src/assetData/getBaseAsset.ts # packages/utils/src/chainIdToFeeAssetId.ts # packages/utils/src/getAssetNamespaceFromChainId.ts # packages/utils/src/getChainShortName.ts # packages/utils/src/getNativeFeeAssetReference.ts # scripts/generateAssetData/coingecko.ts # scripts/generateAssetData/generateAssetData.ts # src/components/TradeAssetSearch/hooks/useGetPopularAssetsQuery.tsx # src/config.ts # src/constants/chains.ts # src/hooks/useActionCenterSubscribers/useSendActionSubscriber.tsx # src/hooks/useWalletSupportsChain/useWalletSupportsChain.ts # src/lib/account/evm.ts # src/lib/asset-service/service/AssetService.ts # src/lib/coingecko/utils.ts # src/pages/Markets/components/MarketsRow.tsx # src/state/slices/portfolioSlice/utils/index.ts # src/state/slices/preferencesSlice/preferencesSlice.ts # src/test/mocks/store.ts # src/vite-env.d.ts
Missing closing braces in 7 files where auto-resolve stripped them at mantle/next-entry boundaries. Also made generateChainRelatedAssetIndex self-contained (no import from generateRelatedAssetIndex to avoid module-scope ZERION_API_KEY check). Co-Authored-By: Claude Opus 4.6 <[email protected]>
77 Mantle assets added with relatedAssetKey cross-chain linking. Co-Authored-By: Claude Opus 4.6 <[email protected]>
…nos-relay # Conflicts: # .env # .env.development # headers/csps/index.ts # packages/caip/src/adapters/coingecko/generated/index.ts # packages/caip/src/adapters/coingecko/index.ts # packages/caip/src/adapters/coingecko/utils.test.ts # packages/caip/src/adapters/coingecko/utils.ts # packages/caip/src/constants.ts # packages/chain-adapters/src/evm/EvmBaseAdapter.ts # packages/chain-adapters/src/evm/index.ts # packages/chain-adapters/src/types.ts # packages/contracts/src/ethersProviderSingleton.ts # packages/contracts/src/viemClient.ts # packages/hdwallet-coinbase/src/coinbase.ts # packages/hdwallet-core/src/ethereum.ts # packages/hdwallet-core/src/wallet.ts # packages/hdwallet-gridplus/src/gridplus.ts # packages/hdwallet-keepkey/src/keepkey.ts # packages/hdwallet-ledger/src/ledger.ts # packages/hdwallet-metamask-multichain/src/shapeshift-multichain.ts # packages/hdwallet-native/src/ethereum.ts # packages/hdwallet-phantom/src/phantom.ts # packages/hdwallet-trezor/src/trezor.ts # packages/hdwallet-vultisig/src/vultisig.ts # packages/hdwallet-walletconnectv2/src/walletconnectV2.ts # packages/swapper/src/swappers/RelaySwapper/constant.ts # packages/swapper/src/swappers/RelaySwapper/utils/relayTokenToAssetId.ts # packages/types/src/base.ts # packages/types/src/zerion.ts # packages/utils/src/assetData/baseAssets.ts # packages/utils/src/assetData/getBaseAsset.ts # packages/utils/src/chainIdToFeeAssetId.ts # packages/utils/src/getAssetNamespaceFromChainId.ts # packages/utils/src/getChainShortName.ts # packages/utils/src/getNativeFeeAssetReference.ts # scripts/generateAssetData/coingecko.ts # scripts/generateAssetData/generateAssetData.ts # src/components/TradeAssetSearch/hooks/useGetPopularAssetsQuery.tsx # src/config.ts # src/constants/chains.ts # src/hooks/useActionCenterSubscribers/useSendActionSubscriber.tsx # src/hooks/useWalletSupportsChain/useWalletSupportsChain.ts # src/lib/account/evm.ts # src/lib/asset-service/service/AssetService.ts # src/lib/coingecko/utils.ts # src/pages/Markets/components/MarketsRow.tsx # src/state/slices/opportunitiesSlice/mappings.ts # src/state/slices/portfolioSlice/utils/index.ts # src/state/slices/preferencesSlice/preferencesSlice.ts # src/test/mocks/store.ts # src/vite-env.d.ts
…-relay # Conflicts: # src/hooks/useActionCenterSubscribers/useSendActionSubscriber.tsx
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Co-Authored-By: Claude Opus 4.6 <[email protected]>
gomesalexandre
left a comment
There was a problem hiding this comment.
Happy camper generally but only 2 popular assets - happy on search though. Probably a similar fix as other second-class evm chains PRs.
Also same bug as cross-swap TO CRO present with relay, same wrapped-native asset issue as others
https://jam.dev/c/6109e7ac-37e9-4f43-84de-12b6868399ff
Cronos (receive) side Tx cronoscan.com/tx/0xec233afcac26adcac06b68f83df288fac37edc5e7963837e3e01df8a97ea3b1d
…ract - Replace Berachain-only WBERA burn detection with generalized WRAPPED_NATIVE_CONTRACT_BY_CHAIN_ID mapping in SecondClassEvmAdapter - Add WMNT address for Mantle cross-chain swap native receives - Fix Linea networkIcon URL (CoinGecko 403 -> relay.link CDN) - Update second-class-evm-chain contract with wrapped native, icon validation, and append-only convention sections Co-Authored-By: Claude Opus 4.6 <[email protected]>
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Emulates squash merge of #11905 into develop. Co-Authored-By: Claude Opus 4.6 <[email protected]>
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Co-Authored-By: Claude Opus 4.6 <[email protected]>
…migration Co-Authored-By: Claude Opus 4.6 <[email protected]>
gomesalexandre
left a comment
There was a problem hiding this comment.
happy on all counts - cronos sends, swaps (both directions), tx history, execution price, popular assets, CRO cross-chain relation all working
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Emulates squash merge of #11910 into develop. Co-Authored-By: Claude Opus 4.6 <[email protected]>
There was a problem hiding this comment.
Actionable comments posted: 8
🧹 Nitpick comments (3)
src/plugins/cronos/index.tsx (1)
22-36:fromAssetIdis called twice per asset — optional single-pass refactor.
fromAssetId(asset.assetId)is invoked in the.filter()predicate and again in.map()to extractassetReference. These can be merged into one pass to avoid redundant parsing.♻️ Combine filter + map into a single reduce pass
- return assetService.assets - .filter(asset => { - const { chainId, assetNamespace } = fromAssetId(asset.assetId) - return chainId === cronosChainId && assetNamespace === 'erc20' - }) - .map(asset => ({ - assetId: asset.assetId, - contractAddress: fromAssetId(asset.assetId).assetReference, - symbol: asset.symbol, - name: asset.name, - precision: asset.precision, - })) + return assetService.assets.reduce< + Array<{ assetId: string; contractAddress: string; symbol: string; name: string; precision: number }> + >((acc, asset) => { + const { chainId, assetNamespace, assetReference } = fromAssetId(asset.assetId) + if (chainId === cronosChainId && assetNamespace === 'erc20') { + acc.push({ + assetId: asset.assetId, + contractAddress: assetReference, + symbol: asset.symbol, + name: asset.name, + precision: asset.precision, + }) + } + return acc + }, [])🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/plugins/cronos/index.tsx` around lines 22 - 36, getKnownTokens currently calls fromAssetId(asset.assetId) twice per asset (once in the .filter predicate and again in .map), causing redundant work; update getKnownTokens to parse each asset's id once (e.g., use a single .reduce over assetService.assets or first .map to include parsed = fromAssetId(asset.assetId) then filter on parsed.chainId/assetNamespace and return the final object using parsed.assetReference) so you only call fromAssetId once per asset; target the getKnownTokens function and the use of fromAssetId, assetService.assets, and the filter/map logic when making this change.scripts/generateAssetData/generateRelatedAssetIndex/generateChainRelatedAssetIndex.ts (1)
276-285: Optional: remove now-unreachablereturnat Line 285.The recovery block (Lines 277–282) handles the sole remaining case (
!group), making the trailingreturnon Line 285 dead code. The three mutually exclusive guards now cover every possible state ofgroup:
Condition Handled by group && includesLine 264 group && !includesLine 272 !groupLines 277–282 (new) ♻️ Proposed cleanup
// Group absent from index but asset has a relatedAssetKey - recover by creating the group if (!group) { console.log( `Recovering orphaned relatedAssetKey for ${assetId}: creating group ${existingRelatedAssetKey}`, ) relatedAssetIndex[existingRelatedAssetKey] = [assetId] return } - - return }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@scripts/generateAssetData/generateRelatedAssetIndex/generateChainRelatedAssetIndex.ts` around lines 276 - 285, Remove the now-unreachable trailing "return" after the orphan recovery block in generateChainRelatedAssetIndex: the code paths for group && includes, group && !includes, and !group (the recovery that sets relatedAssetIndex[existingRelatedAssetKey] = [assetId]) already cover all cases, so delete the redundant return statement that follows that block (the lone "return" after handling !group involving group, assetId, existingRelatedAssetKey, and relatedAssetIndex).packages/chain-adapters/src/evm/cronos/CronosChainAdapter.ts (1)
18-20: Remove the duplicateisCronosChainAdaptertype guard — it's dead code.The canonical implementation lives in
src/lib/utils/cronos.tswith the necessary null/undefined defensive checks, and that's the version consumed throughout the codebase. This one is never called, and the unsafe cast(adapter as ChainAdapter).getType()would throw ifadapterisnullorundefined.♻️ Proposed fix
-export const isCronosChainAdapter = (adapter: unknown): adapter is ChainAdapter => { - return (adapter as ChainAdapter).getType() === KnownChainIds.CronosMainnet -} - export class ChainAdapter extends SecondClassEvmAdapter<KnownChainIds.CronosMainnet> {Based on learnings: "For second-class EVM chain adapters (those extending SecondClassEvmAdapter), the type guard function should only exist in
src/lib/utils/[chain].tswith defensive null/undefined and function checks. Do not duplicate the type guard in the adapter file itself, as it is dead code and the utils version is the canonical implementation actually used throughout the codebase." (gomesalexandre, PR#11905)🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/chain-adapters/src/evm/cronos/CronosChainAdapter.ts` around lines 18 - 20, Remove the dead duplicate type guard isCronosChainAdapter from CronosChainAdapter.ts; instead rely on the canonical implementation in src/lib/utils/cronos.ts which includes null/undefined and function checks. Delete the exported isCronosChainAdapter function (the one casting to ChainAdapter and calling getType() against KnownChainIds.CronosMainnet) so there is only a single safe type guard used across the codebase.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.claude/contracts/second-class-evm-chain.md:
- Line 200: The doc currently tells contributors to add a manual mapping to
manualRelatedAssetIndex but omits which files to modify; update both
generateRelatedAssetIndex.ts and generateChainRelatedAssetIndex.ts to include
the new mapping for the chain native (use the same pattern as the stablecoin
example) by adding an entry in manualRelatedAssetIndex that links the Ethereum
ERC20 identifier (eip155:1/erc20:0x...) to the chain native slip44:60; ensure
you follow the existing stablecoin mapping format and include the exact token
IDs so the per-chain "Popular Asset" filtering works correctly.
In @.claude/plan.md:
- Around line 15-26: The current plan to create synthetic internal txs from
WBERA Withdrawal events in parseTx() (using berachainChainId, WETH_ABI,
WBERA_CONTRACT) can generate false positives; update the fallback so after
detecting this.chainId === berachainChainId && internalTxs.length === 0 you
parse Withdrawal events from the receipt but only convert an event into a
synthetic internal tx when the event.src is not the user's pubkey and either
matches a configured list of known relay/fill contract addresses or passes an
explicit allowlist check; also deduplicate or aggregate multiple Withdrawal
events per tx (e.g., ignore duplicates originating from the same src or sum wad
per src when appropriate) before pushing { from: WBERA_CONTRACT, to: pubkey,
value: wad } so parse() produces Receive transfers with fewer false positives.
- Around line 21-25: The WBERA_CONTRACT constant is incorrect in the plan which
will make the Withdrawal-event fallback in parseTx() never match logs; update
the constant WBERA_CONTRACT to the canonical Berachain mainnet address
0x6969696969696969696969696969696969696969 and in parseTx() (the
berachainChainId conditional after internalTxs Promise.all) filter receipt.logs
for Withdrawal events emitted by that WBERA_CONTRACT, parse pubkey and wad from
the event, and push synthetic internal tx objects shaped like { from:
WBERA_CONTRACT, to: pubkey, value: wad } so the fallback actually produces
internalTxs when none were fetched.
In `@AGENTS.md`:
- Line 31: The "Clean up" step text is ambiguous about pruning remote branches;
update the line that currently reads "Clean up - Clear stashes, prune remote
branches" to explicitly state you should prune stale local remote-tracking
references (e.g., use "git fetch --prune" or "git remote prune origin") and
avoid wording that could be interpreted as deleting branches on the remote (do
not suggest "git push origin --delete <branch>"). Ensure the new phrasing
clarifies the safe intended operation and replaces the existing "prune remote
branches" fragment in AGENTS.md.
- Around line 19-39: Clarify the failure path for quality gates by updating the
MANDATORY WORKFLOW and CRITICAL RULES: state that Step 2 ("Run quality gates —
Tests, linters, builds") must pass before performing Step 4 ("PUSH TO REMOTE"),
and if any gate fails the agent must stop, create an issue/ticket and attach
failure logs, run automatic retries or request human approval (do not perform
"git push"), and only proceed with the push sequence after the issue is resolved
and gates pass; update the wording in the "Step 2" and "CRITICAL RULES" sections
to explicitly prohibit pushing on failed gates and to require recording the
failure (issue, logs) and awaiting remediation or explicit human sign-off.
In `@packages/chain-adapters/src/evm/SecondClassEvmAdapter.ts`:
- Around line 480-482: The fee computation produces "NaN" when
receipt.effectiveGasPrice is undefined; update the calculation in
SecondClassEvmAdapter where `fee` is computed so both operands are wrapped with
`bnOrZero` (i.e., use
bnOrZero(receipt.gasUsed).times(bnOrZero(receipt.effectiveGasPrice)).toFixed(0))
to ensure undefined values become zero and avoid NaN propagating into
`parsedTx.fee`; adjust the `fee` declaration accordingly to use `bnOrZero` on
both `receipt.gasUsed` and `receipt.effectiveGasPrice`.
In `@src/config.ts`:
- Line 69: Update the validator for VITE_CRONOS_NODE_URL to use url() instead of
str(): locate the config schema entry named VITE_CRONOS_NODE_URL and replace its
validator call so it performs URL format validation (use the same url() helper
used by other *_NODE_URL entries) to ensure proper startup validation.
In `@src/state/slices/preferencesSlice/preferencesSlice.ts`:
- Line 43: Add a new environment validator named VITE_FEATURE_CRONOS to the
configuration export (the same config object that holds other VITE_FEATURE_*
keys) by adding VITE_FEATURE_CRONOS: bool({ default: false }) so the feature
flag used by the preferences slice (Cronos) is validated and typed correctly;
update the config export type if necessary so VITE_FEATURE_CRONOS is available
throughout the app.
---
Nitpick comments:
In `@packages/chain-adapters/src/evm/cronos/CronosChainAdapter.ts`:
- Around line 18-20: Remove the dead duplicate type guard isCronosChainAdapter
from CronosChainAdapter.ts; instead rely on the canonical implementation in
src/lib/utils/cronos.ts which includes null/undefined and function checks.
Delete the exported isCronosChainAdapter function (the one casting to
ChainAdapter and calling getType() against KnownChainIds.CronosMainnet) so there
is only a single safe type guard used across the codebase.
In
`@scripts/generateAssetData/generateRelatedAssetIndex/generateChainRelatedAssetIndex.ts`:
- Around line 276-285: Remove the now-unreachable trailing "return" after the
orphan recovery block in generateChainRelatedAssetIndex: the code paths for
group && includes, group && !includes, and !group (the recovery that sets
relatedAssetIndex[existingRelatedAssetKey] = [assetId]) already cover all cases,
so delete the redundant return statement that follows that block (the lone
"return" after handling !group involving group, assetId,
existingRelatedAssetKey, and relatedAssetIndex).
In `@src/plugins/cronos/index.tsx`:
- Around line 22-36: getKnownTokens currently calls fromAssetId(asset.assetId)
twice per asset (once in the .filter predicate and again in .map), causing
redundant work; update getKnownTokens to parse each asset's id once (e.g., use a
single .reduce over assetService.assets or first .map to include parsed =
fromAssetId(asset.assetId) then filter on parsed.chainId/assetNamespace and
return the final object using parsed.assetReference) so you only call
fromAssetId once per asset; target the getKnownTokens function and the use of
fromAssetId, assetService.assets, and the filter/map logic when making this
change.
- wrap effectiveGasPrice in bnOrZero to prevent NaN fee on Cronos - use url() validator for VITE_CRONOS_NODE_URL in config.ts - specify both files for native token mapping in contract - add url() vs str() guidance to contract - clarify prune wording in AGENTS.md - add quality gate failure path to AGENTS.md - remove .claude/plan.md, gitignore claude plans Co-Authored-By: Claude Opus 4.6 <[email protected]>
Co-Authored-By: Claude Opus 4.6 <[email protected]>
NODE_OPTIONS=--max-old-space-size=8192 matches the pattern already used by dev:web. The monorepo's growing discriminated unions (33 chains × 5 union types) exceed the default ~4GB heap on GitHub Actions runners. Co-Authored-By: Claude Opus 4.6 <[email protected]>
There was a problem hiding this comment.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In `@packages/chain-adapters/src/evm/SecondClassEvmAdapter.ts`:
- Around line 480-482: The fee calculation in SecondClassEvmAdapter using
receipt.gasUsed and receipt.effectiveGasPrice can produce NaN for legacy Cronos
receipts where effectiveGasPrice is undefined; update the fee computation in the
block that assigns fee to wrap both operands with bnOrZero (i.e., use
bnOrZero(receipt.gasUsed.toString()) and
bnOrZero(receipt.effectiveGasPrice?.toString())) before multiplying and calling
toFixed(0) so the multiplication never yields NaN and legacy/undefined gas price
values are handled safely.
* feat: integrate Mantle (chainId 5000) as second-class EVM chain with Relay bridge support Add support for Mantle (MNT native gas) including CAIP constants, chain adapter, plugin, feature flag, Relay swapper mapping, HDWallet support flags, CSP headers, asset generation script, and all required shared-file entries. Part of #11902 * feat: integrate Cronos (chainId 25) as second-class EVM chain with Relay bridge support Add support for Cronos (CRO native gas) including CAIP constants, chain adapter, plugin, feature flag, Relay swapper mapping, HDWallet support flags, CSP headers, asset generation script, and all required shared-file entries. Part of #11902 * fix: add mantle coingecko generated adapter and fix test * fix: add cronos coingecko generated adapter and fix test * fix: add missing Cronos targetNetwork entry in EvmBaseAdapter * fix: add Mantle TX status polling via useSendActionSubscriber Add src/lib/utils/mantle.ts with getMantleTransactionStatus using eth_getTransactionReceipt via the Mantle RPC. Add KnownChainIds.MantleMainnet case to useSendActionSubscriber.tsx so Mantle transactions resolve in the action center. * fix: add Cronos TX status polling and relay native asset mapping Add src/lib/utils/cronos.ts with getCronosTransactionStatus using eth_getTransactionReceipt via the Cronos RPC. Add KnownChainIds.CronosMainnet case to useSendActionSubscriber.tsx so Cronos transactions resolve in the action center. Add CHAIN_REFERENCE.CronosMainnet case to relayTokenToAssetId.ts to prevent runtime crash on Relay swaps involving Cronos. * fix: add mantle to coingecko supported chains and zerion Address PR review feedback: - Add mantleChainId to getCoingeckoSupportedChainIds (feature-flagged) - Add mantle to ZERION_CHAINS array and ZERION_CHAINS_MAP - Across does not support Mantle, skipped * fix: add cronos to coingecko supported chains and zerion Address PR review feedback: - Add cronosChainId to getCoingeckoSupportedChainIds (feature-flagged) - Add cronos to ZERION_CHAINS array and ZERION_CHAINS_MAP - Across does not support Cronos, skipped * feat: integrate Sonic (eip155:146) as second-class EVM chain with Relay swapper support * fix: correct Sonic CoinGecko platform ID to sonic-3 and add empty adapter.json * fix: add native Sonic mapping to adapter.json and fix import sort * fix: wire Sonic adapter.json into generated index The Sonic adapter.json (eip155_146) was created but not imported/exported from the generated index.ts, preventing CoinGecko mapping for Sonic tokens. * chore: add bead context files (ss-dx5.3 + master ss-dx5) * chore: add bead context files (ss-dx5.4 + master ss-dx5) * chore: add bead context files (ss-dx5.7 + master ss-dx5) * fix: broken merge conflict resolutions for mantle entries Missing closing braces in 7 files where auto-resolve stripped them at mantle/next-entry boundaries. Also made generateChainRelatedAssetIndex self-contained (no import from generateRelatedAssetIndex to avoid module-scope ZERION_API_KEY check). Co-Authored-By: Claude Opus 4.6 <[email protected]> * chore: regenerate mantle assets via generate:chain 77 Mantle assets added with relatedAssetKey cross-chain linking. Co-Authored-By: Claude Opus 4.6 <[email protected]> * fix: resolve merge conflicts and regenerate cronos assets Co-Authored-By: Claude Opus 4.6 <[email protected]> * fix: lint import sort Co-Authored-By: Claude Opus 4.6 <[email protected]> * fix: resolve merge conflicts and regenerate sonic assets Co-Authored-By: Claude Opus 4.6 <[email protected]> * fix: generalize wrapped native detection, fix linea icon, update contract - Replace Berachain-only WBERA burn detection with generalized WRAPPED_NATIVE_CONTRACT_BY_CHAIN_ID mapping in SecondClassEvmAdapter - Add WMNT address for Mantle cross-chain swap native receives - Fix Linea networkIcon URL (CoinGecko 403 -> relay.link CDN) - Update second-class-evm-chain contract with wrapped native, icon validation, and append-only convention sections Co-Authored-By: Claude Opus 4.6 <[email protected]> * chore: update pr beads context * fix: add WCRO to wrapped native mapping, regen cronos assets Co-Authored-By: Claude Opus 4.6 <[email protected]> * fix: add wS to wrapped native mapping, regen sonic assets Co-Authored-By: Claude Opus 4.6 <[email protected]> * squash merge feat/integrate-cronos-relay Emulates squash merge of #11910 into develop. Co-Authored-By: Claude Opus 4.6 <[email protected]> * chore: regen sonic, cronos, linea, mantle assets Co-Authored-By: Claude Opus 4.6 <[email protected]> * chore: remove plan.md, gitignore claude plans Co-Authored-By: Claude Opus 4.6 <[email protected]> * chore: regen sonic, cronos, mantle, linea after develop merge Co-Authored-By: Claude Opus 4.6 <[email protected]> * chore: update pr beads context * fix: sonic coingecko platform id, icon url, regen 114 assets CoingeckoAssetPlatform.Sonic was 'sonic-3' (the coin ID) instead of 'sonic' (the platform ID), resulting in zero ERC20 tokens discovered. Also fix dead icon URL (38051 -> 38108). Update contract with platform ID verification step. Co-Authored-By: Claude Opus 4.6 <[email protected]> * merge origin/develop (cronos) + add sonic stablecoin related assets - resolve merge conflicts (keep both cronos + sonic entries) - add FTM ERC20 → Sonic S native mapping in related asset index - add Sonic native USDC + bridged USDT to manual stablecoin mappings - add state migration 296 for sonic - regenerate chain data with updated mappings Co-Authored-By: Claude Opus 4.6 <[email protected]> --------- Co-authored-by: gomes <[email protected]> Co-authored-by: Claude Opus 4.6 <[email protected]>
Description
Add support for Cronos (EVM L1, chainId 25) as a second-class citizen. Cronos is an EVM-compatible L1 blockchain with CRO as the native gas token.
This is PR 2 of 17 in a sequential chain integration series. These PRs must be reviewed and merged in order, as each builds on the previous one (stacked branches).
PR merge order:
Implements: CAIP constants, chain adapter, plugin, feature flag, Relay swapper mapping, HDWallet support flags, CSP headers, asset generation script, and all required shared-file entries.
Issue (if applicable)
Part of #11902
Risk
Low - All changes are behind the
Cronosfeature flag (VITE_FEATURE_CRONOS), disabled by default in production.No new on-chain transactions or contract interactions. Standard EVM chain support using existing SecondClassEvmAdapter pattern.
Testing
Engineering
VITE_FEATURE_CRONOS=truein.env.developmentyarn devOperations
Summary by CodeRabbit
New Features
Chores