Skip to content

feat: integrate BOB (eip155:60808) as second-class citizen#11925

Merged
gomesalexandre merged 55 commits intodevelopfrom
feat/integrate-bob-relay
Feb 21, 2026
Merged

feat: integrate BOB (eip155:60808) as second-class citizen#11925
gomesalexandre merged 55 commits intodevelopfrom
feat/integrate-bob-relay

Conversation

@NeOMakinG
Copy link
Collaborator

@NeOMakinG NeOMakinG commented Feb 17, 2026

Description

Integrates BOB (eip155:60808) as a second-class citizen chain in ShapeShift Web via Relay.link.

This is PR 5 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:

  1. Mantle (feat: integrate Mantle (chainId 5000) as second-class EVM chain #11905)
  2. Cronos (feat: integrate Cronos (chainId 25) as second-class EVM chain #11910)
  3. Sonic (feat: integrate Sonic (eip155:146) as second-class EVM chain #11923)
  4. Unichain (feat: integrate Unichain (eip155:130) as second-class citizen via Relay #11924)
  5. BOB (feat: integrate BOB (eip155:60808) as second-class citizen #11925) ← this PR
  6. Mode (feat: integrate Mode (eip155:34443) as second-class citizen #11926)
  7. Soneium (feat: integrate Soneium (chainId: 1868) via Relay #11930)
  8. Hemi (feat: integrate Hemi (chainId: 43111) via Relay #11931)
  9. World Chain (feat: integrate World Chain (480) as second-class Relay chain #11932)
  10. Blast (feat: integrate Blast (81457) as second-class Relay chain #11933)
  11. zkSync Era (feat: integrate zkSync Era (324) as second-class Relay chain #11934)
  12. Story (feat: integrate Story (1514) as second-class Relay chain #11936)
  13. Plume (feat: integrate Plume (98866) as second-class Relay chain #11937)
  14. Flow EVM (feat: integrate Flow EVM (747) as second-class Relay chain #11938)
  15. Celo (feat: integrate Celo (42220) as second-class Relay chain #11939)
  16. Ethereal (feat: integrate Ethereal (5064014) as second-class Relay chain #11940)

Note: Linea (#11922) is already in develop.

BOB is an EVM L2 with ETH as its native gas token. This integration adds full support including:

  • Chain constants, types, and HDWallet support (all wallet types)
  • EVM chain adapter with BOB-specific configuration
  • Relay swapper chain mapping
  • CoinGecko price adapter (platform: bob-network, maps to ethereum)
  • Zerion chain mapping
  • Feature flag (VITE_FEATURE_BOB) gated behind second-class citizen config
  • CSP headers for RPC and explorer endpoints
  • Asset generation scripts
  • Related asset index entry (ETH-native)
  • CoinGecko supported chain IDs integration

Issue (if applicable)

Part of #11902

Risk

Low risk - feature-flagged second-class chain integration following established patterns (identical to Scroll, Ink, Mantle, Cronos, Berachain, Linea, Sonic, Unichain integrations).

What protocols, transaction types, wallets or contract interactions might be affected by this PR?

No existing protocols affected. New chain only accessible when feature flag is enabled.

Testing

Engineering

  1. Enable feature flag: Set VITE_FEATURE_BOB=true in .env.development
  2. Verify BOB chain appears in chain selector
  3. Verify BOB ETH balance loads for connected wallet
  4. Verify Relay swaps work for BOB assets
  5. Run yarn type-check - passes
  6. Run yarn lint - passes

Operations

  • 🏁 My feature is behind a flag and doesn't require operations testing (yet)

Screenshots (if applicable)

N/A - chain integration following established patterns

Summary by CodeRabbit

  • New Features

    • Added Bob blockchain network support with integrated wallet compatibility, enabling users to manage assets and execute transactions on Bob chain with real-time transaction monitoring.
  • Chores

    • Integrated Bob network infrastructure including RPC endpoint configuration, asset catalog integration, transaction tracking, DeFi opportunity support, market data aggregation, and multi-wallet ecosystem compatibility.

…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
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
Adds full Unichain support including:
- CAIP constants, types, and chain adapter
- HDWallet support flags across all wallet implementations
- Relay and Across swapper mappings
- CoinGecko adapter with unichain platform
- Zerion chain mapping
- Feature flag, plugin, CSP headers
- Portfolio, account, asset service, and market integrations
- Asset generation scripts and related asset index (ETH-native)

Part of #11902
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 17, 2026

Warning

Rate limit exceeded

@gomesalexandre has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 9 minutes and 18 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📝 Walkthrough

Walkthrough

This PR adds comprehensive Bob EVM chain support across the entire application stack, including environment configuration, CAIP constants, chain adapters, wallet capabilities, blockchain clients, asset generation, feature flags, and transaction utilities.

Changes

Cohort / File(s) Summary
Environment & Configuration
.env, .env.development, src/config.ts, src/vite-env.d.ts
Added VITE_BOB_NODE_URL and VITE_FEATURE_BOB environment variables with typed validation and Vite declarations.
Chain Constants & Types
packages/types/src/base.ts, packages/caip/src/constants.ts, packages/types/src/zerion.ts
Introduced KnownChainIds.BobMainnet (eip155:60808), bobChainId, bobAssetId, and ASSET_REFERENCE.Bob constants; added BobMainnet to EvmChainId union and Zerion chain mappings.
CSP Headers & BEADS Task
headers/csps/chains/bob.ts, headers/csps/index.ts, .beads/ss-dx5.9.json
Created Bob CSP configuration and integrated into headers; added BEADS task metadata for Bob integration tracking.
EVM Chain Adapters
packages/chain-adapters/src/evm/EvmBaseAdapter.ts, packages/chain-adapters/src/evm/SecondClassEvmAdapter.ts, packages/chain-adapters/src/evm/bob/BobChainAdapter.ts, packages/chain-adapters/src/evm/bob/index.ts, packages/chain-adapters/src/evm/index.ts
Implemented Bob EVM chain adapter with BIP44 support, wrapped native contract mapping, and exported public API surface for Bob chain operations.
Chain Type Mappings
packages/chain-adapters/src/types.ts
Extended account, fee data, transaction signing, and build input types to support BobMainnet with EVM-specific mappings; added ChainAdapterDisplayName.Bob enum.
Blockchain Clients
packages/contracts/src/viemClient.ts, packages/contracts/src/ethersProviderSingleton.ts
Created viem PublicClient for Bob with fallback RPC configuration; wired Bob into client and network ID lookup tables.
HDWallet Capability Flags
packages/hdwallet-core/src/ethereum.ts, packages/hdwallet-core/src/wallet.ts, packages/hdwallet-coinbase/src/coinbase.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
Added _supportsBob capability flag across all wallet implementations (false for unsupported wallets, true for Ledger/Trezor/Native/MetaMask/WalletConnect); introduced supportsBob() type guard.
Coingecko Adapter Integration
packages/caip/src/adapters/coingecko/index.ts, packages/caip/src/adapters/coingecko/index.test.ts, packages/caip/src/adapters/coingecko/utils.ts, packages/caip/src/adapters/coingecko/utils.test.ts
Added CoingeckoAssetPlatform.Bob enum, bidirectional chain-to-platform mappings, Bob ERC20 asset parsing logic, and test fixtures for Bob chain assets.
Asset Generation Pipeline
scripts/generateAssetData/bob/index.ts, scripts/generateAssetData/generateAssetData.ts, scripts/generateAssetData/coingecko.ts, scripts/generateAssetData/generateRelatedAssetIndex/generateRelatedAssetIndex.ts, scripts/generateAssetData/generateRelatedAssetIndex/generateChainRelatedAssetIndex.ts
Implemented Bob asset generation module, integrated into asset pipeline, extended Coingecko asset generation, and added Bob to ETH-related asset index.
Asset Utilities & Constants
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
Created bobChain asset object; extended chain-to-asset mappings for fee assets, namespaces, short names, and native asset references.
Relay Swapper Configuration
packages/swapper/src/swappers/RelaySwapper/constant.ts, packages/swapper/src/swappers/RelaySwapper/utils/relayTokenToAssetId.ts
Added Bob to chainIdToRelayChainId mapping; extended native asset resolution to return Bob asset reference for BobMainnet.
Feature Flags & Redux State
src/state/slices/preferencesSlice/preferencesSlice.ts, src/state/slices/portfolioSlice/utils/index.ts, src/state/slices/opportunitiesSlice/mappings.ts, src/state/migrations/index.ts, src/test/mocks/store.ts
Added Bob feature flag to preferences schema with config initialization; extended portfolio utils for Bob account labeling and wallet support checks; added DeFi opportunity mapping; updated redux migration key; updated mock store.
Chain Configuration & Filtering
src/constants/chains.ts, src/context/PluginProvider/PluginProvider.tsx, src/pages/Markets/components/MarketsRow.tsx
Added BobMainnet to SECOND_CLASS_CHAINS with feature flag gating; integrated Bob feature flag checks in plugin and market filtering logic.
Hook & Service Integration
src/hooks/useWalletSupportsChain/useWalletSupportsChain.ts, src/lib/account/evm.ts, src/lib/asset-service/service/AssetService.ts, src/lib/coingecko/utils.ts, src/hooks/useActionCenterSubscribers/useSendActionSubscriber.tsx
Extended wallet support checks with Bob flag and capability guard; added Bob asset filtering in service layer; extended Coingecko chain support; integrated Bob transaction status handler.
Bob-Specific Utilities
src/lib/utils/bob.ts
Created utility module with isBobChainAdapter() type guard and getBobTransactionStatus() function for receipt-based status resolution with error handling.
Plugin Registration
src/plugins/activePlugins.ts, src/plugins/bob/index.tsx
Registered Bob plugin in active plugins list; implemented Bob chain adapter plugin with feature gating, RPC wiring, and getKnownTokens callback for ERC-20 token discovery.
Market Service Tests
src/lib/market-service/coingecko/coingecko.test.ts
Updated test expectations to include Bob asset key in flattened response maps and Coingecko ID-to-assetId mappings.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~75 minutes

Possibly related PRs

  • shapeshift/web#11918: Implements parallel second-class EVM chain integration (Berachain) with identical code-level changes across CAIP constants, chain adapters, viem/ethers clients, hdwallet support, transaction utilities, and plugin registration.
  • shapeshift/web#11923: Adds Sonic chain support using the same integration pattern across CAIP constants, chain adapters, hdwallet capability flags, Relay swapper mappings, asset generation, and feature flags.
  • shapeshift/web#11275: Implements Plasma EVM chain integration modifying identical modules (env vars, chain constants, viem/ethers clients, EvmBaseAdapter checks, chain-adapter exports, swapper mappings, and utilities).

Suggested labels

high risk


🐰 Bob's here to stay, hooray, hooray!
A second-class EVM chain joins the fray,
With adapters, clients, and assets so bright,
Feature flags gated, the integration's just right! 🪙✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: integrate BOB (eip155:60808) as second-class citizen' clearly and concisely describes the main change in the changeset: adding BOB chain integration as a second-class EVM citizen.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/integrate-bob-relay

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

NeOMakinG and others added 14 commits February 17, 2026 23:19
The BOB adapter.json (eip155_60808) was created but not imported/exported
from the generated index.ts, causing coingeckoToAssetIds to not return BOB.
Also fix ethereum assetId ordering and add BOB to market-service test.
The Unichain adapter.json (eip155_130) was created but not imported/exported
from the generated index.ts, causing coingeckoToAssetIds to not return Unichain.
The Sonic adapter.json (eip155_146) was created but not imported/exported
from the generated index.ts, preventing CoinGecko mapping for Sonic tokens.
…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
gomesalexandre and others added 2 commits February 21, 2026 12:10
…-relay

# Conflicts:
#	.beads/pr-context.jsonl
#	.beads/ss-dx5.8.json
#	.claude/contracts/second-class-evm-chain.md
#	.env
#	.env.development
#	packages/caip/src/adapters/coingecko/index.test.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/SecondClassEvmAdapter.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
#	public/generated/asset-manifest.json
#	public/generated/asset-manifest.json.br
#	public/generated/asset-manifest.json.gz
#	public/generated/generatedAssetData.json
#	public/generated/generatedAssetData.json.br
#	public/generated/generatedAssetData.json.gz
#	public/generated/relatedAssetIndex.json
#	public/generated/relatedAssetIndex.json.br
#	public/generated/relatedAssetIndex.json.gz
#	scripts/generateAssetData/coingecko.ts
#	scripts/generateAssetData/generateAssetData.ts
#	scripts/generateAssetData/generateRelatedAssetIndex/generateChainRelatedAssetIndex.ts
#	scripts/generateAssetData/generateRelatedAssetIndex/generateRelatedAssetIndex.ts
#	src/components/TradeAssetSearch/hooks/useGetPopularAssetsQuery.tsx
#	src/config.ts
#	src/constants/chains.ts
#	src/context/PluginProvider/PluginProvider.tsx
#	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/lib/market-service/coingecko/coingecko.test.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
@gomesalexandre gomesalexandre marked this pull request as ready for review February 21, 2026 11:13
@gomesalexandre gomesalexandre requested a review from a team as a code owner February 21, 2026 11:13
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/caip/src/constants.ts (1)

293-326: ⚠️ Potential issue | 🟡 Minor

bobAssetId missing from FEE_ASSET_IDS

Most second-class EVM chains have their fee asset IDs in FEE_ASSET_IDS (Monad, Mantle, Ink, MegaEth, Linea, Berachain, Scroll, Cronos, Sonic, Unichain), but hyperEvmAssetId, plasmaAssetId, katanaAssetId, and now bobAssetId are absent. The inline comment — "We should prob change this once we add more chains" — suggests these were intended to be included.

If FEE_ASSET_IDS is consulted anywhere to identify the native gas asset for a chain, BOB transactions may not be handled correctly.

🛠️ Proposed fix
   unichainAssetId,
+  bobAssetId,
   solAssetId,
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/caip/src/constants.ts` around lines 293 - 326, FEE_ASSET_IDS is
missing bobAssetId (and other second-class EVM assets like hyperEvmAssetId,
plasmaAssetId, katanaAssetId) which can cause native gas detection to fail;
update the exported FEE_ASSET_IDS array in constants.ts to include bobAssetId
(and add the other missing asset id constants if intended) so that native fee
handling covers BOB chains—locate the FEE_ASSET_IDS declaration and append
bobAssetId to the list alongside the other second-class EVM asset id symbols.
🧹 Nitpick comments (5)
.env.development (1)

66-66: Optional: key ordering inconsistent with dotenv-linter

VITE_BOB_NODE_URL and VITE_FEATURE_BOB (line 116) trigger dotenv-linter UnorderedKey warnings. The existing file uses logical grouping rather than strict alphabetical order so this is a pre-existing pattern, but if CI enforces the linter strictly these will need to move.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.env.development at line 66, Reorder the environment keys to satisfy
dotenv-linter's UnorderedKey rule by moving VITE_BOB_NODE_URL and
VITE_FEATURE_BOB into their alphabetical positions among the other VITE_
variables (or adjust the linter config if grouping is intentional); locate the
entries for VITE_BOB_NODE_URL and VITE_FEATURE_BOB and place them where they
belong alphabetically with the rest of the VITE_ keys so CI no longer reports
UnorderedKey warnings.
.env (1)

167-167: dotenv-linter flags unordered keysVITE_BOB_NODE_URL falls after VITE_CRONOS_NODE_URL (B < C), and VITE_FEATURE_BOB falls after VITE_FEATURE_CETUS_SWAP (B < C). The project pattern places newly added chains at the end of each section rather than inserting alphabetically, so this is consistent with how all other recent second-class chains (Monad, Plasma, Katana, Unichain, etc.) are positioned.

Also applies to: 324-324

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.env at line 167, The dotenv-linter complaint is about key ordering for
VITE_BOB_NODE_URL and VITE_FEATURE_BOB; to match project convention (append new
chains to the end of each section), move VITE_BOB_NODE_URL and VITE_FEATURE_BOB
out of their current alphabetical positions and place each at the end of their
respective environment-variable sections so they follow the positioning of other
second-class chains (e.g., Monad, Plasma, Katana, Unichain).
src/plugins/bob/index.tsx (1)

25-35: fromAssetId is called twice per asset — once in .filter() and again in .map().

♻️ Optional: destructure all needed fields in a single `.reduce()` pass
-  return assetService.assets
-    .filter(asset => {
-      const { chainId, assetNamespace } = fromAssetId(asset.assetId)
-      return chainId === bobChainId && 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<ReturnType<typeof getKnownTokens>>(
+    (acc, asset) => {
+      const { chainId, assetNamespace, assetReference } = fromAssetId(asset.assetId)
+      if (chainId !== bobChainId || assetNamespace !== 'erc20') return acc
+      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/bob/index.tsx` around lines 25 - 35, The code calls
fromAssetId(asset.assetId) twice per item (once in the .filter and again in the
.map) which is wasteful; change the pipeline to call fromAssetId once and reuse
its result—e.g., replace the current .filter/.map chain with a single .reduce or
map-after-filter that first extracts const { chainId, assetNamespace,
assetReference } = fromAssetId(asset.assetId) and then checks chainId ===
bobChainId && assetNamespace === 'erc20' before returning the mapped object
(using assetReference for contractAddress); ensure references to fromAssetId,
bobChainId, and assetReference are updated accordingly so parsing occurs only
once per asset.
src/lib/utils/bob.ts (2)

20-22: Consider a module-level provider to avoid connection overhead on each poll cycle.

A new JsonRpcProvider is instantiated on every call. Since getBobTransactionStatus is likely called repeatedly in a polling loop, a module-level (or memoized) provider keyed on nodeUrl would avoid redundant HTTP connection setup. The codebase already has a singleton provider pattern (packages/contracts/src/ethersProviderSingleton.ts) that could serve as a reference.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/lib/utils/bob.ts` around lines 20 - 22, The function
getBobTransactionStatus currently creates a new JsonRpcProvider for each
invocation (const provider = new JsonRpcProvider(nodeUrl...)), causing
connection overhead; refactor to use a module-level or memoized provider keyed
by nodeUrl (or reuse the existing ethersProviderSingleton pattern) so repeated
calls reuse the same provider instance instead of instantiating one per poll
cycle; replace the local provider creation in getBobTransactionStatus with a
lookup/get-or-create call to the shared provider store and ensure the options
(staticNetwork: true) are applied when creating the cached instance.

39-41: Use structured logger instead of console.error.

console.error violates the project's logging guideline. As per coding guidelines (ALWAYS log errors for debugging using structured logging with relevant context and error metadata).

♻️ Proposed fix
+import { logger } from 'lib/logger'
+
+const moduleLogger = logger.child({ namespace: ['lib', 'utils', 'bob'] })
+
 } catch (error) {
-    console.error('[BOB] Error getting transaction status:', error)
+    moduleLogger.error(error, '[BOB] Error getting transaction status')
     return TxStatus.Unknown
 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/lib/utils/bob.ts` around lines 39 - 41, Replace the console.error call in
the catch block that currently logs "[BOB] Error getting transaction status:"
and returns TxStatus.Unknown with the project's structured logger; capture and
pass the error object and additional context to the logger (e.g., logger.error
or processLogger.error) so the message, error metadata, and any relevant
transaction identifiers are included, then return TxStatus.Unknown as before.
Locate the catch in src/lib/utils/bob.ts where the string "[BOB] Error getting
transaction status:" is emitted and update it to use the structured logger API
consistent with other modules.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@packages/caip/src/constants.ts`:
- Around line 293-326: FEE_ASSET_IDS is missing bobAssetId (and other
second-class EVM assets like hyperEvmAssetId, plasmaAssetId, katanaAssetId)
which can cause native gas detection to fail; update the exported FEE_ASSET_IDS
array in constants.ts to include bobAssetId (and add the other missing asset id
constants if intended) so that native fee handling covers BOB chains—locate the
FEE_ASSET_IDS declaration and append bobAssetId to the list alongside the other
second-class EVM asset id symbols.

---

Nitpick comments:
In @.env:
- Line 167: The dotenv-linter complaint is about key ordering for
VITE_BOB_NODE_URL and VITE_FEATURE_BOB; to match project convention (append new
chains to the end of each section), move VITE_BOB_NODE_URL and VITE_FEATURE_BOB
out of their current alphabetical positions and place each at the end of their
respective environment-variable sections so they follow the positioning of other
second-class chains (e.g., Monad, Plasma, Katana, Unichain).

In @.env.development:
- Line 66: Reorder the environment keys to satisfy dotenv-linter's UnorderedKey
rule by moving VITE_BOB_NODE_URL and VITE_FEATURE_BOB into their alphabetical
positions among the other VITE_ variables (or adjust the linter config if
grouping is intentional); locate the entries for VITE_BOB_NODE_URL and
VITE_FEATURE_BOB and place them where they belong alphabetically with the rest
of the VITE_ keys so CI no longer reports UnorderedKey warnings.

In `@src/lib/utils/bob.ts`:
- Around line 20-22: The function getBobTransactionStatus currently creates a
new JsonRpcProvider for each invocation (const provider = new
JsonRpcProvider(nodeUrl...)), causing connection overhead; refactor to use a
module-level or memoized provider keyed by nodeUrl (or reuse the existing
ethersProviderSingleton pattern) so repeated calls reuse the same provider
instance instead of instantiating one per poll cycle; replace the local provider
creation in getBobTransactionStatus with a lookup/get-or-create call to the
shared provider store and ensure the options (staticNetwork: true) are applied
when creating the cached instance.
- Around line 39-41: Replace the console.error call in the catch block that
currently logs "[BOB] Error getting transaction status:" and returns
TxStatus.Unknown with the project's structured logger; capture and pass the
error object and additional context to the logger (e.g., logger.error or
processLogger.error) so the message, error metadata, and any relevant
transaction identifiers are included, then return TxStatus.Unknown as before.
Locate the catch in src/lib/utils/bob.ts where the string "[BOB] Error getting
transaction status:" is emitted and update it to use the structured logger API
consistent with other modules.

In `@src/plugins/bob/index.tsx`:
- Around line 25-35: The code calls fromAssetId(asset.assetId) twice per item
(once in the .filter and again in the .map) which is wasteful; change the
pipeline to call fromAssetId once and reuse its result—e.g., replace the current
.filter/.map chain with a single .reduce or map-after-filter that first extracts
const { chainId, assetNamespace, assetReference } = fromAssetId(asset.assetId)
and then checks chainId === bobChainId && assetNamespace === 'erc20' before
returning the mapped object (using assetReference for contractAddress); ensure
references to fromAssetId, bobChainId, and assetReference are updated
accordingly so parsing occurs only once per asset.

Copy link
Contributor

@gomesalexandre gomesalexandre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm - all CI green, contract review done.

prior testing confirmed on BOB (native ETH balance, relay bridge quotes, chain selector). will re-verify on Soneium as final chain in the pipeline.

merge conflicts with develop (cronos+sonic+unichain) resolved cleanly - migration 298 added, related asset index updated with bobAssetId in ethAssetId group, market service test counts bumped (flatten=11, rate limited=10).

@gomesalexandre gomesalexandre merged commit 9fe414d into develop Feb 21, 2026
6 checks passed
@gomesalexandre gomesalexandre deleted the feat/integrate-bob-relay branch February 21, 2026 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants