Combine the same table for hypersync + hyperrpc urls#784
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughThe changes reorganize the HyperSync supported networks documentation by splitting the single URL column into separate HyperSync URL and HyperRPC URL columns, and update the corresponding endpoint-generation script to output both values for each network entry. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@docs/HyperSync/hypersync-supported-networks.md`:
- Around line 31-32: The generated Markdown table is missing a preceding blank
line; update the updateMarkdownFiles function so it inserts a single blank line
(newline) between the closing block (e.g. the ::: container) and the table
header when composing or writing the file, ensuring the table is surrounded by
blank lines to satisfy MD058; locate the logic that concatenates or renders the
section containing the table header ("| Network Name ... |") and add the blank
line insertion or trim/ensure a trailing newline on the previous block before
appending the table.
🧹 Nitpick comments (1)
scripts/update-endpoints.js (1)
158-161: Consider extracting URL generation to reduce duplication.The traces network handling and URL construction logic is duplicated between
generateHyperSyncTable(lines 128-131) andgenerateHyperRPCTable(lines 159-161). A small helper function could consolidate this.♻️ Optional refactor
+const generateNetworkUrls = (chain) => { + const isTracesNetwork = chain.name.toLowerCase().includes("traces"); + const chainIdSuffix = isTracesNetwork ? `-traces` : ""; + return { + hypersyncUrl: `https://${chain.name}.hypersync.xyz or https://${chain.chain_id}${chainIdSuffix}.hypersync.xyz`, + hyperrpcUrl: `https://${chain.name}.rpc.hypersync.xyz or https://${chain.chain_id}${chainIdSuffix}.rpc.hypersync.xyz`, + }; +};Then use
const { hypersyncUrl, hyperrpcUrl } = generateNetworkUrls(chain);in both table generators.
| | Network Name | Network ID | HyperSync URL | HyperRPC URL | Tier | | ||
| | ------------------------- | --------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---- | |
There was a problem hiding this comment.
Add a blank line before the table.
Static analysis (MD058) correctly identifies that the table should be surrounded by blank lines. There's no blank line between the closing ::: on line 30 and the table header on line 31.
📝 Proposed fix
If you are a network operator or user and would like improved service support or to discuss upgrading a chain's level of support, please reach out to us in [Discord](https://discord.gg/Q9qt8gZ2fX).
:::
+
| Network Name | Network ID | HyperSync URL | HyperRPC URL | Tier |Note: This fix should be applied in the script's updateMarkdownFiles function to ensure the blank line is consistently generated.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| | Network Name | Network ID | HyperSync URL | HyperRPC URL | Tier | | |
| | ------------------------- | --------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---- | | |
| ::: | |
| | Network Name | Network ID | HyperSync URL | HyperRPC URL | Tier | | |
| | ------------------------- | --------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---- | |
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)
31-31: Tables should be surrounded by blank lines
(MD058, blanks-around-tables)
🤖 Prompt for AI Agents
In `@docs/HyperSync/hypersync-supported-networks.md` around lines 31 - 32, The
generated Markdown table is missing a preceding blank line; update the
updateMarkdownFiles function so it inserts a single blank line (newline) between
the closing block (e.g. the ::: container) and the table header when composing
or writing the file, ensuring the table is surrounded by blank lines to satisfy
MD058; locate the logic that concatenates or renders the section containing the
table header ("| Network Name ... |") and add the blank line insertion or
trim/ensure a trailing newline on the previous block before appending the table.
DZakh
left a comment
There was a problem hiding this comment.
Nice, let's update HyperRPC page as well
|
Hmm, maybe we only have 1 page rather than 2 if they are basically the same? |
Spills over onto 2 lines now, but seems fine
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.