Skip to content

feat: integrate Plume (98866) as second-class Relay chain#11937

Merged
gomesalexandre merged 11 commits intodevelopfrom
feat/integrate-plume-relay
Feb 22, 2026
Merged

feat: integrate Plume (98866) as second-class Relay chain#11937
gomesalexandre merged 11 commits intodevelopfrom
feat/integrate-plume-relay

Conversation

@NeOMakinG
Copy link
Collaborator

@NeOMakinG NeOMakinG commented Feb 18, 2026

Description

Add support for Plume (EVM chain, chainId 98866) as a second-class citizen. Plume is an EVM-compatible blockchain focused on real-world assets (RWA), with PLUME as its native token.

This is PR 13 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)
  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) ← this PR
  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.

Implements: CAIP constants, chain adapter (SecondClassEvmAdapter), plugin, feature flag, Relay swapper mapping, HDWallet support flags, CSP headers, asset generation script, viem/ethers client configuration, CoinGecko price feed integration, Zerion portfolio tracking, and all required shared-file entries.

Issue (if applicable)

Part of #11902

Risk

Low - All changes are behind the Plume feature flag (VITE_FEATURE_PLUME), disabled by default in production.

No new on-chain transactions or contract interactions. Standard EVM chain support using existing SecondClassEvmAdapter pattern.

No protocols, transaction types, wallets or contract interactions are affected until the feature flag is enabled.

Testing

Engineering

  1. Set VITE_FEATURE_PLUME=true in .env.development
  2. Run yarn dev
  3. Verify Plume appears in chain selector
  4. Verify native PLUME token balance loads
  5. Verify Relay swap routes include Plume
  6. Run yarn lint — passes with 0 errors
  7. Run yarn type-check — verify no new type errors

Operations

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

Screenshots (if applicable)

N/A - Behind feature flag, no visual changes until enabled.

Summary by CodeRabbit

  • New Features
    • Added support for Plume network as a blockchain option.
    • Enabled trading and management of Plume assets.
    • Added wallet support for Plume across most integrated wallets.
    • Integrated Plume explorer and asset data from market sources.
    • Plume network is currently disabled by default and can be enabled via feature flag.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 18, 2026

No actionable comments were generated in the recent review. 🎉


📝 Walkthrough

Walkthrough

This PR adds comprehensive support for the Plume EVM chain across the application. Changes include environment variables, CAIP chain identifiers, EVM chain adapters, viem/ethers RPC clients, HD wallet capability flags, asset definitions, CoinGecko integration, feature flagging infrastructure, and a Plume plugin registration.

Changes

