Skip to content

Add HyperIndex v2/v3 documentation versioning with migration notices#904

Closed
DZakh wants to merge 5 commits into
mainfrom
claude/investigate-doc-versioning-66hsG
Closed

Add HyperIndex v2/v3 documentation versioning with migration notices#904
DZakh wants to merge 5 commits into
mainfrom
claude/investigate-doc-versioning-66hsG

Conversation

@DZakh
Copy link
Copy Markdown
Member

@DZakh DZakh commented May 5, 2026

Summary

This PR implements documentation versioning for HyperIndex by setting up parallel v2 and v3 documentation instances with version-aware admonitions to guide users between versions.

Key Changes

  • New Layout Wrapper: Created src/theme/DocItem/Layout/index.js that wraps the default DocItem layout and displays context-aware admonitions based on the active documentation plugin

    • v2 docs show a warning admonition encouraging migration to v3 with a link to the migration guide
    • v3 docs show an info admonition indicating it's the current version with links to v2 docs and migration guide
  • Documentation Plugin Configuration: Added a new Docusaurus plugin instance (HyperIndexV2) in docusaurus.config.js to serve v2 documentation at /docs/HyperIndex/v2 route while keeping v3 at /docs/HyperIndex

  • Navigation Update: Added a dropdown menu in the navbar with version selection options (v3 current and v2) for easy switching between documentation versions

  • Cleanup: Removed HyperIndex_versions.json as it's no longer needed with the new plugin-based versioning approach

Implementation Details

  • Uses useActivePlugin() hook to detect which documentation version is currently being viewed
  • Conditionally renders admonitions based on pluginId matching ('HyperIndexV2' for v2, 'HyperIndex' for v3)
  • Both documentation instances share the same sidebar configuration (sidebarsHyperIndex.js)
  • Maintains consistent edit URLs and metadata display settings across both versions

https://claude.ai/code/session_01X1gJw5Nc1V8BUYWqSm34hJ

Summary by CodeRabbit

  • Documentation
    • Added comprehensive HyperIndex V2/V3 documentation suite including architecture guides, configuration references, event handlers, and performance optimization strategies.
    • Expanded supported networks documentation covering 100+ EVM and alternative chain networks.
    • Added tutorials for common indexing scenarios (ERC20 transfers, Uniswap, price data, cross-chain messaging).
    • Included guides for deployment, hosting, monitoring, troubleshooting, and migration from competing indexing platforms.
    • Added Fuel and Solana experimental support documentation.

Add a second @docusaurus/plugin-content-docs instance (HyperIndexV2)
that mounts docs/HyperIndex at /docs/HyperIndex/v2, alongside the
existing v3 mount at /docs/HyperIndex. Both versions share the same
source content for now.

Add a navbar dropdown to switch between v3 and v2, and swizzle
@theme/DocItem/Layout to render version-specific banners pointing
users at the migration guide.

Drop the stale HyperIndex_versions.json — native Docusaurus versioning
is not used.
@vercel
Copy link
Copy Markdown

vercel Bot commented May 5, 2026

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

Project Deployment Actions Updated (UTC)
envio-docs Ready Ready Preview, Comment May 5, 2026 1:58pm

Request Review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 5, 2026

📝 Walkthrough

Walkthrough

This PR introduces comprehensive HyperIndex V2 documentation covering guides, advanced features, tutorials, examples, hosting/deployment, troubleshooting, migration paths, and ~110 supported networks. Removes an outdated version entry and adds CSS styling for tooltips.

Changes

HyperIndex V2 Documentation Suite

