Skip to content

Conversation

@alfetopito
Copy link
Contributor

@alfetopito alfetopito commented Nov 12, 2025

Description

Add Linea to docs

Changes

Summary by CodeRabbit

  • Documentation
    • Added Linea network across contract references, deployment tables, tutorials, widget examples, and token/auction docs.
    • Expanded explorer links and examples to include Linea (and added an additional explorer entry).
    • Updated rewards/cap and protocol/token listings to reflect Linea-specific parameters and explorer URLs.
    • Minor formatting and example formatting updates for consistency.

✏️ Tip: You can customize this high-level summary in your review settings.

@vercel
Copy link

vercel bot commented Nov 12, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
docs Ready Ready Preview Nov 26, 2025 4:40pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 12, 2025

Walkthrough

Adds the Linea network (and adds Plasma in one frontend mapping) across documentation and a frontend explorer mapping: network lists, token/address tables, auction parameters, tutorial examples, and explorerByChain in a React component. Changes are additive and largely placeholder (N/A).

Changes

Cohort / File(s) Summary
CoW AMM tutorials
docs/cow-amm/tutorials/cow-amm-deployer.md, docs/cow-amm/tutorials/cow-amm-for-solvers.md
Inserted Linea entries (marked N/A) into factory/helper contract deployment lists.
Contract reference (core & periphery)
docs/cow-protocol/reference/contracts/core/README.mdx, docs/cow-protocol/reference/contracts/periphery/README.mdx
Added Linea to explorer/network lists for core and periphery contracts (GPv2*, EthFlow, HooksTrampoline, ComposableCoW); minor header/format adjustments in HooksTrampoline.
Auctions: rules & rewards
docs/cow-protocol/reference/core/auctions/competition_rules.md, docs/cow-protocol/reference/core/auctions/rewards.md
Added Linea baseline (20 block deadline), protocol/token references (Uniswap v3; WETH, USDC, USDT), and Linea cap/reward entries (c_l = 0.0015 ETH; reward table additions).
Signing, links, tests, widget tutorials
docs/cow-protocol/reference/core/signing_schemes.mdx, docs/cow-protocol/tutorials/cow-swap/custom-links.md, docs/cow-protocol/tutorials/solvers/local_test.md, docs/cow-protocol/tutorials/widget/widget.md
Added Linea to explorerLinks, native/wrapped token lists, test orderbook URLs, FlexibleConfig maps and per-network examples; some examples reformatted to compact inline object forms.
Governance token docs
docs/governance/token.md
Added Linea rows to COW and vCOW token address tables with N/A entries.
Frontend explorer mapping
src/components/contract-addresses/index.tsx
Added "Linea": "https://lineascan.build" and "Plasma": "https://plasmascan.to/" to explorerByChain; minor whitespace/import ordering edits.

Sequence Diagram(s)

(No sequence diagrams — changes are documentation and static mapping additions; no control-flow changes to visualize.)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Mostly repetitive, additive documentation edits and two small key-value additions in a single TypeScript file.
  • Pay attention to:
    • src/components/contract-addresses/index.tsx — verify URL strings and import/format changes.
    • docs/cow-protocol/reference/core/auctions/rewards.md — verify numeric units/format for cap/reward entries.
    • Consistency of explorer links across docs (same base URL and casing for "Linea").

Possibly related PRs

Suggested reviewers

  • pretf00d
  • anxolin

Poem

🐇 I hopped through docs with a tiny cheer,
Linea's name now bright and near,
Tokens, explorers, maps all aligned,
Paper trails and URLs combined,
A rabbit's nibble: networks defined! 🥕✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat(new-chains): add linea' clearly and concisely summarizes the main change—adding Linea network support across the documentation.
Description check ✅ Passed The description includes a clear purpose statement and a comprehensive checklist of all files/sections being updated, with direct links to review changes in context.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/linea

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f555f98 and cb6fe33.

📒 Files selected for processing (1)
  • docs/cow-protocol/reference/core/auctions/rewards.md (2 hunks)
🔇 Additional comments (1)
docs/cow-protocol/reference/core/auctions/rewards.md (1)

47-47: Linea parameters added, but verify values are properly benchmarked.

The previous TODO for Linea cap parameters has been resolved by adding c_l = 0.0015 ETH and price estimation rewards of min{0.00003 ETH, 6 COW}. However, these values are significantly lower than comparable EVM chains (6-23x lower), which warrants verification.

While lower values are reasonable for an Ethereum L2 with lower gas costs, confirm that:

  1. These values reflect actual gas cost analysis on Linea
  2. They remain competitive enough to attract solver participation
  3. The rationale aligns with observed network economics

