Skip to content

chore: update arbitrum event cache to use alchemy#1268

Merged
kaladinlight merged 1 commit intodevelopfrom
arbitrum-alchemy
Mar 17, 2026
Merged

chore: update arbitrum event cache to use alchemy#1268
kaladinlight merged 1 commit intodevelopfrom
arbitrum-alchemy

Conversation

@kaladinlight
Copy link
Collaborator

@kaladinlight kaladinlight commented Mar 17, 2026

Summary by CodeRabbit

  • Chores
    • Updated backend infrastructure configuration for Arbitrum services. The underlying API provider has been changed, but no user-facing functionality has been affected.

@kaladinlight kaladinlight requested a review from a team as a code owner March 17, 2026 16:16
@coderabbitai
Copy link

coderabbitai bot commented Mar 17, 2026

📝 Walkthrough

Walkthrough

The Arbitrum API infrastructure is migrated from Infura to Alchemy by updating the transport endpoint in the controller and replacing the API key environment variable from INFURA_API_KEY to ALCHEMY_API_KEY across configuration files.

Changes

Cohort / File(s) Summary
Arbitrum API Provider Migration
node/coinstacks/arbitrum/api/src/controller.ts, node/coinstacks/arbitrum/sample.env
Updated infuraClient transport endpoint from Infura mainnet URL to Alchemy-based URL; replaced INFURA_API_KEY with ALCHEMY_API_KEY in secret environment variables.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Poem

🐰 From Infura's nest to Alchemy's gleam,
Our Arbitrum chains now stream,
With endpoints fresh and keys renewed,
The infrastructure's been transfused,
One hop, one skip, the migration's through! ✨

🚥 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 accurately describes the main change: switching the Arbitrum API from Infura to Alchemy, which is reflected in both the controller.ts endpoint change and the sample.env variable swap.
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.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch arbitrum-alchemy
📝 Coding Plan
  • Generate coding plan for human review comments

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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
node/coinstacks/arbitrum/api/src/controller.ts (1)

15-21: ⚠️ Potential issue | 🔴 Critical

Alchemy migration is incomplete: controller still requires INFURA_API_KEY.

The endpoint was switched to Alchemy, but this file still reads and validates INFURA_API_KEY. With sample.env now using ALCHEMY_API_KEY, the service can fail fast at startup due to missing env var.

Suggested fix
-const INFURA_API_KEY = process.env.INFURA_API_KEY
+const ALCHEMY_API_KEY = process.env.ALCHEMY_API_KEY
 ...
-if (!INFURA_API_KEY) throw new Error('INFURA_API_KEY env var not set')
+if (!ALCHEMY_API_KEY) throw new Error('ALCHEMY_API_KEY env var not set')
 ...
 const infuraClient = createPublicClient({
   chain: arbitrum,
-  transport: http(`https://arb-mainnet.g.alchemy.com/v2/${INFURA_API_KEY}`),
+  transport: http(`https://arb-mainnet.g.alchemy.com/v2/${ALCHEMY_API_KEY}`),
 })

Also applies to: 34-34

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@node/coinstacks/arbitrum/api/src/controller.ts` around lines 15 - 21, The
controller still reads and validates INFURA_API_KEY but the project migrated to
Alchemy; add reading of ALCHEMY_API_KEY (const ALCHEMY_API_KEY =
process.env.ALCHEMY_API_KEY) and replace/remove uses and checks of
INFURA_API_KEY so startup validates ALCHEMY_API_KEY instead (update any throw
new Error('INFURA_API_KEY env var not set') to reference ALCHEMY_API_KEY and
remove the unused INFURA_API_KEY constant), locating changes around the
INFURA_API_KEY, RPC_URL and RPC_API_KEY declarations in controller.ts.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@node/coinstacks/arbitrum/api/src/controller.ts`:
- Around line 15-21: The controller still reads and validates INFURA_API_KEY but
the project migrated to Alchemy; add reading of ALCHEMY_API_KEY (const
ALCHEMY_API_KEY = process.env.ALCHEMY_API_KEY) and replace/remove uses and
checks of INFURA_API_KEY so startup validates ALCHEMY_API_KEY instead (update
any throw new Error('INFURA_API_KEY env var not set') to reference
ALCHEMY_API_KEY and remove the unused INFURA_API_KEY constant), locating changes
around the INFURA_API_KEY, RPC_URL and RPC_API_KEY declarations in
controller.ts.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 1996a81f-c360-4fe9-81d4-0a7b9c58ac4e

📥 Commits

Reviewing files that changed from the base of the PR and between b0e61a1 and 4c7d47e.

📒 Files selected for processing (2)
  • node/coinstacks/arbitrum/api/src/controller.ts
  • node/coinstacks/arbitrum/sample.env

@kaladinlight kaladinlight merged commit 93f5c9b into develop Mar 17, 2026
3 checks passed
@kaladinlight kaladinlight deleted the arbitrum-alchemy branch March 17, 2026 17:04
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