-
Notifications
You must be signed in to change notification settings - Fork 10
subgraph migration guide #662
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
WalkthroughThe documentation was updated to standardize environment variable usage with an Changes
Poem
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 5
🧹 Nitpick comments (2)
docs/HyperSync/hypersync-supported-networks.md (1)
49-49
: Nitpick: wrap bare URLs to satisfy markdownlint MD034. Consider enclosing the URLs in angle brackets (<...>
) or using markdown links to avoid bare URLs.
Example:-| Chiliz | 88888 | https://chiliz.hypersync.xyz or https://88888.hypersync.xyz | 🪨 | | +| Chiliz | 88888 | <https://chiliz.hypersync.xyz> or <https://88888.hypersync.xyz> | 🪨 | |docs/HyperIndex/migration-guide.md (1)
30-35
: Unify migration steps list and improve wording
Use sequential numbering, correct "copy paste" to "copy and paste", and add a comma for the introductory sentence.- Migration consists of three major steps: - 1. Subgraph.yaml migration - 1. Schema migration - near copy paste - 1. Event handler migration + Migration consists of three major steps: + 1. Subgraph.yaml migration + 2. Schema migration — near copy and paste + 3. Event handler migration - At any point in the migration run + At any point in the migration, run
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (7)
docs/HyperIndex/Guides/configuration-file.mdx
(1 hunks)docs/HyperIndex/Guides/environment-variables.md
(1 hunks)docs/HyperIndex/migration-guide.md
(2 hunks)docs/HyperIndex/supported-networks/chiliz.md
(2 hunks)docs/HyperSync/HyperRPC/hyperrpc-url-endpoints.md
(1 hunks)docs/HyperSync/hypersync-supported-networks.md
(1 hunks)sidebarsHyperIndex.js
(1 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
docs/HyperSync/hypersync-supported-networks.md
49-49: Bare URL used
null
(MD034, no-bare-urls)
49-49: Bare URL used
null
(MD034, no-bare-urls)
🪛 LanguageTool
docs/HyperIndex/migration-guide.md
[typographical] ~10-~10: Consider adding a comma here.
Context: ...ate from TheGraph to HyperIndex :::info Please reach out to our team on [Discord](http...
(PLEASE_COMMA)
[grammar] ~32-~32: Did you mean “copy and paste”?
Context: ...l migration 1. Schema migration - near copy paste 1. Event handler migration At any poin...
(COPY_PASTE)
[uncategorized] ~39-~39: Possible missing comma found.
Context: ...gration run pnpm envio codegen
to verify the config.yaml
and schema.graphql
...
(AI_HYDRA_LEO_MISSING_COMMA)
[style] ~136-~136: 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)
[uncategorized] ~188-~188: Possible missing comma found.
Context: ...ecially powerful that go above subgraph implementations and so in some cases you may want to op...
(AI_HYDRA_LEO_MISSING_COMMA)
[uncategorized] ~191-~191: A comma may be missing after the conjunctive/linking adverb ‘However’.
Context: ...st common need for multichain indexing. However comes with tradeoffs worth understandin...
(SENT_START_CONJUNCTIVE_LINKING_ADVERB_COMMA)
[uncategorized] ~194-~194: Do not mix variants of the same word (‘optimize’ and ‘optimise’) within a single text.
Context: ...s). - Loaders are a powerful feature to optimize historical sync performance. You can re...
(EN_WORD_COHERENCY)
[style] ~195-~195: In American English, abbreviations like “etc.” require a period.
Context: ...in data too or send messages to a queue etc for fetching external data, you can fur...
(ETC_PERIOD)
🔇 Additional comments (9)
docs/HyperSync/hypersync-supported-networks.md (1)
49-49
: Chiliz network ID and endpoints updated correctly. The chain ID was incremented from8888
to88888
and both URL variants have been updated.
Run this script to verify no lingering references to the old Chiliz ID:#!/bin/bash # Verify no legacy '8888' references remain (excluding '88888') rg -n -e '8888([^8]|$)' docs/HyperSync/hypersync-supported-networks.mddocs/HyperSync/HyperRPC/hyperrpc-url-endpoints.md (1)
41-41
: Chiliz network ID and RPC endpoints updated correctly. The chain ID value was changed to88888
, and both endpoint URLs now reflect this.docs/HyperIndex/supported-networks/chiliz.md (2)
14-16
: Chiliz Chain ID and endpoints updated correctly. The chain ID in the table and both HyperSync/HyperRPC URLs have been updated to88888
.
42-42
: Chiliz network ID in example config updated correctly. The YAML snippet now usesid: 88888
for the Chiliz network.sidebarsHyperIndex.js (1)
57-59
: Include new Environment Variables guide in sidebar
The new guide is correctly added under "Guides" and follows naming conventions.docs/HyperIndex/Guides/configuration-file.mdx (3)
210-214
: Env var placeholders updated correctly
TheENVIO_
prefix and default interpolation syntax are consistent with the new Environment Variables guide.
220-220
: Example startup command updated
Thepnpm dev
example uses the correctENVIO_
variables.
225-228
: Interpolation syntax section updated
The syntax bullets and link to the Environment Variables guide are accurate and clear.docs/HyperIndex/Guides/environment-variables.md (1)
1-6
: Validate frontmatter metadata
Theid
,title
,sidebar_label
, andslug
are correctly configured for this new guide.
## Configuration File | ||
|
||
For use of environment variables in your configuration file, read the docs here: [Configuration File](../HyperIndex/configuration-file). | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix Configuration File link
The link should reference the local guide in the same directory.
- [Configuration File](../HyperIndex/configuration-file)
+ [Configuration File](./configuration-file)
📝 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.
## Configuration File | |
For use of environment variables in your configuration file, read the docs here: [Configuration File](../HyperIndex/configuration-file). | |
## Configuration File | |
For use of environment variables in your configuration file, read the docs here: [Configuration File](./configuration-file). |
🤖 Prompt for AI Agents
In docs/HyperIndex/Guides/environment-variables.md around lines 59 to 62, the
link to the Configuration File currently points to
../HyperIndex/configuration-file, which is incorrect. Update the link to
reference the local guide file in the same directory by changing the URL to
./configuration-file or the correct relative path within the same folder.
```bash | ||
# Blockchain RPC URL | ||
ENVIO_RPC_URL=https://arbitrum.direct.dev/your-api-key | ||
|
||
# Starting block number for indexing | ||
ENVIO_START_BLOCK=12345678 | ||
|
||
# Number of blocks to process in each batch | ||
ENVIO_COINGECKO_API_KEY=api-key |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix misaligned example comment
The comment # Number of blocks to process in each batch
does not describe ENVIO_COINGECKO_API_KEY
.
- # Number of blocks to process in each batch
- ENVIO_COINGECKO_API_KEY=api-key
+ # CoinGecko API key for price data retrieval
+ ENVIO_COINGECKO_API_KEY=your-coingecko-api-key
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
```bash | |
# Blockchain RPC URL | |
ENVIO_RPC_URL=https://arbitrum.direct.dev/your-api-key | |
# Starting block number for indexing | |
ENVIO_START_BLOCK=12345678 | |
# Number of blocks to process in each batch | |
ENVIO_COINGECKO_API_KEY=api-key |
🤖 Prompt for AI Agents
In docs/HyperIndex/Guides/environment-variables.md around lines 23 to 31, the
comment above ENVIO_COINGECKO_API_KEY is incorrect and describes the wrong
variable. Update the comment to correctly describe ENVIO_COINGECKO_API_KEY, such
as indicating it is the API key for CoinGecko, and ensure the comment about the
number of blocks to process in each batch is placed above the appropriate
environment variable if it exists.
4. Confirm that the values are correctly formatted | ||
|
||
For more help, see our [Troubleshooting Guide](../HyperIndex/logging). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct Troubleshooting Guide link
Update the path to ../Troubleshoot/logging
to match the sidebar configuration.
- For more help, see our [Troubleshooting Guide](../HyperIndex/logging).
+ For more help, see our [Troubleshooting Guide](../Troubleshoot/logging).
📝 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.
4. Confirm that the values are correctly formatted | |
For more help, see our [Troubleshooting Guide](../HyperIndex/logging). | |
4. Confirm that the values are correctly formatted | |
For more help, see our [Troubleshooting Guide](../Troubleshoot/logging). |
🤖 Prompt for AI Agents
In docs/HyperIndex/Guides/environment-variables.md around lines 79 to 81, the
link to the Troubleshooting Guide is incorrect. Update the link path from
../HyperIndex/logging to ../Troubleshoot/logging to match the sidebar
configuration and ensure the link directs to the correct documentation page.
### Hosted Service | ||
|
||
When using the Envio Hosted Service, you can configure environment variables through the Envio platform's dashboard. Remember that all variables must still be prefixed with `ENVIO_`. | ||
|
||
For more information about environment variables in the hosted service, see the [Hosted Service documentation](../HyperIndex/hosted-service). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct link to Hosted Service docs
Update the relative path to point to the Hosted_Service/hosted-service
guide.
- see the [Hosted Service documentation](../HyperIndex/hosted-service)
+ see the [Hosted Service documentation](../Hosted_Service/hosted-service)
📝 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.
### Hosted Service | |
When using the Envio Hosted Service, you can configure environment variables through the Envio platform's dashboard. Remember that all variables must still be prefixed with `ENVIO_`. | |
For more information about environment variables in the hosted service, see the [Hosted Service documentation](../HyperIndex/hosted-service). | |
### Hosted Service | |
When using the Envio Hosted Service, you can configure environment variables through the Envio platform's dashboard. Remember that all variables must still be prefixed with `ENVIO_`. | |
For more information about environment variables in the hosted service, see the [Hosted Service documentation](../Hosted_Service/hosted-service). |
🤖 Prompt for AI Agents
In docs/HyperIndex/Guides/environment-variables.md around lines 53 to 57, the
link to the Hosted Service documentation uses an incorrect relative path. Update
the link to point to ../HyperIndex/Hosted_Service/hosted-service instead of
../HyperIndex/hosted-service to correctly reference the Hosted Service guide.
title: Migrate from a Subgraph to HyperIndex | ||
sidebar_label: Migrate from TheGraph | ||
slug: /migration-guide | ||
--- | ||
|
||
# Migrate from TheGraph and Other Indexers to HyperIndex | ||
# Migrate from TheGraph to HyperIndex |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Inconsistent title and header
The frontmatter title
("Migrate from a Subgraph to HyperIndex") and the H1 header ("Migrate from TheGraph to HyperIndex") differ. Standardize the phrasing for clarity.
--- title: Migrate from a Subgraph to HyperIndex
+++ title: Migrate from TheGraph subgraph to HyperIndex
--- # Migrate from TheGraph to HyperIndex
+++ # Migrate from TheGraph subgraph to HyperIndex
📝 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.
title: Migrate from a Subgraph to HyperIndex | |
sidebar_label: Migrate from TheGraph | |
slug: /migration-guide | |
--- | |
# Migrate from TheGraph and Other Indexers to HyperIndex | |
# Migrate from TheGraph to HyperIndex | |
title: Migrate from TheGraph subgraph to HyperIndex | |
sidebar_label: Migrate from TheGraph | |
slug: /migration-guide | |
--- | |
# Migrate from TheGraph subgraph to HyperIndex |
🤖 Prompt for AI Agents
In docs/HyperIndex/migration-guide.md around lines 3 to 8, the frontmatter title
and the H1 header have inconsistent phrasing. Update either the frontmatter
title or the H1 header so both use the same wording, ensuring consistency and
clarity in the document's main topic.
|
||
# Environment Variables | ||
|
||
Environment variables are a crucial part of configuring your Envio indexer. They allow you to manage sensitive information and configuration settings without hardcoding them in your codebase. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great improvements!
@latest
from envio init command.pnpm envio <commnad
where appropriateSummary by CodeRabbit
ENVIO_
prefix.88888
and corresponding endpoint URLs.