-
Notifications
You must be signed in to change notification settings - Fork 202
feat: integrate Cronos (chainId 25) as second-class EVM chain #11910
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
7506c3a
feat: integrate Mantle (chainId 5000) as second-class EVM chain with …
NeOMakinG 70fbffe
feat: integrate Cronos (chainId 25) as second-class EVM chain with Re…
NeOMakinG 150c1cb
fix: add mantle coingecko generated adapter and fix test
NeOMakinG 46d51b4
fix: add cronos coingecko generated adapter and fix test
NeOMakinG b4a9910
fix: add missing Cronos targetNetwork entry in EvmBaseAdapter
NeOMakinG 5d93fd9
fix: add Mantle TX status polling via useSendActionSubscriber
NeOMakinG 9fe2839
fix: add Cronos TX status polling and relay native asset mapping
NeOMakinG fe27283
fix: add mantle to coingecko supported chains and zerion
NeOMakinG d49b10f
fix: add cronos to coingecko supported chains and zerion
NeOMakinG 7bf5ad3
chore: add bead context files (ss-dx5.3 + master ss-dx5)
NeOMakinG a91456e
chore: add bead context files (ss-dx5.4 + master ss-dx5)
NeOMakinG 6b57992
Merge remote-tracking branch 'origin/develop' into feat/integrate-man…
gomesalexandre d689825
fix: broken merge conflict resolutions for mantle entries
gomesalexandre a057785
chore: regenerate mantle assets via generate:chain
gomesalexandre 20e0f22
Merge remote-tracking branch 'origin/develop' into feat/integrate-cro…
gomesalexandre e2c1826
Merge branch 'feat/integrate-mantle-relay' into feat/integrate-cronos…
gomesalexandre 763b3cd
fix: resolve merge conflicts and regenerate cronos assets
gomesalexandre e89b577
fix: lint import sort
gomesalexandre eb47d3d
Merge branch 'feat/integrate-mantle-relay' into feat/integrate-cronos…
gomesalexandre 218766e
Merge branch 'develop' into feat/integrate-mantle-relay
gomesalexandre 2a8915f
fix: generalize wrapped native detection, fix linea icon, update cont…
gomesalexandre ee8bba9
chore: update pr beads context
gomesalexandre 0cbc863
merge: feat/integrate-mantle-relay into feat/integrate-cronos-relay
gomesalexandre 45489e0
fix: add WCRO to wrapped native mapping, regen cronos assets
gomesalexandre bed81cc
squash merge feat/integrate-mantle-relay
gomesalexandre 2ba70b8
chore: regen cronos, linea, mantle assets
gomesalexandre 543a570
Merge branch 'develop' into feat/integrate-cronos-relay
gomesalexandre ba7d999
chore: regen cronos, linea, mantle assets
gomesalexandre da4c21a
fix: add CRO cross-chain relation, state migration, orphan key recovery
gomesalexandre c1cc36f
fix: null-safe effectiveGasPrice in SecondClassEvmAdapter, add state …
gomesalexandre 5f6fce2
chore: add lint-before-push rule to CLAUDE.md
gomesalexandre 07848e7
chore: trigger CI
gomesalexandre c1a723c
fix: address coderabbitai review comments
gomesalexandre de42e3c
revert: remove AGENTS.md changes from cronos pr
gomesalexandre 093b000
fix: type-check OOM on CI by increasing node heap size
gomesalexandre File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| [ | ||
| { | ||
| "id": "ss-dx5.4", | ||
| "title": "Integrate Cronos (chainId: 25, CRO, EVM Sidechain)", | ||
| "description": "TVL: $376.1M | RPC: https://cronos.drpc.org | Explorer: https://cronoscan.com | Token Support: All | Pattern B (RPC-only) | Crypto.com ecosystem", | ||
| "notes": "Logo: https://assets.relay.link/icons/25/light.png (dark: dark.png)\nCoinGecko: cronos\nArch: EVM Sidechain (Crypto.com)\nViem key: cronos\n⚠️ NON-ETH GAS: CRO - must configure in chainIdToFeeAssetId.ts\nChecklist: [ ] chain-adapters [ ] caip [ ] asset-service [ ] feature-flag [ ] plugin [ ] env-config [ ] icon/logo [ ] fee-asset-config\n\n--- RELAY ACTIVATION ---\n[ ] Add to chainIdToRelayChainId in packages/swapper/src/swappers/RelaySwapper/constant.ts\n[ ] Add native asset case in packages/swapper/src/swappers/RelaySwapper/utils/relayTokenToAssetId.ts\n--- ASSET DATA REGEN ---\n[ ] Create scripts/generateAssetData/\u003cchainname\u003e/index.ts\n[ ] Add case to scripts/generateAssetData/coingecko.ts\n[ ] Add import + getAssets call to scripts/generateAssetData/generateAssetData.ts\n[ ] Run: yarn generate:asset-data\n--- DRAFT PR ---\n[ ] Branch: feat/integrate-\u003cchainname\u003e-relay (off develop)\n[ ] gh pr create --draft using .github/PULL_REQUEST_TEMPLATE.md\n[ ] Fill: Description, Issue (Part of #11902), Risk (Low - behind feature flag), Testing (enable flag + verify chain + relay bridge quote), Operations (behind flag checkbox)\n[ ] yarn lint --fix \u0026\u0026 yarn type-check must pass before PR", | ||
| "status": "open", | ||
| "priority": 1, | ||
| "issue_type": "task", | ||
| "owner": "[email protected]", | ||
| "created_at": "2026-02-17T10:55:24Z", | ||
| "created_by": "NeOMakinG", | ||
| "updated_at": "2026-02-17T11:21:35Z", | ||
| "labels": [ | ||
| "evm", | ||
| "non-eth-gas", | ||
| "relay", | ||
| "tier-1" | ||
| ], | ||
| "dependencies": [ | ||
| { | ||
| "id": "ss-dx5", | ||
| "title": "Add support for missing Relay.link EVM chains", | ||
| "description": "Master epic tracking integration of ALL chains supported by Relay.link that ShapeShift web doesn't currently support. Enables cross-chain bridging capabilities via Relay infrastructure. See https://github.com/shapeshift/web/issues/11902 for full details. All new EVM chains will use Pattern B (RPC-only + getKnownTokens) since no ShapeShift unchained indexer infrastructure exists for these chains.", | ||
| "notes": "=== FROM ISSUE COMMENTS ===\n\nLOGO PATTERN: https://assets.relay.link/icons/{chainId}/light.png (dark: dark.png)\n\nARCHITECTURE GROUPS:\n- OP Stack (standard): Ink, Unichain, BOB, Mode, Hemi, World Chain, Soneium, Zircuit, Lisk, Cyber, Blast, Zora, Redstone, Shape, Superseed, Manta Pacific\n- zkEVM (special handling): Scroll, zkSync Era, Linea, Polygon zkEVM, Taiko, Abstract\n- Arbitrum Orbit: ApeChain, Xai, Sanko\n- Non-ETH gas (10 chains): Mantle(MNT), Metis(METIS), Cronos(CRO), Ronin(RON), Sonic(S), Flow(FLOW), Berachain(BERA), Plume(PLUME), Story(IP), Stable(gUSDT)\n\nCRITICAL CHAINS:\n1. Celo (42220): Native token is BOTH native AND ERC20. Relay uses wrapped CELO. Check relayTransactionMetadata.assetRequiringApproval\n2. Blast (81457): Rebasing ETH from L1 staking yield. USDB also rebases. Handle in balance displays.\n3. Ethereal (5064014): NOT in viem. Needs custom chain definition.\n4. zkSync Era (324) + Abstract (2741): Type 113 (EIP-712) transactions. Use viem zksync chainConfig.\n5. Linea (59144): Custom linea_estimateGas RPC method.\n6. Sei (1329): Parallelized EVM + CosmWasm interop. CoinGecko uses sei-v2 NOT sei.\n\nCOINGECKO GOTCHAS: sei-\u003esei-v2, plume-\u003eplume-network, zksync-\u003ezksync, metis-\u003emetis-andromeda, morph-\u003emorph-l2, gravity-\u003egravity-alpha, boba-\u003eboba, zora-\u003ezora-network, funkichain-\u003efunki, Superposition (capital S). BOB/Zero Network have null chain_identifier. 11 chains not on CoinGecko at all.\n\nPER-CHAIN CHECKLIST: [ ] chain-adapters [ ] caip [ ] asset-service [ ] feature-flag [ ] plugin [ ] env-config [ ] icon/logo\n\n=== RELAY SWAPPER INTEGRATION (per chain) ===\n\nFILE 1: packages/swapper/src/swappers/RelaySwapper/constant.ts\n - Add to chainIdToRelayChainId map: [newChainChainId]: \u003cviem_chain\u003e.id (or numeric chain ID)\n - Import the caip chainId (e.g., scrollChainId) from @shapeshiftoss/caip\n - Import viem chain from viem/chains (or use raw numeric ID if not in viem)\n - The reverse map relayChainIdToChainId auto-generates via invert()\n\nFILE 2: packages/swapper/src/swappers/RelaySwapper/utils/relayTokenToAssetId.ts\n - Add case CHAIN_REFERENCE.NewChainMainnet: with ASSET_REFERENCE.NewChain + ASSET_NAMESPACE.slip44\n\nNO CHANGES NEEDED (for EVM chains):\n - getRelayAssetAddress.ts (uses generic isNativeEvmAsset + DEFAULT_RELAY_EVM_TOKEN_ADDRESS)\n - getRelayDefaultUserAddress.ts (falls through to DEFAULT_RELAY_EVM_USER_ADDRESS default)\n\nUPSTREAM DEPS REQUIRED (in @shapeshiftoss packages):\n - @shapeshiftoss/caip: export newChainChainId, CHAIN_REFERENCE.NewChainMainnet, ASSET_REFERENCE.NewChain\n - @shapeshiftoss/types: KnownChainIds.NewChainMainnet\n - @shapeshiftoss/chain-adapters: NewChain chain adapter class\n - viem/chains: chain config (or custom if not in viem)\n\nRELAY API: https://api.relay.link (env: VITE_RELAY_API_URL) - no per-chain config needed\n\n=== ASSET DATA REGENERATION (per chain) ===\n\nAfter integrating each chain, run a partial assets data regen to populate the token list.\n\nFILE 1 (CREATE): scripts/generateAssetData/\u003cchainname\u003e/index.ts\n Pattern (identical for all EVM chains):\n import { \u003cchainname\u003eChainId } from '@shapeshiftoss/caip'\n import type { Asset } from '@shapeshiftoss/types'\n import { \u003cchainname\u003e, unfreeze } from '@shapeshiftoss/utils'\n import * as coingecko from '../coingecko'\n export const getAssets = async (): Promise\u003cAsset[]\u003e =\u003e {\n const assets = await coingecko.getAssets(\u003cchainname\u003eChainId)\n return [...assets, unfreeze(\u003cchainname\u003e)]\n }\n\nFILE 2 (MODIFY): scripts/generateAssetData/coingecko.ts\n - Import \u003cchainname\u003eChainId from @shapeshiftoss/caip\n - Import \u003cchainname\u003e native asset from @shapeshiftoss/utils\n - Add case in the switch: case \u003cchainname\u003eChainId: return { assetNamespace: ASSET_NAMESPACE.erc20, category: adapters.chainIdToCoingeckoAssetPlatform(chainId), explorer/explorerAddressLink/explorerTxLink from \u003cchainname\u003e utils }\n - NOTE: chains not on CoinGecko will only have the native asset (no ERC20 token list)\n\nFILE 3 (MODIFY): scripts/generateAssetData/generateAssetData.ts\n - Import: import * as \u003cchainname\u003e from './\u003cchainname\u003e'\n - Call: const \u003cchainname\u003eAssets = await \u003cchainname\u003e.getAssets()\n - Spread into unfilteredAssetData: ...\u003cchainname\u003eAssets\n\nCOMMAND: yarn generate:asset-data\n This regenerates: src/generated/asset-data.json + related-asset-index + manifest + compressed assets\n\n=== DRAFT PR CREATION (final step per chain) ===\n\nAfter all code changes are complete for a chain, open a draft PR using the repo template.\n\nBRANCH NAMING: feat/integrate-\u003cchainname\u003e-relay (e.g. feat/integrate-scroll-relay)\n\nCOMMAND:\n gh pr create --draft --title 'feat: integrate \u003cChainName\u003e (chainId: \u003cid\u003e) via Relay' --body \"$(cat \u003c\u003c'PREOF'\n ## Description\n\n Add \u003cChainName\u003e (chainId: \u003cid\u003e) as a second-class EVM chain in ShapeShift Web with Relay bridge support.\n\n **Changes:**\n - Plugin registration in src/plugins/\u003cchainname\u003e/\n - Feature flag `\u003cChainName\u003e` in preferencesSlice\n - Relay swapper chain mapping in RelaySwapper/constant.ts\n - Asset data generation via CoinGecko (`\u003ccoingecko_platform_id\u003e`)\n - Environment config for RPC URL\n\n **Chain details:**\n - TVL: \u003ctvl\u003e\n - Native token: \u003ctoken\u003e (18 decimals)\n - Architecture: \u003carch_type\u003e\n - RPC: \u003crpc_url\u003e\n - Explorer: \u003cexplorer_url\u003e\n\n ## Issue (if applicable)\n\n Part of #11902\n\n ## Risk\n\n Low risk — new chain behind feature flag (`\u003cChainName\u003e`), no existing functionality affected.\n\n \u003e New chain plugin + Relay bridge mapping. No modifications to existing chain logic.\n\n ## Testing\n\n ### Engineering\n\n 1. Enable feature flag: set `VITE_FEATURE_\u003cCHAINNAME\u003e=true` in .env\n 2. Verify chain appears in supported chains list\n 3. Verify native token balance loads (connect wallet with \u003ctoken\u003e on \u003cChainName\u003e)\n 4. Verify Relay bridge quote works: bridge ETH from Ethereum → \u003cChainName\u003e\n 5. Run `yarn lint --fix \u0026\u0026 yarn type-check` — must pass\n\n ### Operations\n\n - [x] :checkered_flag: My feature is behind a flag and doesn't require operations testing (yet)\n\n ## Screenshots (if applicable)\n\n N/A — chain integration, no UI changes.\n PREOF\n )\"\n\nNOTE: Replace all \u003cplaceholders\u003e with actual chain values from the bead description/notes.\nNOTE: Use --draft flag to create as draft PR.\nNOTE: Branch off develop (main branch is develop, not main).", | ||
| "status": "open", | ||
| "priority": 0, | ||
| "issue_type": "epic", | ||
| "owner": "[email protected]", | ||
| "created_at": "2026-02-17T10:55:02Z", | ||
| "created_by": "NeOMakinG", | ||
| "updated_at": "2026-02-17T11:21:27Z", | ||
| "external_ref": "gh-11902", | ||
| "dependency_type": "parent-child" | ||
| } | ||
| ], | ||
| "parent": "ss-dx5" | ||
| } | ||
| ] |
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| # Agent Instructions | ||
|
|
||
| This project uses **bd** (beads) for issue tracking. Run `bd onboard` to get started. | ||
|
|
||
| ## Quick Reference | ||
|
|
||
| ```bash | ||
| bd ready # Find available work | ||
| bd show <id> # View issue details | ||
| bd update <id> --status in_progress # Claim work | ||
| bd close <id> # Complete work | ||
| bd sync # Sync with git | ||
| ``` | ||
|
|
||
| ## Landing the Plane (Session Completion) | ||
|
|
||
| **When ending a work session**, you MUST complete ALL steps below. Work is NOT complete until `git push` succeeds. | ||
|
|
||
| **MANDATORY WORKFLOW:** | ||
|
|
||
| 1. **File issues for remaining work** - Create issues for anything that needs follow-up | ||
| 2. **Run quality gates** (if code changed) - Tests, linters, builds | ||
| 3. **Update issue status** - Close finished work, update in-progress items | ||
| 4. **PUSH TO REMOTE** - This is MANDATORY: | ||
| ```bash | ||
| git pull --rebase | ||
| bd sync | ||
| git push | ||
| git status # MUST show "up to date with origin" | ||
| ``` | ||
| 5. **Clean up** - Clear stashes, prune remote branches | ||
| 6. **Verify** - All changes committed AND pushed | ||
| 7. **Hand off** - Provide context for next session | ||
|
|
||
| **CRITICAL RULES:** | ||
| - Work is NOT complete until `git push` succeeds | ||
| - NEVER stop before pushing - that leaves work stranded locally | ||
| - NEVER say "ready to push when you are" - YOU must push | ||
| - If push fails, resolve and retry until it succeeds | ||
|
|
||
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| import { loadEnv } from 'vite' | ||
|
|
||
| import type { Csp } from '../../types' | ||
|
|
||
| const mode = process.env.MODE ?? process.env.NODE_ENV ?? 'development' | ||
| const env = loadEnv(mode, process.cwd(), '') | ||
|
|
||
| export const csp: Csp = { | ||
| 'connect-src': [env.VITE_CRONOS_NODE_URL], | ||
| } |
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
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
1 change: 1 addition & 0 deletions
1
packages/caip/src/adapters/coingecko/generated/eip155_25/adapter.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| {"eip155:25/slip44:60":"crypto-com-chain"} |
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.