Skip to content

fix: use alchemy rpc#43

Open
highskore wants to merge 2 commits into
mainfrom
fix/use-alchemy-rpc
Open

fix: use alchemy rpc#43
highskore wants to merge 2 commits into
mainfrom
fix/use-alchemy-rpc

Conversation

@highskore
Copy link
Copy Markdown

No description provided.

@highskore highskore requested a review from kopy-kat February 18, 2026 18:42
Copy link
Copy Markdown

@greg-rhinestone greg-rhinestone left a comment

Choose a reason for hiding this comment

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

🤖 Automated review by Greg

PR Review

Summary: Adds an Alchemy RPC utility (src/utils/rpc.ts) with a chain-slug lookup table and falls back to viem's default public RPC when no API key or unsupported chain is encountered. Replaces bare http() calls across main.ts and tokens.ts with the new rpcTransport helper.

Risk: Low — purely improves RPC reliability; fallback preserves existing behaviour.

Suggestions:

  • getRpcUrl returns an empty string '' for the fallback case and then rpcTransport calls http('') which technically works but is a bit odd. Returning null | string and branching on that (already done in rpcTransport) is cleaner — worth making the empty-string sentinel explicit in the comment.
  • No chain slug entries for testnets (Sepolia, Base Sepolia, etc.). If this tool is used in dev/staging against testnets those calls will silently fall back to public RPCs. Fine for now, but worth a TODO comment.

Missing: Nothing critical.

Verdict: LGTM ✅

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