feat: toggle plasma on
Description
You know the deal.
Issue (if applicable)
closes N/A
Risk
High Risk PRs Require 2 approvals
What protocols, transaction types, wallets or contract interactions might be affected by this PR?
Same old as new second-class chain toggling
Testing
- Smoke test Plasma
Engineering
- ^
Operations
- [ ] :checkered_flag: My feature is behind a flag and doesn't require operations testing (yet)
- ^
Screenshots (if applicable)
https://jam.dev/c/7f08db8b-9229-4e01-9237-ef0f9581dc08
Summary by CodeRabbit
Release Notes
-
Chores
- Updated PLASMA feature flag configuration across environments: enabled in production while removed from development environment setup.
βοΈ Tip: You can customize this high-level summary in your review settings.
π Walkthrough
Walkthrough
The pull request modifies environment feature flags across two configuration files: enabling the PLASMA feature in the production environment (.env) by changing VITE_FEATURE_PLASMA from false to true, and removing the explicit PLASMA flag from the development environment (.env.development).
Changes
| Cohort / File(s) | Summary |
|---|---|
Environment configuration\.env, \.env\.development |
Modified feature flag VITE_FEATURE_PLASMA: enabled in production environment; removed explicit definition from development environment |
Estimated code review effort
π― 1 (Trivial) | β±οΈ ~2 minutes
- Straightforward environment variable flag toggling with no logic changes or functional impact
Possibly related PRs
-
shapeshift/web#11349: Introduces the
VITE_FEATURE_PLASMAflag initially set to false; this PR enables the feature in production and adjusts its presence across environments.
Suggested reviewers
- 0xApotheosis
- NeOMakinG
Poem
π° A flag flips in the darkness of night,
PLASMA ignites, burning oh-so-bright!
In production it gleams, dev steps aside,
Features unleashed with feature-flag pride! β¨
Pre-merge checks and finishing touches
β Passed checks (3 passed)
| Check name | Status | Explanation |
|---|---|---|
| Description Check | β Passed | Check skipped - CodeRabbitβs high-level summary is enabled. |
| Title check | β Passed | The title 'feat: toggle plasma on' directly matches the main change: enabling the PLASMA feature flag in .env from false to true. |
| Docstring Coverage | β Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. |
β¨ Finishing touches
- [ ] π Generate docstrings
π§ͺ Generate unit tests (beta)
- [ ] Create PR with unit tests
- [ ] Post copyable unit tests in a comment
- [ ] Commit unit tests in branch
feat_plasma_on
π Recent review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
π₯ Commits
Reviewing files that changed from the base of the PR and between a0648c130d43c68771f40dea552d55b7968581f2 and 5fd35428b0363b7c5e9e5c0132bedcf378850e78.
π Files selected for processing (2)
-
.env(1 hunks) -
.env.development(0 hunks)
π€ Files with no reviewable changes (1)
- .env.development
π§° Additional context used
π§ Learnings (4)
π Common learnings
Learnt from: gomesalexandre
Repo: shapeshift/web PR: 10418
File: src/plugins/walletConnectToDapps/components/header/WalletConnectToDappsHeaderButton.tsx:0-0
Timestamp: 2025-09-08T22:00:48.005Z
Learning: gomesalexandre dismissed an aria-label accessibility suggestion with "meh" in PR #10418 for WalletConnectToDappsHeaderButton.tsx, consistent with the team's pattern of deferring minor a11y improvements to follow-up PRs rather than expanding feature PR scope.
Learnt from: gomesalexandre
Repo: shapeshift/web PR: 10569
File: src/plugins/walletConnectToDapps/components/WalletConnectSigningModal/WalletConnectModalSigningFooter.tsx:121-129
Timestamp: 2025-09-17T22:40:30.149Z
Learning: gomesalexandre maintains strict scope discipline even for style/UI PRs in shapeshift/web, declining functionally correct UX improvements (like keeping Cancel button enabled during gas simulation loading) when they fall outside the PR's stated styling objectives, demonstrating his consistent pattern of deferring valid but tangential improvements to separate efforts.
Learnt from: NeOMakinG
Repo: shapeshift/web PR: 10231
File: src/components/AssetSearch/components/AssetList.tsx:2-2
Timestamp: 2025-08-08T15:00:49.887Z
Learning: Project shapeshift/web: NeOMakinG prefers avoiding minor a11y/UI nitpicks (e.g., adding aria-hidden to decorative icons in empty states like src/components/AssetSearch/components/AssetList.tsx) within feature PRs; defer such suggestions to a follow-up instead of blocking the PR.
Learnt from: gomesalexandre
Repo: shapeshift/web PR: 10458
File: src/plugins/walletConnectToDapps/components/modals/EIP155SignTypedDataConfirmation.tsx:69-74
Timestamp: 2025-09-10T15:35:36.547Z
Learning: gomesalexandre dismissed alt text accessibility suggestion with "meh" in PR #10458 for EIP155SignTypedDataConfirmation.tsx Image component, consistent with team pattern of deferring minor a11y improvements to follow-up PRs rather than expanding feature PR scope.
Learnt from: gomesalexandre
Repo: shapeshift/web PR: 11170
File: patches/@shapeshiftoss+bitcoinjs-lib+7.0.0-shapeshift.0.patch:9-19
Timestamp: 2025-11-25T21:43:10.838Z
Learning: In shapeshift/web, gomesalexandre will not expand PR scope to fix latent bugs in unused API surface (like bitcoinjs-lib patch validation methods) when comprehensive testing proves the actual used code paths work correctly, preferring to avoid costly hdwallet/web verdaccio publish cycles and full regression testing for conceptual issues with zero runtime impact.
Learnt from: CR
Repo: shapeshift/web PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T21:20:04.979Z
Learning: Applies to src/config.ts : Default values always come from environment variables prefixed with `VITE_FEATURE_`
Learnt from: CR
Repo: shapeshift/web PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T21:20:04.979Z
Learning: To add a new feature flag: (1) Add to `FeatureFlags` type in `src/state/slices/preferencesSlice/preferencesSlice.ts`, (2) Add environment variable validation in `src/config.ts`, (3) Add to initial state in `preferencesSlice.ts`, (4) Add to test mock in `src/test/mocks/store.ts`, (5) Set appropriate values in `.env`, `.env.development`, and `.env.production`
Learnt from: CR
Repo: shapeshift/web PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T21:20:04.979Z
Learning: Applies to {.env.development,.env.production} : Use `.env.development` for dev-only features and `.env.production` for prod settings
Learnt from: gomesalexandre
Repo: shapeshift/web PR: 11275
File: headers/csps/chains/plasma.ts:1-10
Timestamp: 2025-12-03T23:19:39.158Z
Learning: For CSP files in headers/csps/chains/, gomesalexandre prefers using Vite's loadEnv() pattern directly to load environment variables (e.g., VITE_PLASMA_NODE_URL, VITE_MONAD_NODE_URL) for consistency with existing second-class chain CSP files, rather than using getConfig() from src/config.ts, even though other parts of the codebase use validated config values.
Learnt from: gomesalexandre
Repo: shapeshift/web PR: 10503
File: .env:56-56
Timestamp: 2025-09-16T13:17:02.938Z
Learning: gomesalexandre prefers to enable feature flags globally in the base .env file when the intent is to activate features everywhere, even when there are known issues like crashes, demonstrating his preference for intentional global feature rollouts over cautious per-environment enablement.
Learnt from: gomesalexandre
Repo: shapeshift/web PR: 10206
File: src/config.ts:127-128
Timestamp: 2025-08-07T11:20:44.614Z
Learning: gomesalexandre prefers required environment variables without default values in the config file (src/config.ts). They want explicit configuration and fail-fast behavior when environment variables are missing, rather than having fallback defaults.
Learnt from: gomesalexandre
Repo: shapeshift/web PR: 10461
File: src/plugins/walletConnectToDapps/components/modals/ContractInteractionBreakdown.tsx:0-0
Timestamp: 2025-09-13T16:45:18.813Z
Learning: gomesalexandre prefers aggressively deleting unused/obsolete code files ("ramboing") rather than fixing technical issues in code that won't be used, demonstrating his preference for keeping codebases clean and PR scope focused.
Learnt from: gomesalexandre
Repo: shapeshift/web PR: 10458
File: src/plugins/walletConnectToDapps/types.ts:7-7
Timestamp: 2025-09-10T15:34:29.604Z
Learning: gomesalexandre is comfortable relying on transitive dependencies (like abitype through ethers/viem) rather than explicitly declaring them in package.json, preferring to avoid package.json bloat when the transitive dependency approach works reliably in practice.
Learnt from: gomesalexandre
Repo: shapeshift/web PR: 10249
File: src/pages/ThorChainLP/components/ReusableLpStatus/TransactionRow.tsx:447-503
Timestamp: 2025-08-13T17:07:10.763Z
Learning: gomesalexandre prefers relying on TypeScript's type system for validation rather than adding defensive runtime null checks when types are properly defined. They favor a TypeScript-first approach over defensive programming with runtime validations.
Learnt from: gomesalexandre
Repo: shapeshift/web PR: 10276
File: src/hooks/useActionCenterSubscribers/useThorchainLpDepositActionSubscriber.tsx:61-66
Timestamp: 2025-08-14T17:51:47.556Z
Learning: gomesalexandre is not concerned about structured logging and prefers to keep console.error usage as-is rather than implementing structured logging patterns, even when project guidelines suggest otherwise.
Learnt from: gomesalexandre
Repo: shapeshift/web PR: 10413
File: src/components/Modals/FiatRamps/fiatRampProviders/onramper/utils.ts:29-55
Timestamp: 2025-09-02T14:26:19.028Z
Learning: gomesalexandre prefers to keep preparatory/reference code simple until it's actively consumed, rather than implementing comprehensive error handling, validation, and robustness improvements upfront. They prefer to add these improvements when the code is actually being used in production.
Learnt from: gomesalexandre
Repo: shapeshift/web PR: 10276
File: src/pages/ThorChainLP/components/ReusableLpStatus/TransactionRow.tsx:396-402
Timestamp: 2025-08-14T17:55:57.490Z
Learning: gomesalexandre is comfortable with functions/variables that return undefined or true (tri-state) when only the truthy case matters, preferring to rely on JavaScript's truthy/falsy behavior rather than explicitly returning boolean values.
Learnt from: gomesalexandre
Repo: shapeshift/web PR: 10783
File: src/context/ModalStackProvider/useModalRegistration.ts:30-41
Timestamp: 2025-10-16T11:14:40.657Z
Learning: gomesalexandre prefers to add lint rules (like typescript-eslint/strict-boolean-expressions for truthiness checks on numbers) to catch common issues project-wide rather than relying on code review to catch them.
Learnt from: gomesalexandre
Repo: shapeshift/web PR: 10206
File: src/lib/moralis.ts:47-85
Timestamp: 2025-08-07T11:22:16.983Z
Learning: gomesalexandre prefers console.error over structured logging for Moralis API integration debugging, as they find it more conventional and prefer to examine XHR requests directly rather than rely on structured logs for troubleshooting.
π Learning: 2025-11-24T21:20:04.979Z
Learnt from: CR
Repo: shapeshift/web PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T21:20:04.979Z
Learning: Applies to src/config.ts : Default values always come from environment variables prefixed with `VITE_FEATURE_`
Applied to files:
-
.env
π Learning: 2025-11-24T21:20:04.979Z
Learnt from: CR
Repo: shapeshift/web PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T21:20:04.979Z
Learning: To add a new feature flag: (1) Add to `FeatureFlags` type in `src/state/slices/preferencesSlice/preferencesSlice.ts`, (2) Add environment variable validation in `src/config.ts`, (3) Add to initial state in `preferencesSlice.ts`, (4) Add to test mock in `src/test/mocks/store.ts`, (5) Set appropriate values in `.env`, `.env.development`, and `.env.production`
Applied to files:
-
.env
π Learning: 2025-12-03T23:19:39.158Z
Learnt from: gomesalexandre
Repo: shapeshift/web PR: 11275
File: headers/csps/chains/plasma.ts:1-10
Timestamp: 2025-12-03T23:19:39.158Z
Learning: For CSP files in headers/csps/chains/, gomesalexandre prefers using Vite's loadEnv() pattern directly to load environment variables (e.g., VITE_PLASMA_NODE_URL, VITE_MONAD_NODE_URL) for consistency with existing second-class chain CSP files, rather than using getConfig() from src/config.ts, even though other parts of the codebase use validated config values.
Applied to files:
-
.env
πͺ dotenv-linter (4.0.0)
.env
[warning] 297-297: [UnorderedKey] The VITE_FEATURE_PLASMA key should go before the VITE_FEATURE_SUNIO_SWAP key
(UnorderedKey)
β° Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Call / Static
π Additional comments (1)
.env (1)
295-297: Reorder feature flag for alphabetical consistency.Plasma is a specialized blockchain designed explicitly as a Bitcoin sidechain focused on optimizing stablecoin transactions, particularly USDT. The feature flag enablement is correct, but the placement violates the file's alphabetical ordering. Line 297 should be repositioned before line 295 (VITE_FEATURE_SUNIO_SWAP) since PLASMA (P) comes before SUNIO_SWAP (S) alphabetically.
π Proposed reordering
VITE_FEATURE_SUNIO_SWAP=false +VITE_FEATURE_PLASMA=true VITE_FEATURE_MONAD=true -VITE_FEATURE_PLASMA=true VITE_HYPEREVM_NODE_URL=https://rpc.hyperliquid.xyz/evm VITE_FEATURE_HYPEREVM=falseβ Skipped due to learnings
Learnt from: CR Repo: shapeshift/web PR: 0 File: CLAUDE.md:0-0 Timestamp: 2025-11-24T21:20:04.979Z Learning: To add a new feature flag: (1) Add to `FeatureFlags` type in `src/state/slices/preferencesSlice/preferencesSlice.ts`, (2) Add environment variable validation in `src/config.ts`, (3) Add to initial state in `preferencesSlice.ts`, (4) Add to test mock in `src/test/mocks/store.ts`, (5) Set appropriate values in `.env`, `.env.development`, and `.env.production`Learnt from: gomesalexandre Repo: shapeshift/web PR: 11275 File: headers/csps/chains/plasma.ts:1-10 Timestamp: 2025-12-03T23:19:39.158Z Learning: For CSP files in headers/csps/chains/, gomesalexandre prefers using Vite's loadEnv() pattern directly to load environment variables (e.g., VITE_PLASMA_NODE_URL, VITE_MONAD_NODE_URL) for consistency with existing second-class chain CSP files, rather than using getConfig() from src/config.ts, even though other parts of the codebase use validated config values.Learnt from: CR Repo: shapeshift/web PR: 0 File: CLAUDE.md:0-0 Timestamp: 2025-11-24T21:20:04.979Z Learning: Applies to src/config.ts : Default values always come from environment variables prefixed with `VITE_FEATURE_`Learnt from: gomesalexandre Repo: shapeshift/web PR: 11016 File: .env:38-38 Timestamp: 2025-11-12T09:00:20.961Z Learning: In the shapeshift/web repository, alphabetical ordering of environment variables in .env files is not enforced or required, despite dotenv-linter warnings suggesting otherwise.
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 @coderabbitai help to get the list of available commands and usage tips.
β Plasma Chain Integration Testing - PASSED
Comprehensive end-to-end testing completed on feat_plasma_on branch with full transaction signing on Plasma chain (Chain ID: eip155:9745).
π― Test Scope
Tested Swaps:
- β XPL β SUSDE (Native token to ERC-20)
- β SUSDE β XPL (ERC-20 to Native token with approval)
Verification Points:
- β Chain visibility in asset selector
- β Balance displays (XPL and SUSDE on Plasma)
- β Quote generation via Relay
- β Transaction signing and execution
- β Token approval flow (for ERC-20)
- β Balance updates after swaps
- β Action center transaction parsing
- β Plasmascan.to explorer integration
π Test Results
Swap 1: XPL β SUSDE
- Amount: 1 XPL β 0.110571 SUSDE
- Gas Fee: <$0.000001 (0.00000007 XPL)
- Exchange Rate: 1 XPL = 0.11057076 SUSDE
- Execution Time: ~1s
- Status: β COMPLETE
Balance Changes:
- XPL:
29.38032996β28.3803299β (-1.00000006 XPL) - SUSDE:
0.18260583β0.29317659β (+0.11057076 SUSDE)
Swap 2: SUSDE β XPL (Reverse)
- Amount: 0.1 SUSDE β 0.893228 XPL
- Approval Fee: <$0.000001 (0.00000001 XPL)
- Gas Fee: <$0.000001 (0.00000008 XPL)
- Exchange Rate: 1 SUSDE = 8.93227511 XPL
- Execution Time: ~1s (+ approval time)
- Status: β COMPLETE
Balance Changes:
- SUSDE:
0.29317659β0.19317659β (-0.1 SUSDE) - XPL:
28.3803299β29.27355734β (+0.89322744 XPL)
π Key Observations
β Strengths:
- Extremely low gas fees on Plasma (<$0.000001 for all transactions)
- Fast execution (~1s for swaps)
- Proper Plasma chain identification with double avatar icons
- Plasmascan.to integration working (explorer links functional)
- Action center correctly displays Plasma transactions with "Confirmed" status
- ERC-20 approval flow works smoothly (unlimited/exact options)
- Balances update accurately and immediately after swaps
βΉοΈ Expected Behaviors:
- Portals API doesn't support Plasma (chain
eip155:9745) - expected, non-blocking - 13 swappers unavailable for Plasma - expected for new chain
β οΈ Minor Issues:
- Console errors about nested
<p>tags (non-blocking UI hydration warnings) - Query data warnings (non-blocking)
πΈ Screenshots
15 screenshots captured documenting:
- XPL asset selection on Plasma
- SUSDE asset selection on Plasma
- Quote generation (XPL β SUSDE)
- Trade confirmation screen
- Transaction processing
- Completed swap notification
- Action center transaction details
- Reverse swap setup (SUSDE β XPL)
- Token approval screen
- Final balance verification
All screenshots saved to .playwright-mcp/ directory.
ποΈ Technical Details
Chain Configuration:
- Chain ID:
eip155:9745 - Chain Name: Plasma
- Explorer: https://plasmascan.to
- Swapper: Relay (via ShapeShift)
Account:
- Address:
0x94a4...3241Fd - Derivation: Working correctly for Plasma
Transaction Parsing:
- Both swaps appear in action center
- Timestamp: "a few seconds ago"
- Status badge: "Confirmed" β
- Chain icons displaying correctly
β Conclusion
Plasma chain integration is production-ready. All critical functionality tested and verified:
- Asset discovery β
- Quote generation β
- Transaction signing β
- Balance updates β
- Action center integration β
- Explorer links β
Both native token (XPL) and ERC-20 token (SUSDE) swaps work flawlessly with proper approval flows. Gas fees are negligible and execution is fast.
Recommendation: β APPROVED FOR MERGE
π€ Generated via automated browser testing with Playwright MCP
E2E bot?!?! LFG