-
Notifications
You must be signed in to change notification settings - Fork 29
feat(new-chains): add q4 chains #606
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
Conversation
|
@coderabbitai review |
WalkthroughAdds Linea (59144) and Plasma (9745) network data across config, token, bridge contract maps, tests, and docs — new ChainInfo files, enum entries, RPC/wrapped-token mappings, order-book/subgraph entries, and placeholder contract addresses; marked under development. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro ⛔ Files ignored due to path filters (3)
📒 Files selected for processing (15)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (13)
🧰 Additional context used🧠 Learnings (1)📚 Learning: 2025-08-12T09:15:28.459ZApplied to files:
⏰ 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). (3)
🔇 Additional comments (2)
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 |
✅ Actions performedReview triggered.
|
📦 GitHub Packages PublishedLast updated: Nov 5, 2025, 03:24:40 PM UTC The following packages have been published to GitHub Packages with pre-release version
InstallationThese packages require authentication to install from GitHub Packages. First, create a # Create .npmrc file in your project root
echo "@cowprotocol:registry=https://npm.pkg.github.com" > .npmrc
echo "//npm.pkg.github.com/:_authToken=YOUR_GITHUB_TOKEN" >> .npmrcTo get your GitHub token:
Then install any of the packages above, either by exact version (i.e. # Yarn
yarn add npm:@cowprotocol/cow-sdk@pr-606
# pnpm
pnpm install npm:@cowprotocol/cow-sdk@pr-606
# NPM
npm install npm:@cowprotocol/cow-sdk@pr-606Update to the latest version (only if you used the tag)Every commit will publish a new package. To upgrade to the latest version, run: # Yarn
yarn upgrade @cowprotocol/cow-sdk
# pnpm
pnpm update @cowprotocol/cow-sdk
# NPM
npm update @cowprotocol/cow-sdkView PackagesYou can view the published packages at: https://github.com/cowprotocol/cow-sdk/packages |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 5
🧹 Nitpick comments (3)
packages/config/src/chains/types.ts (1)
160-166: New ChainInfo.isUnderDevelopment flag: surface guardrailsNice addition. Suggest:
- Expose a small helper (e.g., isChainUnderDevelopment) and use it in consumers that list selectable networks to prevent premature exposure.
- Consider documenting intended rollout behavior (e.g., hide in UI but enable programmatic access).
packages/subgraph/src/api.ts (1)
110-112: Strengthen unsupported-network guard and use CowErrorBroaden the check to catch undefined/empty base URLs and standardize on CowError.
- if (baseUrl === null) { - throw new Error('Unsupported Network. The subgraph API is not available in the Network ' + chainId) - } + if (baseUrl == null || baseUrl.trim() === '') { + throw new CowError(`Unsupported Network. The subgraph API is not available for chainId: ${chainId}`) + }packages/config/src/chains/details/linea.ts (1)
14-17: Consider explicit nativeCurrency configuration for consistency.Linea relies on
nativeCurrencyTemplatefor all values exceptchainId, which should be fine if Linea uses ETH as its native currency (typical for Ethereum L2s). However, Plasma explicitly overridesname,symbol, andlogoUrl. For consistency and clarity across chain configurations, consider being explicit here as well.If you prefer explicit configuration, apply this diff:
nativeCurrency: { ...nativeCurrencyTemplate, chainId: SupportedChainId.LINEA, + name: 'Ether', + symbol: 'ETH', },
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (3)
packages/config/src/chains/images/linea-logo-dark.svgis excluded by!**/*.svgpackages/config/src/chains/images/linea-logo-light.svgis excluded by!**/*.svgpackages/config/src/chains/images/plasma-logo.svgis excluded by!**/*.svg
📒 Files selected for processing (16)
examples/react/wagmi/src/tokens.ts(1 hunks)packages/bridging/src/providers/across/const/contracts.ts(2 hunks)packages/bridging/src/providers/bungee/const/contracts.ts(3 hunks)packages/bridging/src/test/getWallet.test.ts(2 hunks)packages/bridging/src/test/getWallet.ts(2 hunks)packages/config/src/chains/const/chainIds.ts(2 hunks)packages/config/src/chains/details/linea.ts(1 hunks)packages/config/src/chains/details/plasma.ts(1 hunks)packages/config/src/chains/index.ts(1 hunks)packages/config/src/chains/types.ts(2 hunks)packages/config/src/chains/utils.ts(1 hunks)packages/config/src/constants/tokens.ts(1 hunks)packages/order-book/src/api.ts(3 hunks)packages/sdk/README.md(1 hunks)packages/subgraph/src/api.spec.ts(1 hunks)packages/subgraph/src/api.ts(2 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-08-12T09:15:28.459Z
Learnt from: alfetopito
PR: cowprotocol/cow-sdk#391
File: src/trading/getEthFlowTransaction.ts:80-85
Timestamp: 2025-08-12T09:15:28.459Z
Learning: In the CoW SDK codebase, ETH_FLOW_ADDRESSES and BARN_ETH_FLOW_ADDRESSES are typed as Record<SupportedChainId, string>, which requires all SupportedChainId enum values to have corresponding string entries. TypeScript compilation will fail if any chainId is missing from these mappings, making runtime guards for missing addresses unnecessary in these specific cases.
Applied to files:
packages/bridging/src/providers/bungee/const/contracts.ts
⏰ 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). (2)
- GitHub Check: Publish to GitHub Packages
- GitHub Check: eslint
🔇 Additional comments (19)
packages/sdk/README.md (1)
28-29: Verify chain IDs for Linea and Plasma networks.The documentation additions follow the existing format and align with the PR objective to add preliminary support for these networks. However, confirm that the chain IDs are accurate: Linea (59144) and Plasma (9745). The "(Under development)" designation appropriately flags these as preliminary.
Please verify the chain IDs using authoritative sources such as:
- Linea: Check Linea's official documentation or chain registry
- Plasma: Verify against the Plasma network's official chain specification
Once confirmed, this documentation change is ready to merge.
packages/bridging/src/providers/across/const/contracts.ts (2)
44-45: Complete the ACROSS_MATH_CONTRACT_ADDRESSES for LINEA and PLASMA.These entries are currently undefined. Before moving out of draft status, confirm whether Across has deployed Math Library contracts for these chains and update accordingly.
18-21: Confirm Across SpokePool contract addresses for LINEA and PLASMA
- LINEA — 0xE0BCff426509723B18D6b2f0D8F4602d143bE3e0 — confirmed on Across docs (reference: linea-chain-id-59144).
- PLASMA — 0x50039fAEfebef707cFD94D6d462fE6D10B39207a — not confirmed (verification script produced a broken pipe / truncated output). Re-run verification or manually confirm the Plasma docs page before merging.
packages/bridging/src/providers/bungee/const/contracts.ts (1)
13-14: LINEA and PLASMA bridge contract addresses pending confirmation.The undefined placeholders with TODO comments are consistent with the pattern used for other pending chains (LENS, BNB). Based on learnings, TypeScript enforces that all
SupportedChainIdvalues must be present in theseRecordtypes, ensuring type safety.Before moving to production, confirm whether Bungee/Socket has deployed these contracts for LINEA and PLASMA.
Also applies to: 29-30, 45-46
examples/react/wagmi/src/tokens.ts (1)
60-66: LINEA USDC token configuration looks correct.The address, decimals, and metadata align with USDC (Native Linea) standards.
packages/config/src/chains/utils.ts (1)
46-52: Well-structured utility function for development chain detection.The implementation correctly follows the pattern established by
isZkSyncChainand safely handles undefined chain info. This will enable feature flagging and conditional logic for LINEA and PLASMA chains during their development phase.packages/config/src/chains/index.ts (1)
14-15: Chain detail exports added correctly.The new exports for LINEA and PLASMA follow the established pattern and maintain alphabetical ordering consistency with surrounding entries.
packages/bridging/src/test/getWallet.test.ts (1)
95-96: Test coverage appropriately extended for LINEA and PLASMA.Adding the new chain IDs to the test array ensures
getRpcProvideris validated for all supported chains, maintaining comprehensive test coverage.packages/subgraph/src/api.spec.ts (1)
340-341: Subgraph configuration test data updated correctly.The
nullvalues for LINEA and PLASMA align with chains that don't have subgraph deployments yet, ensuring the test suite covers all chain IDs without breaking on missing endpoints.packages/bridging/src/test/getWallet.ts (1)
9-9: RPC URL configuration added correctly for LINEA and PLASMA.The implementation follows the established pattern of accessing
rpcUrls.default.http[0]from chain detail objects. Ensure the correspondinglinea.tsandplasma.tschain detail files define valid RPC endpoints.Also applies to: 11-11, 27-28
packages/config/src/chains/const/chainIds.ts (1)
12-13: New chains correctly wired into ALL_SUPPORTED_CHAINS_MAPMapping PLASMA and LINEA to their details looks good and keeps ALL_SUPPORTED_CHAIN_IDS in sync. No issues spotted.
Also applies to: 27-29
packages/subgraph/src/api.ts (1)
50-52: Placeholders set to null: OK—keep until subgraphs deployedLINEA/PLASMA set to null is fine to explicitly mark unsupported. Just ensure to flip to the deployed subgraph IDs when ready and add a release note for integrators.
I can help wire the IDs once available; share The Graph subgraph IDs for both chains.
packages/config/src/chains/types.ts (1)
17-21: Chain IDs verified—no changes needed.Both chain IDs are canonical: Linea mainnet is 59144 and Plasma mainnet is 9745. The enum entries are correct.
The optional suggestion to add a comment linking to a central registry (if one exists) for drift prevention remains a reasonable enhancement, but the code as-is is accurate.
packages/order-book/src/api.ts (1)
51-53: Endpoint verification failed—endpoints return 404The code changes follow the established pattern and are syntactically correct, but the verification requested in the original comment did not pass: all four endpoints returned HTTP 404 instead of 200.
https://api.cow.fi/linea/api/v1/version→ 404https://api.cow.fi/plasma/api/v1/version→ 404https://barn.api.cow.fi/linea/api/v1/version→ 404https://barn.api.cow.fi/plasma/api/v1/version→ 404This PR only updates configuration and does not deploy backend services. Clarify whether the 404 responses are expected (services deploying separately) or indicate a release blocker. If the APIs are not yet live, coordinate deployment timing before merging.
packages/config/src/constants/tokens.ts (1)
85-89: LINEA WETH entry verified as correctThe WETH address
0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34ffor LINEA (chainId 59144) is canonical. ReusingwrappedNativeCurrencyEthacross multiple chains (MAINNET, ARBITRUM_ONE, BASE, SEPOLIA, POLYGON, AVALANCHE, LENS, PLASMA, LINEA) is the standard intentional pattern in the codebase—logo reuse via shared token metadata is by design. Checksumming is optional; LINEA follows the existing codebase convention of lowercase addresses (consistent with other entries and the logo URL path construction at line 103).packages/config/src/chains/details/plasma.ts (2)
4-5: Light and dark logos point to the same file.Both
lightanddarklogo paths referenceplasma-logo.svg. This works if the logo is theme-agnostic, but verify this is intentional. Linea uses separate light/dark variants.
29-46: All Plasma URLs are valid and accessible. No changes required.Verification results:
- RPC endpoint (
https://rpc.plasma.to): Responds with HTTP 400 to GET requests (expected), but successfully processes JSON-RPC POST requests (verified witheth_chainIdcall returning valid response)- Docs (
https://docs.plasma.to/): Returns HTTP 307 redirect with proper redirect location, content accessible- Website (
https://www.plasma.to/): HTTP 200 ✓- Block Explorer (
https://plasmascan.to/): HTTP 200 ✓packages/config/src/chains/details/linea.ts (2)
1-5: LGTM!Imports and logo paths are correctly configured with separate light/dark theme variants.
20-25: Based on my verification attempts, I was unable to access definitive information about the exactblockCreatedvalue for multicall3 on Linea. While the curl attempt to the block explorer didn't extract the deployment block number in a parseable format, and web searches revealed references to Linea's multicall3 deployment without specific block data, I can note that the blockCreated value should be verified on the block explorer.Review the multicall3 deployment block on Linea.
The value
blockCreated: 42appears unusually low. Verify this against the Linea block explorer at https://lineascan.build/address/0xca11bde05977b3631167028862be2a173976ca11 to confirm whether 42 is indeed the correct deployment block or if it requires adjustment.
237fffe to
09ccd2a
Compare
67695e7 to
31f6f67
Compare
| symbol: 'USDC', | ||
| }, | ||
| [SupportedChainId.PLASMA]: { | ||
| // TODO: This is USDT, not USDC!!! Update if/when there's a USDC deployment on Plasma |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👁🩸
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The assumptions on USDC are becoming dangerous. (as if they were not before)
9662503 to
66c24df
Compare
Summary
Adding preliminary support for the new chains we'll launch this quarter: Linea and Plasma.
Testing
Summary by CodeRabbit
New Features
Documentation
Tests
Chores