Skip to content

Apply Optimism routing pattern to Starknet routes#2331

Merged
pablomendezroyo merged 4 commits intoadd_starknetfrom
copilot/sub-pr-2322
Dec 18, 2025
Merged

Apply Optimism routing pattern to Starknet routes#2331
pablomendezroyo merged 4 commits intoadd_starknetfrom
copilot/sub-pr-2322

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Dec 18, 2025

Per review feedback, revert custom isStakerRoute logic and apply the existing Optimism exception pattern to Starknet routes instead.

Changes

  • Reverted isStakerRoute function: Removed Starknet component type check, restored original StakerNetwork-only behavior
  • Applied subPath-based exceptions: Treat starknet and starknet-sepolia routes like Optimism using direct subPath comparisons
  • Route filtering logic:
    • optimism + starknet: Always show in mainnet view
    • starknet-sepolia: Always show in testnet view
    • Other StakerNetwork routes: Filter by network type as before

Implementation

// Before: Modified isStakerRoute to include Starknet component
const isStakerRoute = (r: RouteType) =>
  React.isValidElement(r.element) && 
  (r.element.type === StakerNetwork || r.element.type === Starknet);

// After: Direct subPath checks like Optimism
if (r.subPath === "optimism" || r.subPath === "starknet") return !testnetsSelected;
if (r.subPath === "starknet-sepolia") return testnetsSelected;

This approach handles both Starknet routes (mainnet + sepolia) without modifying component type checking, maintaining consistency with how Optimism is currently handled.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

pablomendezroyo and others added 2 commits December 18, 2025 01:45
Co-authored-by: pablomendezroyo <41727368+pablomendezroyo@users.noreply.github.com>
@github-actions github-actions bot temporarily deployed to commit December 18, 2025 09:47 Inactive
@github-actions
Copy link
Copy Markdown

github-actions bot commented Dec 18, 2025

Co-authored-by: pablomendezroyo <41727368+pablomendezroyo@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Dec 18, 2025

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • binaries.soliditylang.org
    • Triggering command: /usr/local/bin/node /usr/local/bin/node ./build/cli.bundled.js obtain --solc=0.5.16 (dns block)
  • ethereum.github.io
    • Triggering command: /usr/local/bin/node /usr/local/bin/node ./build/cli.bundled.js obtain --solc=0.5.16 (dns block)
  • relay.trufflesuite.com
    • Triggering command: /usr/local/bin/node /usr/local/bin/node ./build/cli.bundled.js obtain --solc=0.5.16 (dns block)
  • solc-bin.ethereum.org
    • Triggering command: /usr/local/bin/node /usr/local/bin/node ./build/cli.bundled.js obtain --solc=0.5.16 (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Address feedback on Starknet implementation in PR #2322 Apply Optimism routing pattern to Starknet routes Dec 18, 2025
@pablomendezroyo pablomendezroyo marked this pull request as ready for review December 18, 2025 10:35
@pablomendezroyo pablomendezroyo requested a review from a team as a code owner December 18, 2025 10:35
@pablomendezroyo pablomendezroyo merged commit 39d33ef into add_starknet Dec 18, 2025
4 checks passed
@pablomendezroyo pablomendezroyo deleted the copilot/sub-pr-2322 branch December 18, 2025 10:35
pablomendezroyo added a commit that referenced this pull request Dec 23, 2025
* Add Starknet

* Update Starknet configuration for Sepolia network.
Fix some bugs

* Added docs and fix some bugs

* Add waring if L1 not running

* Remove console logs

* Refactor consensus and mevBoost files for consistency

* Apply Optimism routing pattern to Starknet routes (#2331)

* Initial plan

* Apply Optimism pattern to Starknet in useFilterStakersNetworks

Co-authored-by: pablomendezroyo <41727368+pablomendezroyo@users.noreply.github.com>

* Add support for starknet-sepolia testnet route

Co-authored-by: pablomendezroyo <41727368+pablomendezroyo@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: pablomendezroyo <41727368+pablomendezroyo@users.noreply.github.com>

* starknet as EC/CC (#2332)

* starknet-ec-cc

* starknet exec global envs

* fix types

* signer fix

* staking app

* staking app

* Add Starknet support and configuration updates (#2333)

* Set starknet envs from frontend

* fix service name

* print starknetstaking envs (#2335)

* print starknetstaking envs

* fill placeholder with current values

* remove log that could print privkey

* set fullnode to starknet

---------

Co-authored-by: Pablo Mendez <pablo@dappnode.io>

* fix color in dark mode

* fix apply changes button enable

---------

Co-authored-by: Pablo Mendez <pablo@dappnode.io>
Co-authored-by: Marc Font <36164126+Marketen@users.noreply.github.com>

---------

Co-authored-by: pablomendezroyo <41727368+pablomendezroyo@users.noreply.github.com>
Co-authored-by: hcastc00 <hcastc00@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Marc Font <36164126+Marketen@users.noreply.github.com>
Co-authored-by: Pablo Mendez <pablo@dappnode.io>
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