Skip to content

migrate from alchemy guide & migration section addition#742

Merged
Jordy-Baby merged 2 commits intomainfrom
nb/alchemy-migration-guide
Nov 21, 2025
Merged

migrate from alchemy guide & migration section addition#742
Jordy-Baby merged 2 commits intomainfrom
nb/alchemy-migration-guide

Conversation

@nikbhintade
Copy link
Member

@nikbhintade nikbhintade commented Nov 21, 2025

Summary by CodeRabbit

  • Documentation
    • Added a comprehensive migration guide for moving from Alchemy Subgraphs to Envio's HyperIndex, with step-by-step migration flow, configuration and schema guidance, event-handler migration tips, examples, and support links.
    • Added a new "Migration" section to the documentation sidebar for easier discovery.

✏️ Tip: You can customize this high-level summary in your review settings.

✏️ Tip: You can customize this high-level summary in your review settings.

@nikbhintade nikbhintade self-assigned this Nov 21, 2025
@vercel
Copy link

vercel bot commented Nov 21, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
envio-docs Ready Ready Preview Comment Nov 21, 2025 3:12pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 21, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Adds a new HyperIndex migration doc for migrating Alchemy Subgraphs to Envio’s HyperIndex and updates the HyperIndex sidebar to include a new "Migration" category.

Changes

Cohort / File(s) Summary
New migration doc
docs/HyperIndex/migrate-from-alchemy.md
Adds a detailed migration guide outlining a four-step flow: create HyperIndex project, migrate subgraph.yamlconfig.yaml, adjust schema.graphql (remove @entity), and convert event handlers (AssemblyScript → TypeScript; replace ENTITY.save() with context.ENTITY.set, use async/await). Includes side-by-side examples, tips, and help links.
Sidebar update
sidebarsHyperIndex.js
Inserts a new top-level category Migration (collapsed: false) with items ["migration-guide", "migrate-from-alchemy"] and a minor formatting cleanup in the Hosted category.

Sequence Diagram(s)

(omitted — changes are documentation and sidebar configuration only; no runtime/control-flow modifications)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Review focus: docs accuracy, example correctness, and sidebar item names/ordering.
  • Files needing attention:
    • docs/HyperIndex/migrate-from-alchemy.md — check code examples and migration steps for correctness and clarity.
    • sidebarsHyperIndex.js — verify category insertion and item keys match existing sidebar ids.

Possibly related PRs

Suggested reviewers

  • nikbhintade
  • DenhamPreen

Poem

🐰 I hop with docs in tow tonight,
From Alchemy to HyperIndex light,
Examples tidy, steps in line,
A migration trail — soft and fine. ✨

Pre-merge checks and finishing touches

✅ 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 changes: adding a migration guide from Alchemy and creating a new Migration section in the sidebar.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 39d7220 and 2cc41bf.

📒 Files selected for processing (1)
  • docs/HyperIndex/migrate-from-alchemy.md (1 hunks)

Tip

📝 Customizable high-level summaries are now available in beta!

You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions:
    | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context.
    Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


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
Contributor

@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.

Actionable comments posted: 5

🧹 Nitpick comments (3)
docs/HyperIndex/migrate-from-alchemy.md (3)

146-158: Convert indented code block to fenced code block.

This code block uses indentation instead of fenced backticks, which is inconsistent with the rest of the document.

Based on static analysis hints

Apply this diff:

-    The Graph - `eventHandler.ts`
-
-    ```typescript
-    export function handleSubscription(event: SubscriptionEvent): void {
-    const subscription = new Subscribe(event.transaction.hash + event.logIndex);
-
-    subscription.tokenId = event.params.tokenId;
-    subscription.address = event.params.subscriber.toHexString();
-    subscription.logIndex = event.logIndex;
-    subscription.blockNumber = event.block.number;
-    subscription.position = event.params.tokenId;
-
-    subscription.save();
-    }
-    ```
+The Graph - `eventHandler.ts`
+
+```typescript
+export function handleSubscription(event: SubscriptionEvent): void {
+  const subscription = new Subscribe(event.transaction.hash + event.logIndex);
+
+  subscription.tokenId = event.params.tokenId;
+  subscription.address = event.params.subscriber.toHexString();
+  subscription.logIndex = event.logIndex;
+  subscription.blockNumber = event.block.number;
+  subscription.position = event.params.tokenId;
+
+  subscription.save();
+}
+```