Consider adding a brief note in the documentation explaining why Linea's parameters differ substantially from mainnet and other L1 chains.

Also applies to: 94-94


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.

@alfetopito
Copy link
Contributor Author

@coderabbitai review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 12, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

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.

Actionable comments posted: 2

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 25e2c88 and d2ba0f9.

📒 Files selected for processing (12)
  • docs/cow-amm/tutorials/cow-amm-deployer.md (1 hunks)
  • docs/cow-amm/tutorials/cow-amm-for-solvers.md (1 hunks)
  • docs/cow-protocol/reference/contracts/core/README.mdx (1 hunks)
  • docs/cow-protocol/reference/contracts/periphery/README.mdx (4 hunks)
  • docs/cow-protocol/reference/core/auctions/competition_rules.md (2 hunks)
  • docs/cow-protocol/reference/core/auctions/rewards.md (1 hunks)
  • docs/cow-protocol/reference/core/signing_schemes.mdx (2 hunks)
  • docs/cow-protocol/tutorials/cow-swap/custom-links.md (1 hunks)
  • docs/cow-protocol/tutorials/solvers/local_test.md (1 hunks)
  • docs/cow-protocol/tutorials/widget/widget.md (14 hunks)
  • docs/governance/token.md (2 hunks)
  • src/components/contract-addresses/index.tsx (3 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-06-16T16:45:56.918Z
Learnt from: alfetopito
Repo: cowprotocol/docs PR: 505
File: docs/cow-protocol/tutorials/cow-swap/custom-links.md:75-76
Timestamp: 2025-06-16T16:45:56.918Z
Learning: Polygon completed a major token migration from MATIC to POL on September 4, 2024. As part of this upgrade, the wrapped token symbol on Polygon PoS was automatically changed from WMATIC to WPOL (Wrapped Polygon Ecosystem Token). The contract address 0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270 on Polygon now represents WPOL, not WMATIC.

Applied to files:

  • docs/cow-protocol/tutorials/cow-swap/custom-links.md
🔇 Additional comments (19)
docs/cow-amm/tutorials/cow-amm-deployer.md (1)

23-23: LGTM!

The Linea entry is correctly added to the factory contract addresses list, maintaining consistency with the existing format and properly marked as N/A to indicate no deployment yet.

docs/cow-protocol/tutorials/solvers/local_test.md (1)

65-66: LGTM!

The Linea orderbook URLs follow the established pattern and are correctly positioned in the table, maintaining consistency with other network entries.

docs/cow-protocol/reference/core/signing_schemes.mdx (2)

48-48: LGTM!

The Linea entry is correctly added to the explorerLinks array for the domain separator function, maintaining consistency with the settlement contract deployment across all supported chains.


136-136: LGTM!

The Linea entry is appropriately marked as N/A in the helper contract section, consistent with other chains that don't have this helper contract deployed yet.

src/components/contract-addresses/index.tsx (3)

14-14: LGTM!

The Linea explorer URL is correctly added to the explorerByChain mapping, consistent with its usage throughout the documentation files.


2-2: Minor formatting changes noted.

The whitespace and formatting adjustments (React import spacing, conditional formatting, JSX prop spacing) are stylistic and don't affect functionality.

Also applies to: 53-53, 61-61, 64-64


15-15: The Plasma network addition is legitimate and correctly implemented.

Verification confirms that Plasma is a real blockchain network with plasmascan.to as its official explorer URL. The entry is properly formatted and consistent with other networks in the explorerByChain configuration object. This is a code configuration file, not documentation, and other networks here also lack individual comments. The technical implementation is correct with no issues requiring fixes.

docs/cow-protocol/reference/core/auctions/competition_rules.md (1)

45-46: LGTM!

The Linea deadline is set to 20 blocks, consistent with Base, Avalanche, and Polygon. The infrastructure configuration reference is helpful for future maintenance.

docs/cow-protocol/tutorials/cow-swap/custom-links.md (1)

79-79: Verification confirmed—no changes needed.

The token address 0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f and explorer URL https://lineascan.build are both correct. The verification successfully retrieved the token page, confirming it's Wrapped Ether (WETH) on Linea mainnet with active contract data.

docs/cow-protocol/reference/contracts/core/README.mdx (1)

47-49: All core contracts are confirmed deployed on Linea.

Verification completed successfully. All three contracts are found on the Linea network at the specified addresses:

  • GPv2Settlement: ✓ Deployed
  • GPv2AllowListAuthentication: ✓ Deployed
  • GPv2VaultRelayer: ✓ Deployed

The explorer links in the documentation are valid and the changes are safe to merge.

docs/cow-protocol/reference/contracts/periphery/README.mdx (3)

41-61: Verify HooksTrampoline restructuring intent and address accuracy.

The refactoring extracts a "Most chains" subsection with the original address and adds a separate Linea subsection with a different address (0xeFcf0d30DB41Ae0b136c5E3B4340dFeE2D099Ada). This assumes Linea uses a distinct deployment. Ensure:

  1. This is intentional (Linea HooksTrampoline indeed has a different address).
  2. The address 0xeFcf0d30DB41Ae0b136c5E3B4340dFeE2D099Ada is verified as correct for Linea.
  3. The explorerLinks("Linea", ...) call on line 60 is properly supported by the explorer registry (verify in src/components/contract-addresses/index.tsx).

17-18: Verify Linea contract addresses for EthFlow.

Lines 17–18 add Linea to the EthFlow Production and Staging rows. Confirm that:

  1. Address 0xbA3cB449bD2B4ADddBc894D8697F5170800EAdeC is the correct EthFlow Production deployment on Linea.
  2. Address 0x04501b9b1D52e67f6862d157E00D13419D2D6E95 is the correct EthFlow Staging deployment on Linea.
  3. The explorerLinks(["Ethereum",...,"Linea",...], ...) calls properly support the "Linea" network string.

73-84: Verify Linea is supported in explorerLinks for ComposableCoW.

Line 82 adds "Linea" to the explorerLinks call for ComposableCoW. Confirm that:

  1. Address 0xfdaFc9d1902f4e0b84f65F49f244b32b31013b74 is deployed on Linea.
  2. The "Linea" network identifier is properly registered in the explorerLinks component registry.
docs/cow-protocol/tutorials/widget/widget.md (4)

89-98: LINEA additions in PartnerFee bps config look correct.

Lines 89–98 properly add [SupportedChainId.LINEA] to the per-chain bps configuration with consistent fee structure { [TradeType.SWAP]: 100, [TradeType.LIMIT]: 50, [TradeType.ADVANCED]: 30 }. The placement after SupportedChainId.BNB and before SupportedChainId.SEPOLIA is consistent with other examples.


116-116: LINEA added consistently across per-trade-type recipient configurations.

Lines 116, 128, and 140 add [SupportedChainId.LINEA]: '0x...c', [SupportedChainId.LINEA]: '0x...y', and [SupportedChainId.LINEA]: '0x...t' respectively to the SWAP, LIMIT, and ADVANCED trade type recipient mappings. The structure is consistent with other chains.

Also applies to: 128-128, 140-140


163-177: Verify inline formatting changes do not alter semantics.

Lines 163–177 convert the event handler's partnerFee parameter assignments to single-line format (e.g., { partnerFee: { bps: 20, recipient } } on line 172). While this is stylistic, confirm:

  1. The logic remains identical (it does).
  2. This formatting is intentional and aligns with the PR's stated objectives.

274-276: Verify slippage example formatting and LINEA relevance.

Lines 274–276 show slippage configuration examples. The changes here appear to be inline formatting (converting to single-line) rather than adding LINEA-specific content. Confirm this is intentional.

docs/governance/token.md (1)

23-23: Verify COW and vCOW token deployment status on Linea.

Lines 23 and 41 mark both COW and vCOW tokens as "N/A" for Linea. This indicates the tokens are not yet deployed on Linea. Confirm this is accurate—if CoW or vCOW tokens have since been bridged/deployed to Linea, these entries should include the contract addresses instead.

Also applies to: 41-41

docs/cow-amm/tutorials/cow-amm-for-solvers.md (1)

44-48: Verify BCoWHelper contract deployment status on Linea.

Line 48 marks the BCoWHelper contract as "N/A" for Linea. This is consistent with the partial Linea support pattern seen elsewhere (tokens not deployed, some contracts deployed but not all helpers). Confirm this status is current.

@alfetopito alfetopito marked this pull request as ready for review November 12, 2025 18:14
@alfetopito alfetopito requested a review from a team as a code owner November 12, 2025 18:14
Copy link
Contributor

@fhenneke fhenneke left a comment

Choose a reason for hiding this comment

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

Changes to solver section check out. For a justification of the numbers see #557.

@alfetopito alfetopito self-assigned this Nov 24, 2025
@alfetopito alfetopito merged commit 6b3412e into main Nov 26, 2025
6 checks passed
@alfetopito alfetopito deleted the feat/linea branch November 26, 2025 16:44
@github-actions github-actions bot locked and limited conversation to collaborators Nov 26, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants