Skip to content

Conversation

@gomesalexandre
Copy link
Contributor

Description

Web fren of shapeshift/hdwallet#778

TODO: switch to MegaETH mainnet and test me

Issue (if applicable)

N/A

Risk

High Risk PRs Require 2 approvals

TODO

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

TODO

Testing

Engineering

TODO

Operations

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

TODO

Screenshots (if applicable)

TODO

Integrates MegaETH as a second-class citizen chain following the established pattern.

**Packages:**
- Add MegaETH chain/asset constants and references to @shapeshiftoss/caip
- Add MegaEthMainnet to KnownChainIds enum in @shapeshiftoss/types
- Create MegaETH chain adapter extending SecondClassEvmAdapter
- Add MegaETH to evmChainIds, ChainSpecific types, and base utilities
- Add megaethAssetId to FEE_ASSET_IDS array
- Define viem client for MegaETH (chain ID 4326)

**Application:**
- Create MegaETH plugin with chain adapter registration
- Add MegaEth feature flag to preferences slice
- Add VITE_MEGAETH_NODE_URL and VITE_FEATURE_MEGAETH to config
- Add MegaETH CSP headers for RPC endpoint
- Add MegaETH to AssetService feature flag filter
- Add MegaETH support to wallet compatibility hooks
- Add MegaETH to portfolioSlice utilities (accountIdToLabel, isAssetSupportedByWallet)

**Dependencies:**
- Upgrade viem from 2.40.3 to 2.43.5

**Notes:**
- Currently targeting testnet (Chain ID 4326 - Frontier)
- TODO markers added for mainnet migration when whitelisted
- Type errors for supportsMegaEth expected until hdwallet-core published
Update all @shapeshiftoss/hdwallet-* packages to 1.62.35-megaeth.0 from local verdaccio registry.
Add VITE_MEGAETH_NODE_URL and VITE_FEATURE_MEGAETH to:
- .env (feature flag disabled by default)
- .env.development (feature flag enabled for dev)
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 3, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat_megaEth

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 4 commits January 3, 2026 13:03
Add explicit formatting rules from ESLint/Prettier config to avoid future lint diffs:
- Single quotes, no semicolons
- 100 char line width, trailing commas
- Arrow function parens rules
- Named exports only (except stories/test mocks)
- Type import preferences
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.

3 participants