15-15: Consider hyphenating compound modifier.

"developer friendly" should be hyphenated as "developer-friendly" when used as a compound modifier before a noun.

Based on static analysis hints

-Migrating Alchemy Subgraphs to Envio's HyperIndex is a simple and developer friendly process.
+Migrating Alchemy Subgraphs to Envio's HyperIndex is a simple and developer-friendly process.

20-20: Consider hyphenating compound modifier.

"High Speed Performance" should be hyphenated as "High-Speed Performance" when used as a compound modifier.

Based on static analysis hints

-- **High Speed Performance**: 143x faster than Subgraphs
+- **High-Speed Performance**: 143x faster than Subgraphs
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 44bb03b and 39d7220.

📒 Files selected for processing (2)
  • docs/HyperIndex/migrate-from-alchemy.md (1 hunks)
  • sidebarsHyperIndex.js (1 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/HyperIndex/migrate-from-alchemy.md

[grammar] ~15-~15: Use a hyphen to join words.
Context: ...o’s HyperIndex is a simple and developer friendly process. Alchemy Subgraphs foll...

(QB_NEW_EN_HYPHEN)


[grammar] ~20-~20: Use a hyphen to join words.
Context: ... Migrate to Envio’s HyperIndex? - High Speed Performance: 143x faster than Su...

(QB_NEW_EN_HYPHEN)

🪛 markdownlint-cli2 (0.18.1)
docs/HyperIndex/migrate-from-alchemy.md

146-146: Code block style
Expected: fenced; Actual: indented

(MD046, code-block-style)

Start by spinning up a basic HyperIndex project with this command:

```bash
pnpx envio init template --name alchemy-migration --directory alchemy-migration --template greeter --api-token "YOUR_ENVIO_API_KEY"
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Remove extra space in command.

There's an extra space between "greeter" and "--api-token".

Apply this diff:

-pnpx envio init template --name alchemy-migration --directory alchemy-migration --template  greeter --api-token "YOUR_ENVIO_API_KEY"
+pnpx envio init template --name alchemy-migration --directory alchemy-migration --template greeter --api-token "YOUR_ENVIO_API_KEY"
📝 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.

Suggested change
pnpx envio init template --name alchemy-migration --directory alchemy-migration --template greeter --api-token "YOUR_ENVIO_API_KEY"
pnpx envio init template --name alchemy-migration --directory alchemy-migration --template greeter --api-token "YOUR_ENVIO_API_KEY"
🤖 Prompt for AI Agents
In docs/HyperIndex/migrate-from-alchemy.md around line 45, the CLI command
contains an extra space between the template name "greeter" and the
"--api-token" flag; remove that extra space so the flag is directly after the
template name (i.e., change "... --template  greeter --api-token ..." to "...
--template greeter --api-token ...").

Comment on lines +56 to +112
<div className="row">
<div className="col col--6">
The Graph - `subgraph.yaml`
```yaml
specVersion: 0.0.4
description: Uniswap is a decentralized protocol for automated token exchange on Ethereum.
repository: https://github.com/Uniswap/v4-subgraph
schema:
file: ./schema.graphql
features:
- nonFatalErrors
- grafting
- kind: ethereum/contract
name: PositionManager
network: mainnet
source:
abi: PositionManager
address: "0xbD216513d74C8cf14cf4747E6AaA6420FF64ee9e"
startBlock: 21689089
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
file: ./src/mappings/index.ts
entities:
- Position
abis:
- name: PositionManager
file: ./abis/PositionManager.json
eventHandlers:
- event: Subscription(indexed uint256,indexed address)
handler: handleSubscription
- event: Unsubscription(indexed uint256,indexed address)
handler: handleUnsubscription
- event: Transfer(indexed address,indexed address,indexed uint256)
handler: handleTransfer
```
</div>
<div className="col col--6">
HyperIndex - `config.yaml`
```yaml
# yaml-language-server: $schema=./node_modules/envio/evm.schema.json
name: uni-v4-indexer
networks:
- id: 1
start_block: 21689089
contracts:
- name: PositionManager
address: 0xbD216513d74C8cf14cf4747E6AaA6420FF64ee9e
handler: src/EventHandlers.ts
events:
- event: Subscription(uint256 indexed tokenId, address indexed subscriber)
- event: Unsubscription(uint256 indexed tokenId, address indexed subscriber)
- event: Transfer(address indexed from, address indexed to, uint256 indexed id)
```
</div>
</div>
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix code block formatting in side-by-side comparison.

The code blocks in both columns have formatting issues. Lines 92 and 110 show closing backticks that appear misaligned. Ensure proper indentation and formatting for the markdown code blocks.

Based on static analysis hints

The closing code block markers should be properly indented to match the column structure:

         - event: Transfer(indexed address,indexed address,indexed uint256)
           handler: handleTransfer  
-          ```
+```
 </div>

And similarly for line 110:

         - event: Transfer(address indexed from, address indexed to, uint256 indexed id)
-          ```
+```
 </div>
🤖 Prompt for AI Agents
In docs/HyperIndex/migrate-from-alchemy.md around lines 56 to 112, the Markdown
code blocks inside the two side-by-side columns have their closing
triple-backtick markers misaligned (the closing backticks are placed inline with
the closing divs), which breaks rendering; move each closing ``` to its own line
immediately after the code block content and before the closing </div>, ensuring
the backticks are at the same indentation level as the opening backticks and
separated by a newline so each column's code block is properly closed.

<div className="col col--6">
HyperIndex - `eventHandler.ts`
```typescript
PoolManager.Subscription.handler( async (event, context) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix contract name inconsistency.

The event handler uses PoolManager.Subscription.handler but the configuration example above uses PositionManager as the contract name. This inconsistency may confuse readers.

Apply this diff to match the config example:

-    PoolManager.Subscription.handler( async (event, context) => {
+    PositionManager.Subscription.handler( async (event, context) => {
📝 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.

Suggested change
PoolManager.Subscription.handler( async (event, context) => {
PositionManager.Subscription.handler( async (event, context) => {
🤖 Prompt for AI Agents
In docs/HyperIndex/migrate-from-alchemy.md around line 164, update the event
handler to match the config example: replace the incorrect
PoolManager.Subscription.handler usage with PositionManager.Subscription.handler
so the contract name is consistent with the configuration shown above; ensure
any surrounding references to the contract name in nearby code examples are also
adjusted to PositionManager if needed.

Comment on lines 44 to +50
"migration-guide",
{
type: "category",
label: "Migration",
collapsed: false,
items: ["migration-guide", "migrate-from-alchemy"],
},
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Remove duplicate "migration-guide" entry.

The migration-guide appears twice in the sidebar: once as a standalone item on line 44 and again inside the Migration category on line 49. This creates duplicate navigation entries.

Apply this diff to remove the duplicate:

-    "migration-guide",
     {
       type: "category",
       label: "Migration",
📝 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.

Suggested change
"migration-guide",
{
type: "category",
label: "Migration",
collapsed: false,
items: ["migration-guide", "migrate-from-alchemy"],
},
{
type: "category",
label: "Migration",
collapsed: false,
items: ["migration-guide", "migrate-from-alchemy"],
},
🤖 Prompt for AI Agents
In sidebarsHyperIndex.js around lines 44 to 50, there is a duplicate
"migration-guide" entry appearing once as a standalone item and again inside the
"Migration" category; remove the standalone "migration-guide" line (the first
occurrence) so it only appears once inside the Migration category to eliminate
the duplicate sidebar entry.

@Jordy-Baby Jordy-Baby merged commit 7c2d0c3 into main Nov 21, 2025
1 of 3 checks passed
@Jordy-Baby Jordy-Baby deleted the nb/alchemy-migration-guide branch November 21, 2025 15:11
@coderabbitai coderabbitai bot mentioned this pull request Dec 18, 2025
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