Layer / File(s) Summary
Foundation & Concepts
docs/HyperIndexV2/overview.md, docs/HyperIndexV2/getting-started.md, docs/HyperIndexV2/Advanced/terminology.md, docs/HyperIndexV2/licensing.md, docs/HyperIndexV2/privacy-policy.md
Overview, getting-started, terminology glossary, licensing EULA, and privacy policy establish HyperIndex identity and legal framework.
Core Guides & Configuration
docs/HyperIndexV2/Guides/configuration-file.mdx, docs/HyperIndexV2/Guides/schema-file.md, docs/HyperIndexV2/Guides/event-handlers.mdx, docs/HyperIndexV2/Guides/running-locally.md, docs/HyperIndexV2/Guides/environment-variables.md
Configuration, schema definition, event handler registration, local execution, and environment setup for building indexers.
Advanced Features
docs/HyperIndexV2/Advanced/effect-api.md, docs/HyperIndexV2/Advanced/preload-optimization.md, docs/HyperIndexV2/Advanced/dynamic-contracts.md, docs/HyperIndexV2/Advanced/wildcard-indexing.mdx, docs/HyperIndexV2/Advanced/query-conversion.md, docs/HyperIndexV2/Advanced/reorgs-support.md, docs/HyperIndexV2/Advanced/config-schema-reference.md, docs/HyperIndexV2/Advanced/* (15+ files)
Effect API, preload optimization, dynamic contracts, wildcard/topic filtering, query conversion, reorg handling, metadata queries, generated files, HyperSync/RPC configuration, and terminology for advanced use cases.
Performance & Data Access
docs/HyperIndexV2/Guides/contract-state.md, docs/HyperIndexV2/Guides/ipfs.md, docs/HyperIndexV2/Advanced/performance/* (5 files), docs/HyperIndexV2/Advanced/loaders.md
Contract state fetching, IPFS integration, benchmarking, database optimization, historical sync, and latency tuning.
Tooling & Integration
docs/HyperIndexV2/Guides/cli-commands.md, docs/HyperIndexV2/Guides/mcp-server.md, docs/HyperIndexV2/Guides/navigating-hasura.md, docs/HyperIndexV2/Guides/testing.mdx
CLI reference, MCP server integration, Hasura navigation, and testing framework documentation.
Learning Path: Tutorials
docs/HyperIndexV2/Tutorials/greeter-tutorial.md, docs/HyperIndexV2/Tutorials/tutorial-erc20-token-transfers.md, docs/HyperIndexV2/Tutorials/tutorial-op-bridge-deposits.md, docs/HyperIndexV2/Tutorials/tutorial-indexing-fuel.md, docs/HyperIndexV2/Tutorials/price-data.md, docs/HyperIndexV2/Tutorials/tutorial-scaffold-eth-2.md
Step-by-step tutorials for building multichain, cross-chain, Fuel, price-feed, and Scaffold-Eth indexers.
Learning Path: Examples
docs/HyperIndexV2/Examples/example-*.md (7 files)
Reference implementations for Velodrome, ENS, cross-chain messaging, liquidation metrics, Sablier, and Uniswap V4 indexing.
Hosted Service & Deployment
docs/HyperIndexV2/Hosted_Service/hosted-service.md, docs/HyperIndexV2/Hosted_Service/hosted-service-deployment.md, docs/HyperIndexV2/Hosted_Service/hosted-service-features.md, docs/HyperIndexV2/Hosted_Service/hosted-service-billing.mdx, docs/HyperIndexV2/Hosted_Service/hosted-service-monitoring.md, docs/HyperIndexV2/Hosted_Service/envio-cloud-cli.md, docs/HyperIndexV2/Hosted_Service/organisation-setup.md, docs/HyperIndexV2/Hosted_Service/self-hosting.md, docs/HyperIndexV2/Hosted_Service/style.css
Managed hosting overview, Git-based deployment, features (alerts, caching, IP whitelisting), pricing, monitoring dashboards, Envio Cloud CLI, organization setup, and self-hosting guidance.
Troubleshooting & Reference
docs/HyperIndexV2/Troubleshoot/common-issues.md, docs/HyperIndexV2/Troubleshoot/error-codes.md, docs/HyperIndexV2/Troubleshoot/logging.mdx, docs/HyperIndexV2/Troubleshoot/reserved-words.md
Common issues, comprehensive error code catalog, logging configuration, and reserved-word resolution.
Migration Paths
docs/HyperIndexV2/migration-guide.md, docs/HyperIndexV2/migrate-from-alchemy.md, docs/HyperIndexV2/migrate-from-ponder.md, docs/HyperIndexV2/migrate-to-v3.md, docs/HyperIndexV2/migrate-with-ai.md, docs/HyperIndexV2/quickstart-with-ai.md
High-level migration framework, step-by-step guides from The Graph (Alchemy) and Ponder, V2→V3 breaking changes, and AI-assisted workflows.
Blockchain-Specific Support
docs/HyperIndexV2/fuel/fuel.md, docs/HyperIndexV2/solana/solana.md, docs/HyperIndexV2/benchmarks.md, docs/HyperIndexV2/contract-import.md
Fuel Network event types and HyperFuel API, Solana slot handlers (experimental), performance benchmarks, and contract-import quickstart.
Supported Networks
docs/HyperIndexV2/supported-networks/*.md (~110 files)
Per-chain documentation for 110+ EVM and non-EVM networks, listing HyperSync/HyperRPC endpoints, tier classification, YAML configuration templates, and RPC guidance.
Infrastructure & Cleanup
HyperIndex_versions.json (removed "v1" entry)
Removed outdated version reference.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~20 minutes

Rationale: ~190+ files added, but highly homogeneous (110+ supported networks follow identical YAML templates, guides share consistent structure). Primary concern is pattern consistency, content quality, and structural coherence rather than code logic. Spot-checking network pages, validating advanced guides accuracy, and verifying migration guide completeness are the key review areas.

Possibly related PRs

  • enviodev/docs#743: Adds supported-networks/ab.md and related network documentation structure—directly related to the 110+ supported-networks pages in this PR.
  • enviodev/docs#735: Adds HyperIndex V3 migration documentation and testing framework—overlaps with migrate-to-v3.md and testing.mdx in this PR.
  • enviodev/docs#760: Adds effect-api and preload-optimization advanced guides—directly related to the Effect API and preload docs in this PR.

Suggested labels

documentation, guides, tutorials, migration

Suggested reviewers

  • moose-code
  • DenhamPreen

Poem

🐰 From config to networks, a garden now grows,
With tutorials, guides, and migration flows!
Effect APIs bloom, and Solana's in sight,
Our docs hop through blockchains—faster than light! 🥕✨

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/investigate-doc-versioning-66hsG

Copy link
Copy Markdown
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: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docusaurus.config.js`:
- Around line 619-621: The HyperIndexV2 plugin is pointing to the same content
as v3 because it uses path: "docs/HyperIndex"; create a separate v2 docs
directory (e.g., docs/HyperIndexV2/), move or add v2-specific markdown there,
update the HyperIndexV2 plugin configuration to use path: "docs/HyperIndexV2"
(keeping id: "HyperIndexV2" and routeBasePath: "docs/HyperIndex/v2"), and add or
update the v2 sidebar file referenced by the plugin so the sidebar reflects the
v2 doc structure.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 5666489b-3f1a-4de8-a906-df1209661efc

📥 Commits

Reviewing files that changed from the base of the PR and between 5f58115 and c56e013.

📒 Files selected for processing (3)
  • HyperIndex_versions.json
  • docusaurus.config.js
  • src/theme/DocItem/Layout/index.js
💤 Files with no reviewable changes (1)
  • HyperIndex_versions.json

Comment thread docusaurus.config.js Outdated
Three fixes after the initial commit failed Vercel:

1. Drop disableVersioning:true on both HyperIndex plugins — that flag
   is invalid once HyperIndex_versions.json is gone.

2. The two plugin instances cannot share the same path (webpack tries
   to apply two MDX loader pipelines to the same file and chokes with
   ~300 "Unexpected FunctionDeclaration" errors). Add a
   docs/HyperIndexV2 symlink to docs/HyperIndex and point the v2
   plugin at it — single source, distinct webpack module path.

3. Move v2 from /docs/HyperIndex/v2/* to /docs/v2/HyperIndex/* so the
   route depth matches v3. Existing relative links like
   ../HyperIndex/getting-started now resolve within v2 instead of
   leaking back into v3.

Banner link and navbar dropdown updated to match.
Per request, v2 is now a physical copy of docs/HyperIndex rather
than a symlink. Two adjustments needed for the build to stay green:

- Rewrite /docs/HyperIndex/ absolute links inside the copy to
  /docs/v2/HyperIndex/ so v2 pages reference v2 routes.

- Three absolute .md links target pages that use a frontmatter
  `slug:` to flatten their URL (Advanced/hypersync.md -> /hypersync,
  Advanced/rpc-sync.md -> /rpc-sync, fuel/fuel.md -> /fuel).
  Docusaurus' linkify doesn't rewrite these absolute paths in the
  v2 plugin context, so point them directly at the slug-based route.
Copy link
Copy Markdown
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: 10

Note

Due to the large number of review comments, Critical, Major severity comments were prioritized as inline comments.

♻️ Duplicate comments (8)
docs/HyperIndexV2/Advanced/hypersync.md (1)

85-89: ⚠️ Potential issue | 🔴 Critical

Incorrect route path in internal documentation links.

Lines 85 and 89 use the pattern /docs/v2/HyperIndex/..., which appears inconsistent with the PR's stated route configuration where v2 docs are served at /docs/HyperIndex/v2. This is the same link pattern issue identified in arbitrum-sepolia.md.

Please refer to the verification script in the previous comment on arbitrum-sepolia.md to confirm and fix all instances of this pattern.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/HyperIndexV2/Advanced/hypersync.md` around lines 85 - 89, The two
internal links '/docs/v2/HyperIndex/rpc-sync' and
'/docs/v2/HyperIndex/rpc-sync#improving-resilience-with-rpc-fallback' in
hypersync.md are using the wrong route pattern; update both to use the v2-first
pattern '/docs/HyperIndex/v2/rpc-sync' and
'/docs/HyperIndex/v2/rpc-sync#improving-resilience-with-rpc-fallback'
respectively, and re-run the same verification script you used for
arbitrum-sepolia.md to scan the file for any other '/docs/v2/HyperIndex/...'
occurrences and fix them.
docs/HyperIndexV2/Advanced/multichain-indexing.mdx (1)

31-31: ⚠️ Potential issue | 🔴 Critical

Incorrect route path in internal documentation links.

Lines 31, 200, and 201 use the pattern /docs/v2/HyperIndex/..., which appears inconsistent with the PR's stated route configuration. This is the same link pattern issue identified throughout the v2 documentation files.

Please refer to the verification script in the earlier comment on arbitrum-sepolia.md to confirm and fix all instances of this pattern.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/HyperIndexV2/Advanced/multichain-indexing.mdx` at line 31, Update all
internal docs links that use the incorrect pattern "/docs/v2/HyperIndex/..." in
this file (e.g., the link shown on line 31) to match the project's configured
route for HyperIndex V2 (use the canonical base route used in the PR's route
configuration), and run the verification script referenced in the
arbitrum-sepolia.md comment to find and fix any other occurrences (search for
the string "/docs/v2/HyperIndex/" and replace with the correct base route from
the PR).
docs/HyperIndexV2/Guides/ipfs.md (1)

124-126: ⚠️ Potential issue | 🔴 Critical

Incorrect route path in internal documentation links.

Lines 124, 126, 280, and 304 use the pattern /docs/v2/HyperIndex/..., which appears inconsistent with the PR's stated route configuration. This is the same link pattern issue identified in previous files.

Please refer to the verification script in the earlier comment on arbitrum-sepolia.md to confirm and fix all instances of this pattern throughout the v2 documentation.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/HyperIndexV2/Guides/ipfs.md` around lines 124 - 126, Several internal
doc links use the wrong route prefix "/docs/v2/HyperIndex/"; update every
occurrence to match the PR's configured route prefix (replace
"/docs/v2/HyperIndex/" with the correct route used by the PR, e.g.
"/docs/v2/hyperindex/") in the affected markdown (including the ipfs.md
instances) and re-run the verification script referenced in the earlier comment
to ensure no other v2 docs still contain the old pattern.
docs/HyperIndexV2/Advanced/preload-optimization.md (1)

15-15: ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Critical: Incorrect documentation link path.

This link and several others in this file (lines 21, 37, 100, 140, 168, 197) use the pattern /docs/v2/HyperIndex/ when they should use /docs/HyperIndex/v2/ according to the PR objectives. All internal v2 links throughout this file need to be corrected.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/HyperIndexV2/Advanced/preload-optimization.md` at line 15, Several
internal links in this doc use the wrong path segment order; replace every
occurrence of the pattern "/docs/v2/HyperIndex/" with "/docs/HyperIndex/v2/"
(notably the instances referenced at lines 21, 37, 100, 140, 168, 197) and scan
the entire file "preload-optimization.md" to correct any other internal v2 links
to the "/docs/HyperIndex/v2/" form so all hyperlinks follow the PR objective.
docs/HyperIndexV2/Advanced/reorgs-support.md (1)

78-78: ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Critical: Incorrect documentation link path.

Same issue as line 74. This link uses /docs/v2/HyperIndex/rpc-sync but should be /docs/HyperIndex/v2/rpc-sync based on the PR objectives stating v2 docs are at /docs/HyperIndex/v2.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/HyperIndexV2/Advanced/reorgs-support.md` at line 78, Update the
incorrect documentation link path: replace the broken string
'/docs/v2/HyperIndex/rpc-sync' with the correct path
'/docs/HyperIndex/v2/rpc-sync' in the
docs/HyperIndexV2/Advanced/reorgs-support.md content (look for the exact link
text "custom RPC endpoint" referencing '/docs/v2/HyperIndex/rpc-sync'); ensure
any other occurrences in the same file use the corrected
'/docs/HyperIndex/v2/rpc-sync' form.
docs/HyperIndexV2/Troubleshoot/common-issues.md (1)

166-312: ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Critical: Multiple incorrect documentation link paths.

Multiple links throughout this file use the pattern /docs/v2/HyperIndex/ (e.g., lines 166, 197, 232, 307, 309, 312) when they should use /docs/HyperIndex/v2/ according to the PR objectives. This affects references to hypersync.md, performance/index.md, websockets.md, dynamic-contracts.md, and reorgs-support.md. All need to be corrected for the links to work correctly.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/HyperIndexV2/Troubleshoot/common-issues.md` around lines 166 - 312, The
doc contains broken links using the wrong base path
"/docs/v2/HyperIndex/"—update every link in this file that points to
hypersync.md, performance/index.md, websockets.md, dynamic-contracts.md, and
reorgs-support.md to use the correct base "/docs/HyperIndex/v2/" (e.g., replace
"/docs/v2/HyperIndex/Advanced/hypersync.md" with
"/docs/HyperIndex/v2/Advanced/hypersync.md"), ensuring all occurrences in this
document are replaced so the references (hypersync.md, performance/index.md,
websockets.md, dynamic-contracts.md, reorgs-support.md) resolve correctly.
docs/HyperIndexV2/Guides/contract-state.md (1)

19-20: ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Critical: Incorrect documentation link paths.

These links and others in this file (lines 114, 116, 299) use /docs/v2/HyperIndex/ when they should use /docs/HyperIndex/v2/ according to the PR objectives. All need to be corrected.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/HyperIndexV2/Guides/contract-state.md` around lines 19 - 20, The
documentation uses incorrect link paths like the ones for "Preload Optimisation"
and "Effect API" that point to /docs/v2/HyperIndex/; update these links (and the
other occurrences around the mentions at the file locations referenced, e.g.,
the "Preload Optimisation" and "Effect API" link entries and the links at lines
near 114, 116, 299) to use the correct path format /docs/HyperIndex/v2/ so all
internal references in contract-state.md consistently use /docs/HyperIndex/v2/.
docs/HyperIndexV2/Guides/block-handlers.md (1)

50-50: ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Critical: Incorrect documentation link paths throughout file.

This link and multiple others in this file (lines 58, 59, 188, 189, 190) use the pattern /docs/v2/HyperIndex/ when they should use /docs/HyperIndex/v2/ according to the PR objectives. All internal v2 documentation links need to be corrected to match the actual routing configuration.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/HyperIndexV2/Guides/block-handlers.md` at line 50, Update all internal
v2 docs links in this file that use the incorrect path pattern
"/docs/v2/HyperIndex/..." to the correct routing "/docs/HyperIndex/v2/...".
Specifically search for link occurrences similar to the one shown (e.g., the
"Preload Optimization" link and the other links referenced around lines 58, 59,
188–190) and replace the prefix order so the path is
"/docs/HyperIndex/v2/<page>" throughout the document; verify each replaced link
resolves to the correct target and keep link text unchanged.
🟡 Minor comments (24)
docs/HyperIndexV2/licensing.md-11-11 (1)

11-11: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Hyphenate “open-source” when used adjectivally.

Use “open-source” in “open-source ethos” and “open-source license” for correct compound-adjective usage and cleaner docs quality.

Also applies to: 19-19

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/HyperIndexV2/licensing.md` at line 11, Replace the adjective usages of
"open source" with the hyphenated form "open-source" in the documentation where
it modifies a noun, specifically update occurrences like the phrase "open source
ethos" and any "open source license" instances so they read "open-source ethos"
and "open-source license"; search the file for the exact strings "open source
ethos" and "open source license" (and other "open source" adjectival uses) and
update them to the hyphenated form.
docs/HyperIndexV2/Guides/mcp-server.md-15-17 (1)

15-17: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Add a language identifier to the fenced code block (Line 15).

This fenced block is missing a language tag, which triggers markdown lint rule MD040.

Suggested fix
-```
+```text
 https://docs.envio.dev/mcp
</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @docs/HyperIndexV2/Guides/mcp-server.md around lines 15 - 17, The fenced code
block containing the URL "https://docs.envio.dev/mcp" is missing a language
identifier which triggers markdown lint MD040; fix it by updating the opening
fence from totext (i.e., add the "text" language tag) so the block
becomes a labeled plaintext code block and satisfies the linter.


</details>

</blockquote></details>
<details>
<summary>docs/HyperIndexV2/Advanced/terminology.md-172-172 (1)</summary><blockquote>

`172-172`: _⚠️ Potential issue_ | _🟡 Minor_ | _⚡ Quick win_

**Fix malformed Markdown emphasis in multiplication example.**

`2 _ 3` is parsed as emphasis markers (MD037) and renders incorrectly. Use `2 * 3` (or `2 × 3`) instead.
 

<details>
<summary>Suggested diff</summary>

```diff
-2. **Multiplication**: 2 _ 3 = 3 _ 2
+2. **Multiplication**: 2 * 3 = 3 * 2
```
</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

```
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/HyperIndexV2/Advanced/terminology.md` at line 172, The Markdown line "2
_ 3 = 3 _ 2" uses underscores that trigger emphasis; update the multiplication
example in the terminology doc by replacing "2 _ 3 = 3 _ 2" with a non-emphasis
form such as "2 * 3 = 3 * 2" or "2 × 3 = 3 × 2" so the multiplication renders
correctly (look for the exact string "2 _ 3 = 3 _ 2" to locate the change).
```

</details>

</blockquote></details>
<details>
<summary>docs/HyperIndexV2/privacy-policy.md-123-124 (1)</summary><blockquote>

`123-124`: _⚠️ Potential issue_ | _🟡 Minor_ | _⚡ Quick win_

**Replace the plain “Cookies Policy” mention with an actual link (or remove it).**

The text directs users to a Cookies Policy but doesn’t provide a navigable URL, which is a dead-end in a legal document.

<details>
<summary>🤖 Prompt for AI Agents</summary>

```
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/HyperIndexV2/privacy-policy.md` around lines 123 - 124, Replace the
plain "Cookies Policy" mention with an actual navigable URL or remove the
reference: locate the sentence containing the text "Cookies Policy" and either
change it to a Markdown link like [Cookies
Policy](https://yourdomain.example/cookies) (or the correct canonical
cookies-policy URL) or remove the phrase and adjust punctuation so the sentence
reads correctly; ensure the same change is applied to "the Cookies section of
our Privacy Policy" if it also lacks a link.
```

</details>

</blockquote></details>
<details>
<summary>docs/HyperIndexV2/privacy-policy.md-188-197 (1)</summary><blockquote>

`188-197`: _⚠️ Potential issue_ | _🟡 Minor_ | _⚡ Quick win_

**Fix section structure under “Other legal requirements.”**

`### Comply with a legal obligation` is formatted as a heading, while the remaining items are plain lines; `Security of Your Personal Data` also appears as body text. Convert these to a consistent list + heading structure so navigation and readability are preserved.
 
<details>
<summary>Proposed markdown structure</summary>

```diff
 ### Other legal requirements

 The Company may disclose Your Personal Data in the good faith belief that such action is necessary to:

-### Comply with a legal obligation
-
-Protect and defend the rights or property of the Company
-Prevent or investigate possible wrongdoing in connection with the Service
-Protect the personal safety of Users of the Service or the public
-Protect against legal liability
-Security of Your Personal Data
+- Comply with a legal obligation
+- Protect and defend the rights or property of the Company
+- Prevent or investigate possible wrongdoing in connection with the Service
+- Protect the personal safety of Users of the Service or the public
+- Protect against legal liability
+
+### Security of Your Personal Data
```
</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

```
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/HyperIndexV2/privacy-policy.md` around lines 188 - 197, The "Other legal
requirements" section mixes a heading ("Comply with a legal obligation") with
several plain lines and a stray "Security of Your Personal Data" line; update
the markdown so "Comply with a legal obligation" remains a heading (e.g., "###
Comply with a legal obligation") and convert the following items ("Protect and
defend the rights or property of the Company", "Prevent or investigate possible
wrongdoing in connection with the Service", "Protect the personal safety of
Users of the Service or the public", "Protect against legal liability") into a
bulleted list under that heading, then add a separate heading for "Security of
Your Personal Data" (e.g., "### Security of Your Personal Data") with its
paragraph below; locate and edit the section containing those exact phrases to
apply these structural changes.
```

</details>

</blockquote></details>
<details>
<summary>docs/HyperIndexV2/Tutorials/price-data.md-286-286 (1)</summary><blockquote>

`286-286`: _⚠️ Potential issue_ | _🟡 Minor_ | _⚡ Quick win_

**Fix typo: "depositedOrcale" should be "depositedOracle".**

The field name contains a typo that appears consistently throughout the schema (line 286), event handler code (lines 352, 364, 365, 367), and GraphQL query (line 405). While the typo is used consistently, it should be corrected for clarity and professionalism.




<details>
<summary>📝 Proposed fix for the typo</summary>

**In the schema (line 286):**
```diff
-  depositedOrcale: Float!
+  depositedOracle: Float!
```

**In the event handler (lines 352, 364):**
```diff
-  const ethDepositedUsdOrcale =
+  const ethDepositedUsdOracle =
     (latestOraclePrice * Number(event.params.amount1)) / 10 ** 18;

   const EthDeposited: EthDeposited = {
     id: `${event.chainId}-${event.block.number}-${event.logIndex}`,
     timestamp: event.block.timestamp,
     block: event.block.number,
     oraclePrice: round(latestOraclePrice),
     poolPrice: round(latestPoolPrice),
     offChainPrice: round(offChainPrice),
     depositedPool: round(ethDepositedUsdPool),
     depositedOffchain: round(ethDepositedUsdOffchain),
-    depositedOrcale: round(ethDepositedUsdOrcale),
+    depositedOracle: round(ethDepositedUsdOracle),
     offchainOracleDiff: round(
-      ((ethDepositedUsdOffchain - ethDepositedUsdOrcale) /
+      ((ethDepositedUsdOffchain - ethDepositedUsdOracle) /
         ethDepositedUsdOffchain) *
         100
     ),
```

**In the query (line 405):**
```diff
-    depositedOrcale
+    depositedOracle
```
</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

```
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/HyperIndexV2/Tutorials/price-data.md` at line 286, Fix the consistent
typo "depositedOrcale" to "depositedOracle" across the schema and all usages:
rename the GraphQL schema field depositedOrcale -> depositedOracle, update any
event handler variables/assignments that reference depositedOrcale (e.g., in the
event handler functions that set or read that field), and update the GraphQL
query that requests depositedOrcale to request depositedOracle instead; ensure
you update all occurrences (schema, event handler code, and query) and adjust
any internal variable names or mappings so the field name matches everywhere.
```

</details>

</blockquote></details>
<details>
<summary>docs/HyperIndexV2/migrate-with-ai.md-95-95 (1)</summary><blockquote>

`95-95`: _⚠️ Potential issue_ | _🟡 Minor_ | _⚡ Quick win_

**Hyphenate compound adjective.**

The phrase "step by step conversion" should use a hyphen when the compound adjective modifies a noun.




<details>
<summary>✏️ Suggested fix</summary>

```diff
-For a detailed manual migration guide covering the step by step conversion of subgraph.yaml, schema, and event handlers, see [Migrate from The Graph](./migration-guide).
+For a detailed manual migration guide covering the step-by-step conversion of subgraph.yaml, schema, and event handlers, see [Migrate from The Graph](./migration-guide).
```
</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

```
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/HyperIndexV2/migrate-with-ai.md` at line 95, Replace the phrase "step by
step conversion" in the sentence containing the link to "Migrate from The Graph"
with the hyphenated compound adjective "step-by-step conversion" so the text
reads "...covering the step-by-step conversion of subgraph.yaml, schema, and
event handlers..." to correct compound adjective usage.
```

</details>

</blockquote></details>
<details>
<summary>docs/HyperIndexV2/Examples/example-liquidation-metrics.md-36-36 (1)</summary><blockquote>

`36-36`: _⚠️ Potential issue_ | _🟡 Minor_ | _⚡ Quick win_

**Use a descriptive link text instead of "here".**

The link text "here" is non-descriptive and should be replaced with meaningful text like "getting started prerequisites". The current link destination is correct as both v2 and v3 documentation share the same slug and resolve to the same page.

<details>
<summary>🔗 Suggested fix</summary>

```diff
-2. Install any other pre-requisite packages for Envio listed [here](https://docs.envio.dev/docs/HyperIndex/getting-started#prerequisites)
+2. Install any other pre-requisite packages for Envio listed in the [getting started prerequisites](https://docs.envio.dev/docs/HyperIndex/getting-started#prerequisites)
```

</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

```
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/HyperIndexV2/Examples/example-liquidation-metrics.md` at line 36,
Replace the non-descriptive link text "here" in the markdown line that links to
the Envio getting-started prerequisites with a meaningful label such as "getting
started prerequisites" (i.e., change the link
[here](https://docs.envio.dev/docs/HyperIndex/getting-started#prerequisites) to
[getting started
prerequisites](https://docs.envio.dev/docs/HyperIndex/getting-started#prerequisites));
ensure the destination URL remains unchanged and update any nearby references if
duplicated.
```

</details>

</blockquote></details>
<details>
<summary>docs/HyperIndexV2/Advanced/metadata-query.md-65-65 (1)</summary><blockquote>

`65-65`: _⚠️ Potential issue_ | _🟡 Minor_ | _⚡ Quick win_

**Fix typo in usage description.**

“actuall” should be “actual”.

 

<details>
<summary>Suggested patch</summary>

```diff
-... before querying actuall data ...
+... before querying actual data ...
```
</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

```
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/HyperIndexV2/Advanced/metadata-query.md` at line 65, Fix the typo in the
usage description: change the word "actuall" to "actual" in the sentence that
begins "You can use this query to track the indexing progress for each chain.
For example, wait until the block data is ready before querying actuall data..."
so the sentence reads "...before querying actual data...".
```

</details>

</blockquote></details>
<details>
<summary>docs/HyperIndexV2/Guides/cli-commands.md-14-14 (1)</summary><blockquote>

`14-14`: _⚠️ Potential issue_ | _🟡 Minor_ | _⚡ Quick win_

**Use canonical HyperIndex docs linking for Envio Cloud CLI.**

`/docs/v2/HyperIndex/envio-cloud-cli` doesn’t match the documented HyperIndex route convention; use a sibling doc link (or canonical HyperIndex path) to avoid redirect/breakage.

 

<details>
<summary>Suggested patch</summary>

```diff
-... **[Envio Cloud CLI](/docs/v2/HyperIndex/envio-cloud-cli)** ...
+... **[Envio Cloud CLI](../Hosted_Service/envio-cloud-cli.md)** ...
```
</details>

Based on learnings: in this repo, HyperIndex docs are mounted under `routeBasePath: "docs/HyperIndex"` and links should use canonical HyperIndex paths to avoid redirect hops.

<details>
<summary>🤖 Prompt for AI Agents</summary>

```
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/HyperIndexV2/Guides/cli-commands.md` at line 14, Replace the
non-canonical link "/docs/v2/HyperIndex/envio-cloud-cli" with the canonical
HyperIndex route (e.g. "/docs/HyperIndex/envio-cloud-cli") so the doc uses the
repo's routeBasePath; update the markdown string in the same sentence that
currently contains "/docs/v2/HyperIndex/envio-cloud-cli" to the canonical
sibling path.
```

</details>

</blockquote></details>
<details>
<summary>docs/HyperIndexV2/Hosted_Service/hosted-service-billing.mdx-46-46 (1)</summary><blockquote>

`46-46`: _⚠️ Potential issue_ | _🟡 Minor_ | _⚡ Quick win_

**Features link should use an explicit sibling doc path.**

`(hosted-service-features)` is ambiguous here; make it a concrete sibling-doc link to avoid route resolution issues.

 

<details>
<summary>Suggested patch</summary>

```diff
-For detailed feature explanations, see our [Features page](hosted-service-features).
+For detailed feature explanations, see our [Features page](./hosted-service-features.md).
```
</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

```
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/HyperIndexV2/Hosted_Service/hosted-service-billing.mdx` at line 46,
Replace the ambiguous markdown link target "(hosted-service-features)" with an
explicit sibling doc path such as "./hosted-service-features.mdx" in the
sentence that currently reads "For detailed feature explanations, see our
[Features page](hosted-service-features)"; update the link target so it points
to "./hosted-service-features.mdx" (or "hosted-service-features.mdx") to avoid
route resolution issues.
```

</details>

</blockquote></details>
<details>
<summary>docs/HyperIndexV2/Tutorials/greeter-tutorial.md-47-74 (1)</summary><blockquote>

`47-74`: _⚠️ Potential issue_ | _🟡 Minor_ | _⚡ Quick win_

**Specify fence language for CLI prompt transcripts.**

The unlabeled fenced blocks trip MD040; mark them as `text`.

 

<details>
<summary>Suggested patch</summary>

```diff
-```
+```text
 ? Set the directory: (.) .
 ```

-```
+```text
 ? Which language would you like to use?
 > JavaScript
   TypeScript
   ReScript
 ```

-```
+```text
 ? Choose an initialization option
 > Template
   Contract Import
 ```

-```
+```text
 ? Which template would you like to use?
 > Greeter
   Erc20
 ```
```
</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @docs/HyperIndexV2/Tutorials/greeter-tutorial.md around lines 47 - 74, The
fenced CLI transcript blocks in greeter-tutorial.md are unlabeled and trigger
MD040; update each unlabeled triple-backtick block that contains the CLI prompts
(the blocks starting with " ? Set the directory: (.) .", " ? Which language
would you like to use?", " ? Choose an initialization option", and " ? Which
template would you like to use?") to use a text fence label (```text) so the
code fences are properly annotated for markdown linting.


</details>

</blockquote></details>
<details>
<summary>docs/HyperIndexV2/supported-networks/b3-sepolia-testnet.md-14-30 (1)</summary><blockquote>

`14-30`: _⚠️ Potential issue_ | _🟡 Minor_ | _⚡ Quick win_

**RPC Sync links likely point to the wrong location.**

From this folder, `./rpc-sync` resolves under `supported-networks`; it should link to the Advanced RPC sync doc.

 

<details>
<summary>Suggested patch</summary>

```diff
-... We recommend [tweaking the RPC config](./rpc-sync) ...
+... We recommend [tweaking the RPC config](../Advanced/rpc-sync.md) ...

-You may need to adjust more parameters of the [rpc configuration](./rpc-sync) to support the specific rpc provider.
+You may need to adjust more parameters of the [rpc configuration](../Advanced/rpc-sync.md) to support the specific rpc provider.
```
</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

```
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/HyperIndexV2/supported-networks/b3-sepolia-testnet.md` around lines 14 -
30, The relative links to the RPC sync doc in b3-sepolia-testnet.md currently
use "./rpc-sync" which resolves inside supported-networks; update those link
targets to point to the Advanced RPC sync doc in the parent HyperIndexV2 folder
(replace "./rpc-sync" with "../rpc-sync" in the file) so the "rpc configuration"
and "tweaking the RPC config" links correctly open the Advanced RPC sync
documentation.
```

</details>

</blockquote></details>
<details>
<summary>docs/HyperIndexV2/Troubleshoot/reserved-words.md-90-130 (1)</summary><blockquote>

`90-130`: _⚠️ Potential issue_ | _🟡 Minor_ | _⚡ Quick win_

**Add explicit fence languages for the reserved-word lists.**

These fenced blocks are missing a language identifier and trigger MD040 warnings.

 

<details>
<summary>Suggested patch</summary>

```diff
-```
+```text
 abstract, arguments, await, boolean, break, byte, case, catch, char,
 class, const, continue, debugger, default, delete, do, double, else,
 enum, eval, export, extends, false, final, finally, float, for, function,
 goto, if, implements, import, in, instanceof, int, interface, let, long,
 native, new, null, package, private, protected, public, return, short,
 static, super, switch, synchronized, this, throw, throws, transient, true,
 try, typeof, var, void, volatile, while, with, yield
 ```

-```
+```text
 any, as, boolean, break, case, catch, class, const, constructor, continue,
 declare, default, delete, do, else, enum, export, extends, false, finally,
 for, from, function, get, if, implements, import, in, instanceof, interface,
 let, module, new, null, number, of, package, private, protected, public,
 require, return, set, static, string, super, switch, symbol, this, throw,
 true, try, type, typeof, var, void, while, with, yield
 ```

-```
+```text
 and, as, assert, constraint, else, exception, external, false, for, if, in,
 include, lazy, let, module, mutable, of, open, rec, switch, true, try, type,
 when, while, with
 ```

-```
+```text
 EVENT_TYPE
 CONTRACT_TYPE
 ```
```
</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @docs/HyperIndexV2/Troubleshoot/reserved-words.md around lines 90 - 130, The
fenced code blocks listing reserved words lack language identifiers (triggering
MD040); update each triple-backtick fence for the JavaScript, TypeScript,
ReScript and Envio internal types blocks to include a language tag (e.g.,

"TypeScript Reserved Words" block, the "ReScript Reserved Words" block, and the
"Envio Internal Reserved Types" block all start with ```text instead of bare
```; keep the existing content unchanged.
docs/HyperIndexV2/Advanced/dynamic-contracts.md-130-130 (1)

130-130: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Migration guide link should use canonical HyperIndex routing.

/docs/v2/HyperIndex/migration-guide is non-canonical for this docs setup; prefer a local doc link to keep routing stable.

Suggested patch
-For a step-by-step migration guide, see [Migrating from a Subgraph](/docs/v2/HyperIndex/migration-guide).
+For a step-by-step migration guide, see [Migrating from a Subgraph](../migration-guide.md).

Based on learnings: HyperIndex docs in this repo resolve under routeBasePath: "docs/HyperIndex" and canonical links should target that route structure.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/HyperIndexV2/Advanced/dynamic-contracts.md` at line 130, Replace the
non-canonical link "/docs/v2/HyperIndex/migration-guide" in the sentence "For a
step-by-step migration guide, see [Migrating from a
Subgraph](/docs/v2/HyperIndex/migration-guide)." with the canonical HyperIndex
route (use the repo's routeBasePath), e.g. target
"/docs/HyperIndex/migration-guide" or the appropriate local doc-relative link so
the anchor text remains "Migrating from a Subgraph" and routing resolves under
routeBasePath: "docs/HyperIndex".
docs/HyperIndexV2/Guides/cli-commands.md-56-260 (1)

56-260: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Fix heading-depth jumps for “Options/Subcommands” blocks.

The repeated ###### headings jump levels (h3 → h6), triggering MD001 and weakening document outline/navigation.

Suggested patch pattern
-###### **Options:**
+#### **Options:**

-###### **Subcommands:**
+#### **Subcommands:**

Apply this consistently across all command sections.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/HyperIndexV2/Guides/cli-commands.md` around lines 56 - 260, The document
uses inconsistent heading levels (many blocks use ######) causing outline jumps;
update all "Options" and "Subcommands" block headings under each command (e.g.,
under `envio init`, `envio init contract-import`, `envio init contract-import
explorer`, `envio init fuel`, `envio dev`, `envio start`, `envio local`, etc.)
to a consistent, shallower level (for example use #### or ##### instead of
######) so the hierarchy flows h3 → h4 → h5 rather than jumping to h6; ensure
every command title (like `envio init`) remains one level above its
"Subcommands" and "Options" headings and apply this change consistently across
all command sections.
docs/HyperIndexV2/Guides/testing.mdx-189-189 (1)

189-189: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Fix ContactName typo in API notes

Line 189 and Line 245 should say ContractName, not ContactName.

✅ Suggested fix
-Where `ContactName` is the name of the contract defined in the config
+Where `ContractName` is the name of the contract defined in the config

Also applies to: 245-245

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/HyperIndexV2/Guides/testing.mdx` at line 189, Replace the incorrect
token "ContactName" with the correct "ContractName" wherever it appears in the
API notes of the testing guide; update both occurrences of the string
"ContactName" so the documentation refers to the contract identifier
"ContractName" consistently.
docs/HyperIndexV2/Advanced/performance/benchmarking.md-49-58 (1)

49-58: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Add language identifiers to fenced benchmark-output blocks

Lines 49, 74, 100, 129, and 161 use unlabeled fenced blocks. Add a language like text to satisfy MD040 and keep markdown lint clean.

🧩 Suggested fence updates
-```
+```text
 Time breakdown
 ...
-```
+```

-```
+```text
 General
 ...
-```
+```

-```
+```text
 BlockRangeFetched Summary for Chain 1 Root Register
 ...
-```
+```

-```
+```text
 EventProcessing Summary
 ...
-```
+```

-```
+```text
 Handlers Per Event
 ...
-```
+```

Also applies to: 74-83, 100-111, 129-141, 161-168

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/HyperIndexV2/Advanced/performance/benchmarking.md` around lines 49 - 58,
The fenced benchmark-output blocks in
docs/HyperIndexV2/Advanced/performance/benchmarking.md (the blocks titled "Time
breakdown", "General", "BlockRangeFetched Summary for Chain 1 Root Register",
"EventProcessing Summary", and "Handlers Per Event") are unlabeled; update each
opening triple-backtick fence to include a language identifier (use "text") so
they become ```text to satisfy MD040 and keep markdown lint clean.
docs/HyperIndexV2/supported-networks/any-evm-with-rpc.md-14-14 (1)

14-14: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Adjust heading level to follow markdown hierarchy

Line 14 should use ## instead of ### (H1 → H2 progression).

🧭 Suggested change
-### Defining Network Configurations
+## Defining Network Configurations
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/HyperIndexV2/supported-networks/any-evm-with-rpc.md` at line 14, Change
the markdown heading "Defining Network Configurations" from level 3 (###
Defining Network Configurations) to level 2 (## Defining Network Configurations)
so the document maintains proper H1 → H2 hierarchy; locate the heading text
"Defining Network Configurations" in the file and replace the leading "###" with
"##".
docs/HyperIndexV2/Advanced/effect-api.md-73-73 (1)

73-73: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Fix heading level jump before “Reading On-Chain State”

Line 73 should be an ## heading instead of ### to keep heading levels incrementing correctly.

🛠️ Suggested change
-### Reading On-Chain State (eth_call)
+## Reading On-Chain State (eth_call)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/HyperIndexV2/Advanced/effect-api.md` at line 73, The heading "Reading
On-Chain State (eth_call)" is using ### causing a level jump; change that
heading token from "### Reading On-Chain State (eth_call)" to "## Reading
On-Chain State (eth_call)" so the document's heading levels increment correctly.
docs/HyperIndexV2/Hosted_Service/hosted-service.md-18-20 (1)

18-20: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Tighten user-facing wording in deployment option bullets

Line 18 has a typo (“for the all the awesome features”), and Line 20 should use “infrastructure-related” as a compound modifier.

✍️ Suggested wording cleanup
-- **Envio Cloud (Fully Managed)**: Let Envio handle everything. The following sections of this page outline Envio Cloud in more detail. This is the recommended deployment method for most users and removes the hosting overhead for your team. See below for the all the awesome features we provide and see the [Pricing & Billing](./hosted-service-billing.mdx) page for more information on which plan suits your indexing needs.
+- **Envio Cloud (Fully Managed)**: Let Envio handle everything. The following sections of this page outline Envio Cloud in more detail. This is the recommended deployment method for most users and removes hosting overhead for your team. See below for all the features we provide, and see the [Pricing & Billing](./hosted-service-billing.mdx) page for more information on which plan suits your indexing needs.
 
-- **Self-Hosting**: Run your indexer on your own infrastructure. This requires advanced setup and infrastructure knowledge not unique to Envio. See the following [repository](https://github.com/enviodev/local-docker-example) for a simple docker example to get you started. Please note this example does not cover all infrastructure related needs. It is recommended that at least a separate Postgres management tool is used for self-hosting in production. For further instructions see the [Self Hosting Guide](self-hosting)
+- **Self-Hosting**: Run your indexer on your own infrastructure. This requires advanced setup and infrastructure knowledge not unique to Envio. See the following [repository](https://github.com/enviodev/local-docker-example) for a simple Docker example to get you started. Please note this example does not cover all infrastructure-related needs. It is recommended that at least a separate Postgres management tool is used for self-hosting in production. For further instructions, see the [Self Hosting Guide](self-hosting).
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/HyperIndexV2/Hosted_Service/hosted-service.md` around lines 18 - 20, Fix
two wording issues in the deployment option bullets: in the "Envio Cloud (Fully
Managed)" bullet replace “for the all the awesome features” with “for all the
awesome features” and in the "Self-Hosting" bullet change “infrastructure
related” to the hyphenated compound “infrastructure-related”; locate the bullets
by their headings "Envio Cloud (Fully Managed)" and "Self-Hosting" and update
the text accordingly.
docs/HyperIndexV2/Advanced/hypersync.md-15-15 (1)

15-15: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Use hyphen in compound adjective.

The phrase "purpose built" should be hyphenated as "purpose-built" when used as a compound adjective modifying "data-node".

📝 Proposed fix
-HyperSync is a purpose built data-node that helps powers the exceptional performance of HyperIndex.
+HyperSync is a purpose-built data-node that helps powers the exceptional performance of HyperIndex.

As per coding guidelines, compound adjectives should be hyphenated for clarity.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/HyperIndexV2/Advanced/hypersync.md` at line 15, The phrase "purpose
built" in the sentence beginning "HyperSync is a purpose built data-node..." is
missing a hyphen; update that compound adjective to "purpose-built" so the
sentence reads "HyperSync is a purpose-built data-node..." to follow
compound-adjective hyphenation rules.
docs/HyperIndexV2/Advanced/wildcard-indexing.mdx-106-106 (1)

106-106: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Fix typo: "trully" should be "truly".

📝 Proposed fix
-Indexing all ERC20 `Transfer` events is a lot of events, so ideally to reduce it only to the ones you trully need with the Topic Filtering feature.
+Indexing all ERC20 `Transfer` events is a lot of events, so ideally to reduce it only to the ones you truly need with the Topic Filtering feature.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/HyperIndexV2/Advanced/wildcard-indexing.mdx` at line 106, Fix the typo
in the sentence "Indexing all ERC20 `Transfer` events is a lot of events, so
ideally to reduce it only to the ones you trully need with the Topic Filtering
feature." — replace "trully" with "truly" so the sentence reads "...to the ones
you truly need with the Topic Filtering feature." Update the text in the same
paragraph containing the `ERC20 `Transfer`` phrase.
docs/HyperIndexV2/migrate-to-v3.md-1113-1115 (1)

1113-1115: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Add a language to the fenced code block

This block is missing a fence language and trips MD040. Use dotenv (or bash) for consistency with the rest of the doc.

Suggested markdown lint fix
-```
+```dotenv
 ENVIO_API_TOKEN=your_token_here
</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @docs/HyperIndexV2/migrate-to-v3.md around lines 1113 - 1115, The fenced code
block containing the environment variable line "ENVIO_API_TOKEN=your_token_here"
is missing a language tag and triggers MD040; update that fence to include a
language (use "dotenv" or "bash") so it becomes a labeled code block (e.g.,
change todotenv) to match the rest of the doc and satisfy the markdown
linter.


</details>

</blockquote></details>

</blockquote></details>

<details>
<summary>🧹 Nitpick comments (8)</summary><blockquote>

<details>
<summary>docs/HyperIndexV2/supported-networks/arthera-mainnet.md (1)</summary><blockquote>

`52-52`: **Consider improving Discord link phrasing.**

The current phrasing "Request network support here [Discord]" could be more natural. Consider one of these alternatives for better readability:

<details>
<summary>♻️ Suggested improvements</summary>

Option 1:
```diff
-Want HyperSync for Arthera Mainnet? Request network support here [Discord](https://discord.gg/envio)!
+Want HyperSync for Arthera Mainnet? [Request network support on Discord](https://discord.gg/envio)!
```

Option 2:
```diff
-Want HyperSync for Arthera Mainnet? Request network support here [Discord](https://discord.gg/envio)!
+Want HyperSync for Arthera Mainnet? Request network support on [Discord](https://discord.gg/envio)!
```
</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

```
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/HyperIndexV2/supported-networks/arthera-mainnet.md` at line 52, Replace
the awkward sentence "Request network support here
[Discord](https://discord.gg/envio)!" with a more natural phrasing; update the
line containing that text (the HyperSync request link line) to one of the
suggested options such as "Request HyperSync support on our Discord:
https://discord.gg/envio" or "Join our Discord to request network support:
https://discord.gg/envio" ensuring the URL remains intact and the link text is
clearer and more readable.
```

</details>

</blockquote></details>
<details>
<summary>docs/HyperIndexV2/migrate-with-ai.md (1)</summary><blockquote>

`37-41`: _💤 Low value_

**Add language specification to fenced code block.**

The directory structure code block is missing a language identifier.




<details>
<summary>📝 Suggested fix</summary>

```diff
-```
+```text
 my-migration/
 ├── my-subgraph/          # Your existing subgraph repo
 └── my-hyperindex-indexer/ # The boilerplate HyperIndex indexer from Step 1
 ```
```
</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @docs/HyperIndexV2/migrate-with-ai.md around lines 37 - 41, The fenced code
block showing the directory tree (the block starting with "my-migration/" and
the tree lines "├── my-subgraph/" and "└── my-hyperindex-indexer/") lacks a
language identifier; update that fenced block to include a language spec (e.g.,
add "text" after the opening triple backticks) so it becomes ```text to ensure
proper formatting and rendering.


</details>

</blockquote></details>
<details>
<summary>docs/HyperIndexV2/Examples/example-liquidation-metrics.md (1)</summary><blockquote>

`9-9`: _⚡ Quick win_

**Consider using a Docusaurus admonition for better visibility.**

The version warning would be more prominent if formatted as a Docusaurus admonition rather than plain text.




<details>
<summary>📢 Proposed improvement</summary>

```diff
-Note: This example is built on version 0.0.21 (current version is >= 0.0.36).
+:::warning Outdated Version
+This example is built on version 0.0.21 (current version is >= 0.0.36).
+:::
```

</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

```
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/HyperIndexV2/Examples/example-liquidation-metrics.md` at line 9, Replace
the plain text line "Note: This example is built on version 0.0.21 (current
version is >= 0.0.36)." with a Docusaurus admonition (e.g., :::warning or
:::note) so the version warning is prominent; specifically wrap the version
message in the admonition block (:::warning followed by the message and closing
:::), and keep the exact version numbers from the original string so readers see
both the example version and the current version.
```

</details>

</blockquote></details>
<details>
<summary>docs/HyperIndexV2/Troubleshoot/error-codes.md (1)</summary><blockquote>

`79-79`: _💤 Low value_

**Add `./` prefix to relative link for consistency.**

Line 79 uses a relative link without the `./` prefix, which is inconsistent with other relative links in the file (lines 67, 108, 249, 263, 384). While this may work, adding the prefix improves clarity and consistency.




<details>
<summary>📝 Proposed fix</summary>

```diff
-- Refer to the [configuration guide](configuration-file) for correct event definition syntax
+- Refer to the [configuration guide](./configuration-file) for correct event definition syntax
```
</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

```
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/HyperIndexV2/Troubleshoot/error-codes.md` at line 79, Update the
relative markdown link that currently reads [configuration
guide](configuration-file) to include the ./ prefix so it becomes [configuration
guide](./configuration-file) for consistency with other links; search for the
link text "configuration guide" or the target "configuration-file" and modify
the link target accordingly.
```

</details>

</blockquote></details>
<details>
<summary>docs/HyperIndexV2/Advanced/websockets.md (1)</summary><blockquote>

`37-57`: _💤 Low value_

**Add language identifiers to fenced code blocks.**

The code blocks at lines 37-39, 43-45, 49-51, and 55-57 are missing language identifiers. For plain-text URL examples, add `text` as the language identifier to improve rendering and satisfy linting rules.




<details>
<summary>📝 Proposed fix</summary>

```diff
-```
+```text
 https://indexer.hyperindex.xyz/123abcd/graphql
 ```

 Becomes:

-```
+```text
 wss://indexer.hyperindex.xyz/123abcd/graphql
 ```

 Similarly, for HTTP endpoints:

-```
+```text
 http://localhost:8080/v1/graphql
 ```

 Becomes:

-```
+```text
 ws://localhost:8080/v1/graphql
 ```
```
</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @docs/HyperIndexV2/Advanced/websockets.md around lines 37 - 57, Add the
missing language identifier "text" to each fenced code block that contains the
plain-text URL examples so they render correctly and satisfy linting: update the
blocks containing "https://indexer.hyperindex.xyz/123abcd/graphql",
"wss://indexer.hyperindex.xyz/123abcd/graphql",
"http://localhost:8080/v1/graphql", and "ws://localhost:8080/v1/graphql" to use
text instead of ; no other content changes are required.


</details>

</blockquote></details>
<details>
<summary>docs/HyperIndexV2/Troubleshoot/common-issues.md (1)</summary><blockquote>

`256-258`: _💤 Low value_

**Add language specifier to fenced code block.**

This URL example should have a language identifier for proper rendering:

<details>
<summary>📝 Suggested fix</summary>

```diff
-```
+```text
 https://indexer.dev.hyperindex.xyz/<your-deployment-id>/v1/graphql
 ```
```
</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @docs/HyperIndexV2/Troubleshoot/common-issues.md around lines 256 - 258,
Update the fenced code block that contains the URL
"https://indexer.dev.hyperindex.xyz//v1/graphql" to include
a language specifier by changing the opening backticks from totext so
the snippet renders correctly; locate the fenced block in the
docs/HyperIndexV2/Troubleshoot/common-issues.md file and replace the fence
accordingly.


</details>

</blockquote></details>
<details>
<summary>docs/HyperIndexV2/Tutorials/tutorial-op-bridge-deposits.md (1)</summary><blockquote>

`49-51`: _💤 Low value_

**Add language specifier to fenced code block.**

For consistency and proper syntax highlighting, add a language identifier to this fenced code block. Since this is a plain contract address, use `text`:

<details>
<summary>📝 Suggested fix</summary>

```diff
-   ```
+   ```text
    0x4200000000000000000000000000000000000010
    ```
```
</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @docs/HyperIndexV2/Tutorials/tutorial-op-bridge-deposits.md around lines 49 -
51, The fenced code block containing the contract address
"0x4200000000000000000000000000000000000010" needs a language specifier for
proper syntax highlighting; update the triple-backtick fence to include "text"
(i.e., ```text) so the block becomes a labeled text code block while leaving the
address content unchanged.


</details>

</blockquote></details>
<details>
<summary>docs/HyperIndexV2/Guides/contract-state.md (1)</summary><blockquote>

`114-116`: _💤 Low value_

**Inconsistent spelling: "optimization" vs "optimisation".**

The document title and most content uses "Preload Optimization" (US spelling), but lines 114 and 116 use "optimisation" (UK spelling). For consistency, use "optimization" throughout.

<details>
<summary>🤖 Prompt for AI Agents</summary>

```
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/HyperIndexV2/Guides/contract-state.md` around lines 114 - 116, Replace
the UK spelling "optimisation" with the US spelling "optimization" wherever it
appears in this document so the phrase "Preload Optimization" and its references
are consistent; specifically update the visible text "Preload optimisation" and
any sentence using "preload optimisation" to "Preload Optimization"/"preload
optimization", and ensure linked slugs like
"/docs/v2/HyperIndex/preload-optimization" remain accurate/canonical after the
change.
```

</details>

</blockquote></details>

</blockquote></details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->

## Steps to run the indexer

1. Clone the [repo](https://github.com/JasoonS/Envio-ENS-Indexer)
2. Install any other pre-requisite packages for Envio listed [here](https://docs.envio.dev/docs/HyperIndex/getting-started#prerequisites)
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot May 5, 2026

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check the Docusaurus config for HyperIndexV2 plugin routing

rg -A 10 "pluginId.*HyperIndexV2" docusaurus.config.js
rg -A 10 "routeBasePath" docusaurus.config.js | rg -A 5 -B 5 "HyperIndex"

Repository: enviodev/docs

Length of output: 1137


Fix incorrect documentation link path for v2.

The link points to /docs/HyperIndex/getting-started#prerequisites, which routes to the v3 documentation. Since this file is in the HyperIndexV2 folder, it should link to /docs/v2/HyperIndex/getting-started#prerequisites. Additionally, use descriptive link text instead of "here".

Proposed fix
-2. Install any other pre-requisite packages for Envio listed [here](https://docs.envio.dev/docs/HyperIndex/getting-started#prerequisites)
+2. Install any other pre-requisite packages for Envio listed in the [prerequisites guide](/docs/v2/HyperIndex/getting-started#prerequisites)
📝 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
2. Install any other pre-requisite packages for Envio listed [here](https://docs.envio.dev/docs/HyperIndex/getting-started#prerequisites)
2. Install any other pre-requisite packages for Envio listed in the [prerequisites guide](/docs/v2/HyperIndex/getting-started#prerequisites)
🧰 Tools
🪛 markdownlint-cli2 (0.22.1)

[warning] 18-18: Link text should be descriptive

(MD059, descriptive-link-text)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/HyperIndexV2/Examples/example-ens.md` at line 18, Update the markdown
link that currently points to "/docs/HyperIndex/getting-started#prerequisites"
and uses "here" as link text: change the URL to
"/docs/v2/HyperIndex/getting-started#prerequisites" and replace the link text
with a descriptive phrase such as "Envio prerequisites for HyperIndex v2" so the
link correctly targets v2 docs and is more descriptive.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Good point @DZakh

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!


1. **Quick Start (5-minute tutorial)**: Follow our step-by-step [tutorial](../Tutorials/tutorial-indexing-fuel.md) to create your first Fuel indexer quickly.

2. **No-Code Contract Import**: Use our [Contract Import](../contract-import.md) tool to automatically generate configuration and schema files for your Fuel contracts.
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot May 5, 2026

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Fix Contract Import links to the correct guide path

Lines 32, 50, and 96 point to ../contract-import.md, which is inconsistent with the documented location under Guides. This is likely a broken internal link for readers.

🔗 Suggested link fix
-2. **No-Code Contract Import**: Use our [Contract Import](../contract-import.md) tool to automatically generate configuration and schema files for your Fuel contracts.
+2. **No-Code Contract Import**: Use our [Contract Import](../Guides/contract-import.md) tool to automatically generate configuration and schema files for your Fuel contracts.

-- ✅ [No-code Contract Import](../contract-import.md)
+- ✅ [No-code Contract Import](../Guides/contract-import.md)

-> **Tip**: Instead of manually configuring events, use the [Contract Import](../contract-import.md) tool which automatically detects events and generates the proper configuration.
+> **Tip**: Instead of manually configuring events, use the [Contract Import](../Guides/contract-import.md) tool which automatically detects events and generates the proper configuration.

Also applies to: 50-50, 96-96

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/HyperIndexV2/fuel/fuel.md` at line 32, Replace the incorrect link target
'../contract-import.md' (the link text "Contract Import") with the correct
Guides path for the contract-import guide (e.g., '../guides/contract-import.md')
in the fuel.md occurrences (lines that reference "../contract-import.md" — the
"Contract Import" links at lines 32, 50, 96); update all three instances to the
correct relative path and verify the links render correctly.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Works when I tested it, invalid.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@JasoonS, thanks for verifying! You're right — contract-import.md lives at the docs/HyperIndexV2/ root level, so ../contract-import.md from fuel/fuel.md resolves correctly. My suggestion was mistaken. Apologies for the noise!

(ˊ . ˋ)
| U |

Comment on lines +57 to +59
(v) Reverse engineering, decompiling, or disassembling the Software, or attempting to do so, except and only to the extent that the foregoing restriction is (a) permitted by applicable law; (b) permitted by licensing terms governing the use of open-source components that may be included with the Software and

(vi) When using the Software, you may not use any features in any manner that could interfere with anyone else's use of them, or attempt to gain unauthorized access to or use of any service, data, account, or network.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Fix incomplete exception clause in limitation item (v).

The sentence in item (v) appears unfinished (...and) before item (vi) starts, which creates ambiguity in a legal restriction section. Please complete or restructure this clause so each numbered item is syntactically and legally self-contained.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/HyperIndexV2/licensing.md` around lines 57 - 59, Item (v) is
syntactically incomplete (it ends with "and") which leaves the legal restriction
ambiguous; update the sentence in item (v) so it is self-contained and parallels
the structure of items (a) and (b) — for example complete the parenthetical list
and finish the sentence by adding a clear exception such as "(c) required by
applicable law)" or reword to conclude "...permitted by applicable law or the
licensing terms governing the use of any included open‑source components."
Ensure you modify the text labeled "(v)" (and adjust punctuation before item
(vi) if needed) so each numbered item stands alone and reads correctly.


Migrating Alchemy subgraphs to Envio’s HyperIndex is a simple and developer-friendly process. Alchemy subgraphs follow The Graph’s model and HyperIndex uses a very similar structure, so most of your existing setup can carry over cleanly.

If you're familiar with The Graph’s libraries, the migration process should be straightforward. You can also utilize tools like Cursor to speed things up. If you are new to HyperIndex, we strongly recommend starting with our [Getting Started](https://docs.envio.dev/docs/HyperIndex/getting-started) guide before you begin your migration from Alchemy.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Keep internal links version-scoped to avoid bouncing v2 readers to other docs versions

Lines 17, 114, and 181 currently use absolute docs URLs. In this v2 page, relative version-scoped links are safer and keep users within the same version context.

🔁 Suggested link normalization
-If you're familiar with The Graph’s libraries, the migration process should be straightforward. You can also utilize tools like Cursor to speed things up. If you are new to HyperIndex, we strongly recommend starting with our [Getting Started](https://docs.envio.dev/docs/HyperIndex/getting-started) guide before you begin your migration from Alchemy.
+If you're familiar with The Graph’s libraries, the migration process should be straightforward. You can also utilize tools like Cursor to speed things up. If you are new to HyperIndex, we strongly recommend starting with our [Getting Started](./getting-started) guide before you begin your migration from Alchemy.

-If you hit any issues, check the [Configuration File](https://docs.envio.dev/docs/HyperIndex/configuration-file) docs or reach out to our team in [Discord](https://discord.gg/envio).
+If you hit any issues, check the [Configuration File](./Guides/configuration-file.mdx) docs or reach out to our team in [Discord](https://discord.gg/envio).

-For a few extra tips on migrating from Alchemy to Envio, check out our other [migration guide](https://docs.envio.dev/docs/HyperIndex/migration-guide#extra-tips) in our docs.
+For a few extra tips on migrating from Alchemy to Envio, check out our other [migration guide](./migration-guide.md#extra-tips) in our docs.

Also applies to: 114-114, 181-181

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/HyperIndexV2/migrate-from-alchemy.md` at line 17, Replace absolute docs
URLs on this page with relative, version-scoped links so v2 readers stay in the
same docs version: update the "Getting Started" link (the anchor text "Getting
Started") at the top and the other absolute links referenced on lines 114 and
181 to use relative paths prefixed with the v2 base (e.g.,
/docs/HyperIndex/getting-started) or the site's version token instead of full
https://docs.envio.dev/... URLs; ensure all three occurrences use the same
relative/versioned pattern.

pnpx envio@3.0.0-rc.0 init svm
```

See the [Solana documentation](/docs/v2/HyperIndex/solana) for more details.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Fix v2 doc links to use the configured route base path

These links currently use /docs/v2/HyperIndex/..., but this PR’s routing model mounts v2 under /docs/HyperIndex/v2. Update these absolute links to the canonical v2 path to avoid broken navigation and redirect churn.

Suggested link-path fixes
- See the [Solana documentation](/docs/v2/HyperIndex/solana) for more details.
+ See the [Solana documentation](/docs/HyperIndex/v2/solana) for more details.

- See the [Testing documentation](/docs/v2/HyperIndex/testing) for more details.
+ See the [Testing documentation](/docs/HyperIndex/v2/testing) for more details.

- Removed [`--bench`](/docs/v2/HyperIndex/benchmarking) support — use the `/metrics` endpoint instead
+ Removed [`--bench`](/docs/HyperIndex/v2/benchmarking) support — use the `/metrics` endpoint instead

- ... [Migrating from Loaders](/docs/v2/HyperIndex/preload-optimization#migrating-from-loaders) ...
+ ... [Migrating from Loaders](/docs/HyperIndex/v2/preload-optimization#migrating-from-loaders) ...

- ... ([guide](/docs/v2/HyperIndex/preload-optimization#migrating-from-loaders))
+ ... ([guide](/docs/HyperIndex/v2/preload-optimization#migrating-from-loaders))

Based on learnings: HyperIndex docs links should follow the plugin route base (canonical /docs/HyperIndex/...) rather than alternate redirect/stub-style paths.

Also applies to: 484-484, 605-605, 888-888, 1271-1271

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/HyperIndexV2/migrate-to-v3.md` at line 350, Replace absolute v2 links
that use the old /docs/v2/HyperIndex/... pattern with the canonical mounted path
/docs/HyperIndex/v2/..., e.g. change the link target
"/docs/v2/HyperIndex/solana" (found in the "See the [Solana documentation]..."
line) to "/docs/HyperIndex/v2/solana"; apply the same replacement for the other
occurrences noted (lines referenced in the review) so all v2 doc links follow
the plugin route base.

Comment on lines +1 to +31
---
id: migrate-with-ai
title: How to Migrate Using AI
sidebar_label: Migrate Using AI
slug: /migrate-with-ai
description: Use an AI programming assistant like Cursor or Claude Code with HyperIndex Claude skills to migrate your subgraph to Envio HyperIndex.
---

# How to Migrate Using AI

HyperIndex v3 includes built-in Claude skills that guide AI programming assistants through the full subgraph migration process, from understanding your existing logic to converting handlers and running quality checks. This is the recommended way to migrate complex subgraphs.

## Prerequisites

- An AI programming assistant (Cursor or Claude Code)
- pnpm installed
- HyperIndex v3 (Claude skills are available in v3)

## Step 1: Initialize a Boilerplate HyperIndex Indexer

Create a new HyperIndex indexer that indexes the same contracts and events as the subgraph you are migrating. Run the following in a new directory:

```bash
pnpx envio init
```

Follow the CLI prompts to set up the boilerplate indexer with the same contracts and events as your existing subgraph.

:::caution
The Claude skills are only available in HyperIndex v3. See the [v3 migration guide](./migrate-to-v3) for current install guidance.
:::
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify that relative link targets exist in the HyperIndexV2 docs folder

echo "Checking for migrate-to-v3 document:"
fd -t f "migrate-to-v3" docs/HyperIndexV2/

echo -e "\nChecking for migration-guide document:"
fd -t f "migration-guide" docs/HyperIndexV2/

echo -e "\nListing all markdown files in HyperIndexV2 for context:"
fd -e md . docs/HyperIndexV2/ | head -20

Repository: enviodev/docs

Length of output: 1235


🏁 Script executed:

# Search for quickstart-with-ai.md and check if it has similar patterns
fd -t f "quickstart-with-ai" docs/HyperIndexV2/

Repository: enviodev/docs

Length of output: 97


🏁 Script executed:

# Check the first few lines of migrate-with-ai.md to verify code block language spec
sed -n '35,45p' docs/HyperIndexV2/migrate-with-ai.md

Repository: enviodev/docs

Length of output: 559


🏁 Script executed:

# Check line 95 for grammar context
sed -n '90,100p' docs/HyperIndexV2/migrate-with-ai.md

Repository: enviodev/docs

Length of output: 422


🏁 Script executed:

# Check if there's any README or documentation about the structure of these V2 AI guides
find docs/HyperIndexV2 -name "*quickstart*" -o -name "*AI*" -o -name "*ai*" 2>/dev/null

Repository: enviodev/docs

Length of output: 2747


🏁 Script executed:

# Check the exact code block at lines 37-41
sed -n '36,42p' docs/HyperIndexV2/migrate-with-ai.md

Repository: enviodev/docs

Length of output: 215


🏁 Script executed:

# Get a broader view of the content to understand if there are more code blocks
sed -n '35,50p' docs/HyperIndexV2/migrate-with-ai.md | cat -A

Repository: enviodev/docs

Length of output: 934


🏁 Script executed:

# Check the quickstart-with-ai.md file to see if it also describes v3-only features
head -40 docs/HyperIndexV2/quickstart-with-ai.md

Repository: enviodev/docs

Length of output: 1997


V3-only content placed in V2 documentation creates confusion.

This guide exclusively describes HyperIndex v3 features (Claude skills) but is located in the docs/HyperIndexV2/ folder. The document states multiple times that Claude skills are only available in v3 (lines 11, 17, 30). This placement pattern also appears in docs/HyperIndexV2/quickstart-with-ai.md, suggesting it may be intentional as a migration bridge.

Consider:

  • Option 1: Move these AI migration guides to the v3 docs where the features are available
  • Option 2: If these are intentionally "bridge" documents for v2 users planning to upgrade, reframe the introductions to make that purpose explicit (e.g., "To use AI-assisted migration, you must upgrade to HyperIndex v3. See [upgrade guide] first, then follow the steps below.")

Additionally:

  • Code block at lines 36-42 (directory tree) is missing a language specifier; consider adding text` or
  • Line 95: Change "step by step" to "step-by-step"
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/HyperIndexV2/migrate-with-ai.md` around lines 1 - 31, This file ("How to
Migrate Using AI" / header "Step 1: Initialize a Boilerplate HyperIndex
Indexer") documents v3-only Claude skills but lives under V2 docs; either move
the two AI migration guides (this file and quickstart-with-ai.md) into the v3
docs, or rewrite the introduction to clearly state these are bridge/upgrade
instructions (e.g., "To use AI-assisted migration you must first upgrade to
HyperIndex v3 — see the upgrade guide"), then keep the rest; also add a language
specifier (e.g., ```text) to the directory tree code block and change the phrase
"step by step" to "step-by-step".

Comment on lines +19 to +239
The process is simple but requires a good understanding of the underlying concepts. If you are new to HyperIndex, we recommend starting with the [Getting Started](../HyperIndex/getting-started) guide.

:::tip Prefer AI-assisted migration?
If you want an assistant-led workflow, see [How to Migrate Using AI](./migrate-with-ai) for a guided process that works in both Cursor and Claude Code.
:::

## Why Migrate to HyperIndex?

- **Superior Performance**: Up to 100x faster indexing speeds
- **Lower Costs**: Reduced infrastructure requirements and operational expenses
- **Better Developer Experience**: Simplified configuration and deployment
- **Advanced Features**: Access to capabilities not available in other indexing solutions
- **Seamless Integration**: Easy integration with existing GraphQL APIs and applications

## Subgraph to HyperIndex Migration Overview

Migration consists of three major steps:

1. Subgraph.yaml migration
1. Schema migration - near copy paste
1. Event handler migration

At any point in the migration run

`pnpm envio codegen`

to verify the `config.yaml` and `schema.graphql` files are valid.

or run

`pnpm dev`

to verify the indexer is running and indexing correctly.

### 0.5 Use `npx envio init` to generate a boilerplate

As a first step, we recommend using `npx envio init` to generate a boilerplate for your project. This will handle the creation of the `config.yaml` file and a basic `schema.graphql` file with generic handler functions.

### 1. `subgraph.yaml` → `config.yaml`

`npx envio init` will generate this for you. It's a simple configuration file conversion. Effectively specifying which contracts to index, which networks to index (multiple networks can be specified with envio) and which events from those contracts to index.

Take the following conversion as an example, where the `subgraph.yaml` file is converted to `config.yaml` the below comparisons is for the Uniswap v4 pool manager subgraph.

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

For any potential hurdles, please refer to the [Configuration File](../HyperIndex/configuration-file) documentation.

## 2. Schema migration

`copy` & `paste` the schema from the subgraph to the HyperIndex config file.

Small nuance differences:

- You can remove the `@entity` directive
- [Enums](../HyperIndex/schema#enum-types)
- [BigDecimals](../HyperIndex/schema#working-with-bigdecimal)

## 3. Event handler migration

This consists of two parts

1. Converting assemblyscript to typescript
1. Converting the subgraph syntax to HyperIndex syntax

### 3.1 Converting Assemblyscript to Typescript

The subgraph uses assemblyscript to write event handlers. The HyperIndex syntax is usually in typescript. Since assemblyscript is a subset of typescript, it's quite simple to copy and paste the code, especially so for pure functions.

### 3.2 Converting the subgraph syntax to HyperIndex syntax

There are some subtle differences in the syntax of the subgraph and HyperIndex. Including but not limited to the following:

- Replace Entity.save() with context.Entity.set()
- Convert to async handler functions
- Use `await` for loading entities `const x = await context.Entity.get(id)`
- Use [dynamic contract registration](../HyperIndex/dynamic-contracts) to register contracts

The below code snippets can give you a basic idea of what this difference might look like.

<div className="row">
<div className="col col--6">
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();
}
```

</div>
<div className="col col--6">
HyperIndex - `eventHandler.ts`
```typescript
PoolManager.Subscription.handler( async (event, context) => {
const entity = {
id: event.transaction.hash + event.logIndex,
tokenId: event.params.tokenId,
address: event.params.subscriber,
blockNumber: event.block.number,
logIndex: event.logIndex,
position: event.params.tokenId
}

context.Subscription.set(entity);
})

```

</div>
</div>

## Extra tips

HyperIndex is a powerful tool that can be used to index any contract. There are some features that are especially powerful that go above subgraph implementations and so in some cases you may want to optimise your migration to HyperIndex further to take advantage of these features. Here are some useful tips:

- Use `field_selection` to opt into optional transaction and block fields (e.g. `hash`, `status`, `gasUsed`) that are not included by default, see [Transaction receipts](#transaction-receipts) for a migration-focused example and the [field selection](../HyperIndex/configuration-file#field-selection) docs for the full list.
- Use the `unordered_multichain_mode` option to enable unordered multichain mode, this is the most common need for multichain indexing. However comes with tradeoffs worth understanding. Doc here: [unordered multichain mode](../HyperIndex/configuration-file#unordered-multichain-mode)
- Use wildcard indexing to index by event signatures rather than by contract address.
- HyperIndex uses the standard GraphQL query language, whereas TheGraph uses a custom GraphQL syntax. You can read about the differences and how to convert queries in our [Query Conversion Guide](/docs/v2/HyperIndex/query-conversion). We also provide a query converter tool for backwards compatibility with existing TheGraph queries.
- Loaders are a powerful feature to optimize historical sync performance. You can read more about them [here](../HyperIndex/loaders).
- HyperIndex is very flexible and can be used to index offchain data too or send messages to a queue etc for fetching external data, you can further optimise the fetching by using the [effects api](/docs/v2/HyperIndex/effect-api)

### Transaction receipts

In The Graph, you opt into receipt data per-handler with `receipt: true` in `subgraph.yaml`:

```yaml
eventHandlers:
- event: Transfer(indexed address,indexed address,indexed uint256)
handler: handleTransfer
receipt: true
````

This makes `event.receipt` available inside the handler with fields like `status`, `gasUsed`, and `logs`.

In HyperIndex, receipt-level fields are part of `transaction_fields` and must be requested via `field_selection` in `config.yaml`. There is no separate receipt object — the fields are accessed directly on `event.transaction`:

```yaml
field_selection:
transaction_fields:
- hash
- status # 1 = success, 0 = reverted
- gasUsed
- cumulativeGasUsed
- contractAddress # non-null for contract-creation transactions
- logsBloom
```

```typescript
MyContract.Transfer.handler(async ({ event, context }) => {
const { status, gasUsed } = event.transaction;
// ...
});
```

See the full list of available `transaction_fields` in the [Configuration File](../HyperIndex/configuration-file#field-selection) docs.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Critical: Inconsistent documentation version links - v2 guide links to v3 docs.

This migration guide inconsistently mixes v2 and v3 documentation links. Many relative links using ../HyperIndex/ would resolve to the v3 docs at docs/HyperIndex/ instead of staying within v2 docs at docs/HyperIndexV2/.

Problematic links:

  • Line 19: ../HyperIndex/getting-started → should be /docs/v2/HyperIndex/getting-started
  • Line 121: ../HyperIndex/configuration-file → should be /docs/v2/HyperIndex/configuration-file
  • Lines 130-131: ../HyperIndex/schema → should be /docs/v2/HyperIndex/schema
  • Line 151: ../HyperIndex/dynamic-contracts → should be /docs/v2/HyperIndex/dynamic-contracts
  • Line 203: ../HyperIndex/loaders → should be /docs/v2/HyperIndex/loaders
  • Line 239: ../HyperIndex/configuration-file → should be /docs/v2/HyperIndex/configuration-file

Some links already correctly use /docs/v2/HyperIndex/ (lines 167, 176, 202, 204), showing the intended pattern.

This will confuse users following the v2 migration guide as they'll be redirected to v3 documentation which may have different APIs or guidance.

🔗 Suggested fix to standardize v2 documentation links

Replace all ../HyperIndex/ relative links with /docs/v2/HyperIndex/ absolute links:

-If you are new to HyperIndex, we recommend starting with the [Getting Started](../HyperIndex/getting-started) guide.
+If you are new to HyperIndex, we recommend starting with the [Getting Started](/docs/v2/HyperIndex/getting-started) guide.

Apply similar changes to all other ../HyperIndex/ references throughout the file (lines 121, 130, 131, 151, 203, 239).

🧰 Tools
🪛 LanguageTool

[grammar] ~38-~38: Use a hyphen to join words.
Context: ...igration 1. Schema migration - near copy paste 1. Event handler migration At any...

(QB_NEW_EN_HYPHEN)


[style] ~142-~142: As an alternative to the over-used intensifier ‘quite’, consider replacing this phrase.
Context: ...yscript is a subset of typescript, it's quite simple to copy and paste the code, especially ...

(EN_WEAK_ADJECTIVE)

🪛 markdownlint-cli2 (0.22.1)

[warning] 190-190: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/HyperIndexV2/migration-guide.md` around lines 19 - 239, The migration
guide contains mixed v2/v3 links; replace all occurrences of the relative links
that start with "../HyperIndex/" (e.g. "../HyperIndex/getting-started",
"../HyperIndex/configuration-file", "../HyperIndex/schema",
"../HyperIndex/dynamic-contracts", "../HyperIndex/loaders") with the v2 absolute
path "/docs/v2/HyperIndex/..." (e.g. "/docs/v2/HyperIndex/getting-started",
"/docs/v2/HyperIndex/configuration-file", etc.) so every reference in
migration-guide.md consistently points to the v2 docs.


# Privacy Policy

Last updated: February 06, 2024
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Update the “Last updated” date to reflect this publication.

This page is newly introduced in this PR, but it still states February 06, 2024, which can confuse users and weaken policy credibility.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/HyperIndexV2/privacy-policy.md` at line 11, Replace the existing "Last
updated: February 06, 2024" line in privacy-policy.md with the current
publication date (e.g., "Last updated: May 05, 2026") so the document header
reflects the PR's publication date.


**Issue**: The schema uses unsupported array syntax for entity relationships.

**Solution**: Use one of the supported methods for entity references as outlined in the [schema documentation](../Guides/schema-file.md).
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Remove .md extension from Docusaurus link.

The link includes a .md extension, which Docusaurus does not expect in internal documentation links. Links should reference the document ID or use the path without the file extension.

🔗 Proposed fix
-**Solution**: Use one of the supported methods for entity references as outlined in the [schema documentation](../Guides/schema-file.md).
+**Solution**: Use one of the supported methods for entity references as outlined in the [schema documentation](../schema).

Note: This assumes the slug or id is schema. Verify the correct reference by checking the frontmatter of schema-file.md (which shows slug: /schema at line 5).

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/HyperIndexV2/Troubleshoot/error-codes.md` at line 257, Change the
internal Docusaurus link "[schema documentation](../Guides/schema-file.md)" to
remove the .md extension so it points to the doc id/path Docusaurus expects
(e.g. "[schema documentation](../Guides/schema-file)" or use the doc id/slug
like "[schema documentation](schema)" or "/schema" based on the frontmatter);
update the link target in the same line to match the actual document id/slug
shown in the schema-file frontmatter.

Comment on lines +159 to +194
async function fetchEthPriceFromUnix(
unix: number,
token = "ethereum"
): Promise<number> {
// convert unix to date dd-mm-yyyy
const _date = new Date(unix * 1000);
const date = _date.toISOString().slice(0, 10).split("-").reverse().join("-");
return fetchEthPrice(date.slice(0, 10), token);
}

async function fetchEthPrice(
date: string,
token = "ethereum"
): Promise<number> {
const options = {
method: "GET",
headers: {
accept: "application/json",
"x-cg-demo-api-key": COIN_GECKO_API_KEY,
},
};

return fetch(
`https://api.coingecko.com/api/v3/coins/${token}/history?date=${date}&localization=false`,
options as any
)
.then((res) => res.json())
.then((res: any) => {
const usdPrice = res.market_data.current_price.usd;
console.log(`ETH price on ${date}: ${usdPrice}`);
return usdPrice;
})
.catch((err) => console.error(err));
}

export default fetchEthPriceFromUnix;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Fix type safety: fetchEthPriceFromUnix can return undefined.

The function is typed as Promise<number> but the catch block at line 191 implicitly returns undefined. When the API call fails, this will cause NaN values to propagate through calculations at line 346 and beyond.

🛡️ Proposed fix to handle errors safely

Option 1: Update return type and add null checks:

 async function fetchEthPriceFromUnix(
   unix: number,
   token = "ethereum"
-): Promise<number> {
+): Promise<number | undefined> {
   // convert unix to date dd-mm-yyyy
   const _date = new Date(unix * 1000);
   const date = _date.toISOString().slice(0, 10).split("-").reverse().join("-");
   return fetchEthPrice(date.slice(0, 10), token);
 }

 async function fetchEthPrice(
   date: string,
   token = "ethereum"
-): Promise<number> {
+): Promise<number | undefined> {
   const options = {
     method: "GET",
     headers: {
       accept: "application/json",
       "x-cg-demo-api-key": COIN_GECKO_API_KEY,
     },
   };

   return fetch(
     `https://api.coingecko.com/api/v3/coins/${token}/history?date=${date}&localization=false`,
-    options as any
+    options
   )
     .then((res) => res.json())
     .then((res: any) => {
       const usdPrice = res.market_data.current_price.usd;
       console.log(`ETH price on ${date}: ${usdPrice}`);
       return usdPrice;
     })
-    .catch((err) => console.error(err));
+    .catch((err) => {
+      console.error(err);
+      return undefined;
+    });
 }

Then update the handler to check for undefined:

 UniswapV3Pool.Mint.handler(async ({ event, context }) => {
   const offChainPrice = await fetchEthPriceFromUnix(event.block.timestamp);
+  
+  if (offChainPrice === undefined) {
+    console.warn(`Failed to fetch price for block ${event.block.number}, skipping`);
+    return;
+  }

   const ethDepositedUsdPool =
     (latestPoolPrice * Number(event.params.amount1)) / 10 ** 18;

Option 2: Use a fallback price or throw an error depending on your error-handling strategy.

📝 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
async function fetchEthPriceFromUnix(
unix: number,
token = "ethereum"
): Promise<number> {
// convert unix to date dd-mm-yyyy
const _date = new Date(unix * 1000);
const date = _date.toISOString().slice(0, 10).split("-").reverse().join("-");
return fetchEthPrice(date.slice(0, 10), token);
}
async function fetchEthPrice(
date: string,
token = "ethereum"
): Promise<number> {
const options = {
method: "GET",
headers: {
accept: "application/json",
"x-cg-demo-api-key": COIN_GECKO_API_KEY,
},
};
return fetch(
`https://api.coingecko.com/api/v3/coins/${token}/history?date=${date}&localization=false`,
options as any
)
.then((res) => res.json())
.then((res: any) => {
const usdPrice = res.market_data.current_price.usd;
console.log(`ETH price on ${date}: ${usdPrice}`);
return usdPrice;
})
.catch((err) => console.error(err));
}
export default fetchEthPriceFromUnix;
async function fetchEthPriceFromUnix(
unix: number,
token = "ethereum"
): Promise<number | undefined> {
// convert unix to date dd-mm-yyyy
const _date = new Date(unix * 1000);
const date = _date.toISOString().slice(0, 10).split("-").reverse().join("-");
return fetchEthPrice(date.slice(0, 10), token);
}
async function fetchEthPrice(
date: string,
token = "ethereum"
): Promise<number | undefined> {
const options = {
method: "GET",
headers: {
accept: "application/json",
"x-cg-demo-api-key": COIN_GECKO_API_KEY,
},
};
return fetch(
`https://api.coingecko.com/api/v3/coins/${token}/history?date=${date}&localization=false`,
options
)
.then((res) => res.json())
.then((res: any) => {
const usdPrice = res.market_data.current_price.usd;
console.log(`ETH price on ${date}: ${usdPrice}`);
return usdPrice;
})
.catch((err) => {
console.error(err);
return undefined;
});
}
export default fetchEthPriceFromUnix;
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/HyperIndexV2/Tutorials/price-data.md` around lines 159 - 194,
fetchEthPriceFromUnix is declared to return Promise<number> but fetchEthPrice's
catch implicitly returns undefined, so failures can produce undefined/NaN;
update the implementation to be type-safe by either: 1) making fetchEthPrice and
fetchEthPriceFromUnix return Promise<number | undefined> and add null/undefined
checks at their callers (e.g., the code that uses the returned price at line
~346), or 2) preserve Promise<number> by removing the silent catch in
fetchEthPrice and instead rethrow the caught error (or throw a descriptive
Error) so consumers must handle failures; specifically modify the catch in
fetchEthPrice (and/or fetchEthPriceFromUnix) to either rethrow the error or
return a well-documented numeric fallback, and update the function signatures
and calling sites accordingly (refer to functions fetchEthPriceFromUnix and
fetchEthPrice).

The static type:"dropdown" navbar item kept the label fixed on "v3"
even when the user was browsing v2 pages, so the trigger label never
matched the active version.

Replace it with a small custom navbar item that reads useLocation()
and renders the right label (v3 or v2) based on whether the path
starts with /docs/v2/HyperIndex or /docs/HyperIndex. Items are
registered via a swizzled NavbarItem/ComponentTypes so the rest of
Docusaurus' navbar machinery is reused.
Copy link
Copy Markdown
Member

@moose-code moose-code left a comment

Choose a reason for hiding this comment

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

Looks good!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This page isn't even in the sidebar I believe. Maybe delete these files, I think they are extremely old/stale?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Also think this page is deprecated.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This also isn't in the sidebar

Copy link
Copy Markdown
Contributor

@JasoonS JasoonS left a comment

Choose a reason for hiding this comment

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

No big blockers, just seems some of these pages aren't even in the sidebar...

@DZakh DZakh closed this May 12, 2026
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.

4 participants