Skip to content

Conversation

@luiz-lvj
Copy link
Collaborator

@luiz-lvj luiz-lvj commented Jan 29, 2026

Summary by CodeRabbit

  • Chores
    • Updated environment configuration with consolidated RPC URL variables for Sepolia testnet environments across supported blockchain networks (Arbitrum, Ethereum, Optimism, Linea, Scroll, and ZKSync).
    • Added chain identifiers, outbox/root slot settings, and deployment configuration placeholders.

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

@coderabbitai
Copy link

coderabbitai bot commented Jan 29, 2026

📝 Walkthrough

Walkthrough

Updated .env.example configuration file by consolidating deprecated per-file RPC URL variables into per-subsystem Sepolia variants. Removed old environment variable entries and introduced standardized placeholders for multiple test networks (Arbitrum, Ethereum, zkSync, Optimism, Linea, Scroll), along with related chain IDs and configuration parameters.

Changes

Cohort / File(s) Summary
Environment Configuration
.env.example
Replaced legacy RPC URL variables with Sepolia-focused consolidated variants. Removed ARBITRUM_RPC_URL, ETHEREUM_RPC_URL, OPTIMISM_RPC_URL, and legacy LINEA_SEPOLIA entries. Added new Sepolia RPC URLs for Arbitrum, Ethereum, zkSync, Optimism, Linea, and Scroll, plus associated chain IDs, outbox/root slots, and OWNER/DEPLOYER_PRIVATE_KEY placeholders.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 The networks dance in Sepolia's light,
No more the chaos of URLs in flight!
Consolidated, organized, clean and keen,
The neatest config you've ever seen!
✨🔗

🚥 Pre-merge checks | ✅ 3
✅ 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 'Update .env.example' accurately reflects the main change in the pull request, which is updating the .env.example file with new environment variable configurations.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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


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.

Copy link

@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: 1

🤖 Fix all issues with AI agents
In @.env.example:
- Around line 14-33: Update the incorrect Linea Sepolia rollup address by
replacing the value for LINEA_SEPOLIA_ROLLUP with the official address
0xd19d4B5d358258f05D7B411E21A1460D11B0876F (ensure you edit the
LINEA_SEPOLIA_ROLLUP env variable), and while here verify the
OPTIMISM_SEPOLIA_ANCHOR_STATE_REGISTRY value (env key
OPTIMISM_SEPOLIA_ANCHOR_STATE_REGISTRY) against the superchain-registry and
update it if it does not match the official registry value.
🧹 Nitpick comments (5)
.env.example (5)

2-7: Consider alphabetical ordering for RPC URLs.

The RPC URL variables would be easier to locate and maintain if sorted alphabetically.

📋 Proposed reordering
 
 ARBITRUM_SEPOLIA_RPC_URL=
 ETHEREUM_SEPOLIA_RPC_URL=
-ZKSYNC_SEPOLIA_RPC_URL=
-OPTIMISM_SEPOLIA_RPC_URL=
 LINEA_SEPOLIA_RPC_URL=
+OPTIMISM_SEPOLIA_RPC_URL=
 SCROLL_SEPOLIA_RPC_URL=
+ZKSYNC_SEPOLIA_RPC_URL=

9-9: Remove extra blank line.

Line 9 creates two consecutive blank lines, which is unnecessary.

🧹 Proposed fix
 SCROLL_SEPOLIA_RPC_URL=
 
-
 OWNER=

21-21: Add space after # for consistent comment formatting.

The comment formatting here differs from other section comments (lines 16, 26, 31) which include a space after the #.

🧹 Proposed fix
-#Linea Envs
+# Linea Envs
 LINEA_SEPOLIA_CHAIN_ID=59141

26-29: Consider alphabetical ordering within Scroll section.

For consistency, the keys within the Scroll configuration section could be sorted alphabetically.

📋 Proposed reordering
 # Scroll Envs
-SCROLL_SEPOLIA_CHAIN_ID=534351
 SCROLL_CHAIN_SEPOLIA=0x2D567EcE699Eabe5afCd141eDB7A4f2D0D6ce8a0
+SCROLL_SEPOLIA_CHAIN_ID=534351
 SCROLL_SEPOLIA_FINALIZED_STATE_ROOT_SLOT=158

31-33: Consider alphabetical ordering within Optimism section.

For consistency, the keys within the Optimism configuration section could be sorted alphabetically.

📋 Proposed reordering
 # Optimism Envs
-OPTIMISM_SEPOLIA_CHAIN_ID=11155420
 OPTIMISM_SEPOLIA_ANCHOR_STATE_REGISTRY=0xa1Cec548926eb5d69aa3B7B57d371EdBdD03e64b
+OPTIMISM_SEPOLIA_CHAIN_ID=11155420

Comment on lines +14 to +33
ETHEREUM_SEPOLIA_CHAIN_ID=11155111

# Arbitrum Envs
ARBITRUM_SEPOLIA_CHAIN_ID=421614
ARBITRUM_SEPOLIA_OUTBOX=0x65f07C7D521164a4d5DaC6eB8Fac8DA067A3B78F
ARBITRUM_SEPOLIA_ROOTS_SLOT=3