Cohort / File(s) Summary
Environment & Config
.env, .env.development, src/vite-env.d.ts, src/config.ts
Added VITE_PLUME_NODE_URL and VITE_FEATURE_PLUME environment variables with validators and type declarations.
CAIP Chain & Asset Constants
packages/caip/src/constants.ts, packages/types/src/base.ts
Introduced PlumeMainnet (chain ID 98866) to KnownChainIds enum, CHAIN_REFERENCE, ASSET_REFERENCE, VALID_CHAIN_IDS, and FEE_ASSET_IDS with corresponding plumeAssetId and plumeChainId exports.
CoinGecko Adapter
packages/caip/src/adapters/coingecko/index.ts, packages/caip/src/adapters/coingecko/utils.ts, packages/caip/src/adapters/coingecko/utils.test.ts
Added Plume ('plume-network') to CoingeckoAssetPlatform enum with bidirectional chain-to-platform mappings and EIP-155 chain data parsing for Plume assets.
EVM Chain Adapter
packages/chain-adapters/src/evm/plume/PlumeChainAdapter.ts, packages/chain-adapters/src/evm/plume/index.ts, packages/chain-adapters/src/evm/EvmBaseAdapter.ts, packages/chain-adapters/src/evm/index.ts, packages/chain-adapters/src/types.ts
Implemented PlumeChainAdapter extending SecondClassEvmAdapter with root BIP44 params, type guards, and chain-specific account/fee/signature mappings. Extended EvmBaseAdapter to recognize PlumeMainnet.
RPC & Contract Clients
packages/contracts/src/ethersProviderSingleton.ts, packages/contracts/src/viemClient.ts
Added viemPlumeClient and RPC URL mapping for PlumeMainnet using VITE_PLUME_NODE_URL; registered in network ID and chain ID lookup tables.
HD Wallet Capability Flags
packages/hdwallet-*/src/*, packages/hdwallet-core/src/ethereum.ts, packages/hdwallet-core/src/wallet.ts
Added readonly _supportsPlume flags to all HD wallet implementations (Ledger/Trezor/MetaMask/Native: true; others: false) with type guard supportsPlume() in core wallet interface.
Utility Functions
packages/utils/src/{assetData,chainIdToFeeAssetId,getAssetNamespaceFromChainId,getChainShortName,getNativeFeeAssetReference}.ts
Extended utility functions to handle PlumeMainnet with asset ID resolution, fee asset mapping (PLUME), ERC20 namespace classification, and chain short name ('PLUME').
Swapper Integration
packages/swapper/src/swappers/RelaySwapper/{constant,utils}.ts
Added plumeChainId-to-plumeMainnet.id mapping in Relay chain support and native asset handling for Plume in token-to-assetId conversion.
Asset Definitions
packages/utils/src/assetData/baseAssets.ts, packages/utils/src/assetData/getBaseAsset.ts
Added plume asset export with metadata (18 decimals, icon, explorer links) and integrated into getBaseAsset() switch for chainId resolution.
Asset Generation Scripts
scripts/generateAssetData/{coingecko,generateAssetData,plume/index}.ts
Implemented new getAssets() function for Plume that fetches ERC20 assets from CoinGecko and merges with base plume asset; integrated into asset generation pipeline.
CSP Headers
headers/csps/chains/plume.ts, headers/csps/index.ts
Created plume CSP module exporting csp object with connect-src directive sourced from VITE_PLUME_NODE_URL; registered in headers CSP index.
Feature Flags & State
src/constants/chains.ts, src/state/slices/preferencesSlice/preferencesSlice.ts, src/state/slices/opportunitiesSlice/mappings.ts, src/test/mocks/store.ts
Added PlumeMainnet to SECOND_CLASS_CHAINS and Plume feature flag to Redux preferences state with default false; integrated opportunity mappings and mock store.
Component & Hook Integration
src/components/TradeAssetSearch/hooks/useGetPopularAssetsQuery.tsx, src/hooks/useWalletSupportsChain/useWalletSupportsChain.ts, src/lib/{account,coingecko,asset-service}/*.ts, src/context/PluginProvider/PluginProvider.tsx, src/pages/Markets/components/MarketsRow.tsx
Extended feature flag checks and wallet support guards for Plume; integrated plumeChainId into popular asset queries, EVM account derivation, CoinGecko chain support, asset filtering, and market row chain visibility logic.
Plugin Registration
src/plugins/plume/index.tsx, src/plugins/activePlugins.ts
Registered new Plume plugin that instantiates PlumeChainAdapter with rpcUrl and dynamically builds getKnownTokens from filtered ERC20 assets; added to active plugins array.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

Suggested labels

high risk

Poem

🐰 A flutter of whiskers, a tap of hind feet,
Plume joins the warren—now chains are complete!
From CAIP to viem, through wallets we hop,
Feature flags guiding where support will stop. 🪶✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 16.67% 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 PR title 'feat: integrate Plume (98866) as second-class Relay chain' clearly and specifically describes the main change: adding Plume support as a second-class Relay chain with its chain ID.

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

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/integrate-plume-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.

gomesalexandre and others added 7 commits February 22, 2026 22:35
Resolve merge artifacts while preserving second-class evm invariants, restore strict develop-owned files, and wire plume across adapters, wallet support, relay, and coingecko mappings.

Regenerate plume chain assets and related indexes, then align test expectations with the new chain coverage.

Co-Authored-By: Claude <noreply@anthropic.com>
…me-relay

# Conflicts:
#	.claude/contracts/second-class-evm-chain.md
#	.env
#	.env.development
#	headers/csps/index.ts
#	packages/caip/src/adapters/coingecko/generated/index.ts
#	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/evm/mantle/MantleChainAdapter.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/AcrossSwapper/constant.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/migrations/index.ts
#	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 22, 2026 22:59
@gomesalexandre gomesalexandre requested a review from a team as a code owner February 22, 2026 22:59
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.

You know the drill - diff looking good, will test this and Story in a few PRs!

@gomesalexandre gomesalexandre enabled auto-merge (squash) February 22, 2026 23:02
@gomesalexandre gomesalexandre merged commit 8ac5258 into develop Feb 22, 2026
6 checks passed
@gomesalexandre gomesalexandre deleted the feat/integrate-plume-relay branch February 22, 2026 23:10
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