Skip to content

feat: add support for Robinhood chain#115

Merged
mwelche merged 1 commit into
mainfrom
mathieu/feat/add-robinhood-chain
Jul 1, 2026
Merged

feat: add support for Robinhood chain#115
mwelche merged 1 commit into
mainfrom
mathieu/feat/add-robinhood-chain

Conversation

@mwelche

@mwelche mwelche commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Problem

0x-parser did not support Robinhood Chain (chainId 4663, an Arbitrum Orbit L2 with ETH gas). Calling parseSwap for a Robinhood transaction threw chainId 4663 is unsupported.

Solution

Mirrors the Abstract chain addition (#97). Robinhood Chain is not exported from viem/chains, so it is defined locally with defineChain, including the canonical Multicall3 (0xca11…ca11, verified on-chain) which viem's multicall requires when enriching transfer logs.

  • src/constants.ts — define and export robinhoodChain; add to SUPPORTED_CHAINS and NATIVE_SYMBOL_BY_CHAIN_ID.
  • src/types.ts — add typeof robinhoodChain.id to the SupportedChainId union.
  • src/utils/index.ts — add robinhoodChain.id to isChainIdSupported.
  • README.md — add Robinhood to the blockchain support table.

Validation

  • npm run build (esbuild cjs + esm) and tsc --emitDeclarationOnly both pass.
  • Runtime smoke test confirms id: 4663, native symbol ETH, membership in SUPPORTED_CHAINS, and isChainIdSupported(4663) === true.

Not included: integration test

Every chain here has a live integration test needing a real 0x Settler swap tx and an RPC exposing debug_traceTransaction. Neither is available for Robinhood yet: Alchemy/Quicknode don't support chainId 4663, the public RPC (rpc.chain.robinhood.com) rejects non-browser TLS and doesn't expose debug tracing, and the Blockscout explorer is behind HTTP auth. This matches the repo's own history — the Abstract feature PR (#97) added the code and the test-provider wiring landed separately (#99) once a debug RPC existed. A follow-up will add the test once a debug-capable RPC for 4663 and a real swap tx are available.

@codecov

codecov Bot commented Jul 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (d419e97) to head (f9571e1).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #115   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines          210       210           
  Branches        42        42           
=========================================
  Hits           210       210           
Flag Coverage Δ
unittests 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mwelche mwelche requested a review from cgero-eth July 1, 2026 04:12
@mwelche mwelche self-assigned this Jul 1, 2026
@mwelche mwelche force-pushed the mathieu/feat/add-robinhood-chain branch 2 times, most recently from 57077cf to 0e87cb5 Compare July 1, 2026 04:16
cgero-eth
cgero-eth previously approved these changes Jul 1, 2026
Comment thread README.md
<br>Abstract
</div>
</td>
<td style="width:100px; text-align:center;">

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'd suggest to move the chain to the next row
Image

Robinhood Chain (chainId 4663, an Arbitrum Orbit L2 with ETH gas) is not
exported from viem/chains, so define it locally with defineChain including
the canonical Multicall3 required by viem's multicall during log enrichment.
Wire it into SUPPORTED_CHAINS, NATIVE_SYMBOL_BY_CHAIN_ID, the SupportedChainId
union, isChainIdSupported, and the README support table.
@mwelche mwelche force-pushed the mathieu/feat/add-robinhood-chain branch 2 times, most recently from 0e87cb5 to f9571e1 Compare July 1, 2026 18:12
@mwelche mwelche requested a review from cgero-eth July 1, 2026 18:15
@mwelche mwelche merged commit 46a9894 into main Jul 1, 2026
3 of 4 checks passed
@mwelche mwelche deleted the mathieu/feat/add-robinhood-chain branch July 1, 2026 18:19
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