#Linea Envs
LINEA_SEPOLIA_CHAIN_ID=59141
LINEA_SEPOLIA_ROLLUP=0xB218f8A4Bc926cF1cA7b3423c154a0D627Bdb7E5
LINEA_SEPOLIA_STATE_ROOT_HASHES_SLOT=282

# Scroll Envs
SCROLL_SEPOLIA_CHAIN_ID=534351
SCROLL_CHAIN_SEPOLIA=0x2D567EcE699Eabe5afCd141eDB7A4f2D0D6ce8a0
SCROLL_SEPOLIA_FINALIZED_STATE_ROOT_SLOT=158

# Optimism Envs
OPTIMISM_SEPOLIA_CHAIN_ID=11155420
OPTIMISM_SEPOLIA_ANCHOR_STATE_REGISTRY=0xa1Cec548926eb5d69aa3B7B57d371EdBdD03e64b
Copy link

@coderabbitai coderabbitai bot Jan 29, 2026

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🌐 Web query:

Ethereum Sepolia chain ID 11155111 official

💡 Result:

Ethereum Sepolia testnet’s official EIP-155 Chain ID is 11155111 (and the Network ID is also 11155111). [1][2]


🌐 Web query:

Arbitrum Sepolia chain ID 421614 official outbox address

💡 Result:

Arbitrum Sepolia (chain ID 421614) Outbox (L1, on Ethereum Sepolia) official address:

0x65f07C7D521164a4d5DaC6eB8Fac8DA067A3B78F [1][2]


🌐 Web query:

Linea Sepolia chain ID 59141 rollup contract address official

💡 Result:

  • Linea Sepolia Chain ID: 59141 (0xe705) [2]
  • Linea Sepolia Rollup contract (Linea Rollup + L1 Message Service): 0xd19d4B5d358258f05D7B411E21A1460D11B0876F [1]

Sources: [1] [2]


🌐 Web query:

Scroll Sepolia chain ID 534351 contract addresses official

💡 Result:

Official Scroll Sepolia (chain ID 534351) contract addresses:

Network

  • Chain ID: 534351; RPC: https://sepolia-rpc.scroll.io/; Explorer: https://sepolia-blockscout.scroll.io [1]

Core contracts (Scroll Sepolia)

  • L1 Rollup (Scroll Chain): 0x2D567EcE699Eabe5afCd141eDB7A4f2D0D6ce8a0 [1]
  • Gateway Router (L1): 0x13FBE0D0e5552b8c9c4AE9e2435F38f37355998a [1]
  • Gateway Router (L2): 0x9aD3c5617eCAa556d6E166787A97081907171230 [1]

Advanced bridge contracts (Scroll Sepolia)

  • Scroll Messenger (L1): 0x50c7d3e7f7c656493D1D76aaa1a836CedfCBB16A [1]
  • Scroll Messenger (L2): 0xBa50f5340FB9F3Bd074bD638c9BE13eCB36E603d [1]
  • ETH Gateway (L1): 0x8A54A2347Da2562917304141ab67324615e9866d [1]
  • ETH Gateway (L2): 0x91e8ADDFe1358aCa5314c644312d38237fC1101C [1]
  • WETH Gateway (L1): 0x3dA0BF44814cfC678376b3311838272158211695 [1]

(If you meant the “Custom Gateway” addresses used in Scroll’s ERC20 custom-gateway guide)

  • L1 Custom Gateway (Sepolia): 0x31C994F2017E71b82fd4D8118F140c81215bbb37 [2]
  • L2 Custom Gateway (Scroll Sepolia): 0x058dec71E53079F9ED053F3a0bBca877F6f3eAcf [2]

Sources: Scroll docs “Scroll Contracts” (includes Scroll Sepolia section) [1], Scroll docs custom gateway guide [2].


🌐 Web query:

Optimism Sepolia chain ID 11155420 anchor state registry official

💡 Result:

  • OP Sepolia chain ID: 11155420 (official Optimism docs). [1]
  • Anchor state registry (what it is): The OP Stack AnchorStateRegistry contract stores the latest “anchor” state per dispute-game type (used to initialize new FaultDisputeGame instances from a recent accepted state). [2]
  • Official source of truth for the OP Sepolia AnchorStateRegistry address: Optimism’s “OP Mainnet Contract Addresses” page (it’s auto-synced from the superchain-registry). Look under “L1 Contract Addresses → Ethereum Testnet (Sepolia)” for AnchorStateRegistryProxy. [3]

Sources: [1] [2] [3]


Fix incorrect Linea Sepolia Rollup contract address.

Chain IDs are correct, but the Linea Sepolia Rollup address is incorrect and will cause failures. Update line 23 from 0xB218f8A4Bc926cF1cA7b3423c154a0D627Bdb7E5 to the official address 0xd19d4B5d358258f05D7B411E21A1460D11B0876F.

Verify the Optimism Sepolia AnchorStateRegistry address (0xa1Cec548926eb5d69aa3B7B57d371EdBdD03e64b) against the superchain-registry to ensure it matches the current official value.

🧰 Tools
🪛 dotenv-linter (4.0.0)

[warning] 28-28: [UnorderedKey] The SCROLL_CHAIN_SEPOLIA key should go before the SCROLL_SEPOLIA_CHAIN_ID key

(UnorderedKey)


[warning] 33-33: [UnorderedKey] The OPTIMISM_SEPOLIA_ANCHOR_STATE_REGISTRY key should go before the OPTIMISM_SEPOLIA_CHAIN_ID key

(UnorderedKey)

🤖 Prompt for AI Agents
In @.env.example around lines 14 - 33, Update the incorrect Linea Sepolia rollup
address by replacing the value for LINEA_SEPOLIA_ROLLUP with the official
address 0xd19d4B5d358258f05D7B411E21A1460D11B0876F (ensure you edit the
LINEA_SEPOLIA_ROLLUP env variable), and while here verify the
OPTIMISM_SEPOLIA_ANCHOR_STATE_REGISTRY value (env key
OPTIMISM_SEPOLIA_ANCHOR_STATE_REGISTRY) against the superchain-registry and
update it if it does not match the official registry value.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

You are wrong, as the Sepolia Rollup contract address is correct.

Copy link

Choose a reason for hiding this comment

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

🧩 Analysis chain

🌐 Web query:

Linea Sepolia Rollup contract address 0xB218f8A4Bc926cF1cA7b3423c154a0D627Bdb7E5 official

💡 Result:

0xB218f8A4Bc926cF1cA7b3423c154a0D627Bdb7E5 is an official Linea address, but it is the L1 Message Service contract on Ethereum Sepolia (for Linea Sepolia), not the Rollup contract. [1]

The official “Linea Rollup and L1 Message Service” contract address for Linea Sepolia is:
0xd19d4B5d358258f05D7B411E21A1460D11B0876F. [1]


🌐 Web query:

Linea Sepolia Rollup vs L1 Message Service contract difference

💡 Result:

On Linea, “Rollup” and “L1 Message Service” refer to different responsibilities on the L1 (finalization layer), even though on mainnet they’re deployed together in one system contract.

What the “Rollup” (finalization) part does

The finalization contract (often referred to as the Linea Rollup) is the L1 contract that:

  • verifies zk proofs for Linea transaction batches,
  • records finalized state roots on L1,
  • and gates other actions on “has this batch been proven/finalized?” security. (docs.linea.build)

What the “L1 Message Service” part does

The message service is the L1-side component of Linea’s native cross-chain messaging/bridge that:

  • lets contracts/users send messages L1→L2 and L2→L1,
  • supports “push” (auto-execution with a fee) and “pull” (manual claiming),
  • and is also used by the native bridge flows (incl. ETH bridging via the messaging path). (docs.linea.build)

Why you may see different “contracts” on Sepolia

  • Mainnet: Linea uses a single L1 system deployment referred to as “Linea Rollup and L1 Message Service”. (docs.linea.build)
  • Linea Sepolia (testnet): the docs list a distinct L1 Message Service address on Ethereum Sepolia (and an L2 Message Service on Linea Sepolia), i.e. you typically interact with the message service contract for bridging/messaging tests. (docs.linea.build)

If you tell me which two contract addresses you’re comparing (and which explorer/network you’re looking at), I can map them to the exact deployment(s) and ABI you should use.

Citations:


🏁 Script executed:

#!/bin/bash
# Search for usages of LINEA_SEPOLIA_ROLLUP to understand how it's being used
rg 'LINEA_SEPOLIA_ROLLUP' -C 5

# Also search for any imports or references to Linea contracts
rg -i 'linea.*rollup|linea.*message.*service' -C 3

Length of output: 39450


🌐 Web query:

0xB218f8A4Bc926cF1cA7b3423c154a0D627Bdb7E5 Linea Sepolia stateRootHashes contract

💡 Result:

  • What it is: 0xB218f8A4Bc926cF1cA7b3423c154a0D627Bdb7E5 is the LineaRollup (proxy) contract on Ethereum Sepolia (L1) (often used to track/finalize Linea L2 state on L1). Its implementation is 0x0bF527ac405443063dA85A1103ceC4D52b36E62d. [1][2]
  • Where stateRootHashes lives: In the implementation, stateRootHashes is declared as:
    mapping(uint256 blockNumber => bytes32 stateRootHash) public stateRootHashes; [2]
    Linea’s docs describe this mapping as “the most recent L2 state root hash mapped by block number.” [3]
  • How to read it: Call the public getter stateRootHashes(<l2BlockNumber>) on the proxy address (0xB218…) to get the bytes32 state root for that finalized L2 block number. [2][3]

Sources: [1] [2] [3]


@luiz-lvj, you're absolutely right, and I apologize for the error.

0xB218f8A4Bc926cF1cA7b3423c154a0D627Bdb7E5 is the LineaRollup (proxy) contract on Ethereum Sepolia, and it does implement the stateRootHashes mapping that your codebase requires. The address in your .env.example file is correct.

Thank you for the correction!

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