Skip to content

HyperIndex v2.21#631

Merged
DZakh merged 3 commits intomainfrom
dz/v2.21
May 19, 2025
Merged

HyperIndex v2.21#631
DZakh merged 3 commits intomainfrom
dz/v2.21

Conversation

@DZakh
Copy link
Member

@DZakh DZakh commented May 19, 2025

Summary by CodeRabbit

  • Documentation
    • Added details on asynchronous contract registration, including usage examples and advanced use cases.
    • Updated configuration file documentation to explain how to customize the GraphQL schema file path.
    • Removed several networks from the supported networks lists in HyperRPC and HyperSync documentation.
  • New Features
    • Enhanced configuration schema to support more flexible RPC endpoint definitions and behaviors, including new properties and options for network configuration.
  • Style
    • Added a missing newline at the end of the supported networks JSON file.

@vercel
Copy link

vercel bot commented May 19, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
envio-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 19, 2025 3:53pm

@DZakh DZakh requested a review from moose-code May 19, 2025 15:46
@coderabbitai
Copy link
Contributor

coderabbitai bot commented May 19, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This update primarily enhances documentation related to dynamic contract registration, configuration file schema paths, and advanced event handler use cases. It also removes several networks from supported network documentation and updates the EVM configuration schema to allow more flexible and granular RPC endpoint configuration. Additionally, a formatting fix adds a newline to a JSON file.

Changes

File(s) Change Summary
docs/HyperIndex/Advanced/dynamic-contracts.md Added a section on "Async Contract Register" explaining asynchronous contract registration, including an example for dynamic contract address determination using async logic.
docs/HyperIndex/Guides/configuration-file.mdx Added a "Schema File Path" section to document how to customize the GraphQL schema file path via the schema option in config.yaml, with examples and default behavior.
docs/HyperIndex/Guides/event-handlers.mdx Added a line in "Advanced Use Cases" listing the ability to perform external calls for contract registration, linking to the new async contract register documentation.
docs/HyperSync/HyperRPC/hyperrpc-url-endpoints.md
docs/HyperSync/hypersync-supported-networks.md
Removed entries for Boba, Citrea Testnet, Crab, Darwinia, Internal Test Chain, Metis, and Moonbeam from the supported networks tables/lists. No other changes to network data.
static/schemas/config.evm.json Updated the schema: clarified property descriptions, added "accessList" and "authorizationList" to allowed transaction fields, introduced a new flexible rpc property for networks with detailed configuration options, and added supporting definitions (NetworkRpc, Rpc, For).
supported-networks.json Added a missing newline character at the end of the file; content unchanged.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Envio
    participant ExternalService

    User->>Envio: Register contract (async)
    Envio->>ExternalService: getContractVersion()
    ExternalService-->>Envio: Return version
    Envio->>Envio: Decide contract type (SimpleNftV2 or SimpleNft)
    Envio-->>User: Contract registered based on async result
Loading

Poem

Hop, hop, a doc update’s here,
Async contracts now crystal clear!
Networks trimmed and schemas refined,
With flexible RPCs aligned.
A newline hops in, neat and small—
This bunny’s proud to log it all!
🐇✨

Note

⚡️ AI Code Reviews for VS Code, Cursor, Windsurf

CodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback.
Learn more here.


Note

⚡️ Faster reviews with caching

CodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure Review - Disable Cache at either the organization or repository level. If you prefer to disable all data retention across your organization, simply turn off the Data Retention setting under your Organization Settings.
Enjoy the performance boost—your workflow just got faster.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between 422102e and 290c466.

📒 Files selected for processing (3)
  • docs/HyperIndex/Advanced/dynamic-contracts.md (1 hunks)
  • docs/HyperIndex/Guides/configuration-file.mdx (1 hunks)
  • docs/HyperIndex/Guides/event-handlers.mdx (1 hunks)

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

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

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
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.

Very nice.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (6)
docs/HyperIndex/Guides/configuration-file.mdx (1)

212-222: Fix typo and clarify default schema path description.

Replace “rood” with “root” and add the missing article “the” before “root directory”:

-By default, the `schema.graphql` is expected to be in rood directory of your project.
+By default, the `schema.graphql` is expected to be in the root directory of your project.
🧰 Tools
🪛 LanguageTool

[uncategorized] ~220-~220: You might be missing the article “the” here.
Context: ...e schema.graphql is expected to be in rood directory of your project. --- ## Ful...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)

static/schemas/config.evm.json (2)

29-35: Capitalize “GraphQL” in schema description.

For consistency with industry terminology, update the description to read “GraphQL schema file”:

-"description": "Custom path to schema.graphql file",
+"description": "Custom path to GraphQL schema file",

438-453: Review NetworkRpc schema definition.

The anyOf allowing a string, object, or array matches the intended flexibility. Consider adding inline descriptions for each variant in the generated JSON schema for better clarity.

docs/HyperIndex/Advanced/dynamic-contracts.md (2)

104-105: Refine Version Wording for Consistency
Consider using "As of version 2.21" or "Starting with version 2.21" for a more idiomatic phrasing. For example:

- Starting from version `2.21` you can use async contract registration.
+ As of version `2.21`, you can use async contract registration.

109-117: Clarify Prerequisite for getContractVersion
The example uses getContractVersion but does not show its import or definition. It would be helpful to add a note or comment indicating that this function must be provided by the user or imported from the appropriate module. For example, prepend:

> **Note:** Ensure you have implemented or imported `getContractVersion(address: string): Promise<string>` before using it in your handler.
docs/HyperIndex/Guides/event-handlers.mdx (1)

160-162: Improve Clarity of New Bullet
The phrasing "Perform external calls to determine the address of the contract to register" is a bit cumbersome. You might streamline it to:

- - Perform external calls to determine the address of the contract to register with [Async Contract Register](/docs/HyperIndex/dynamic-contracts#async-contract-register)
+ - Perform external calls to decide which contract address to register using [Async Contract Register](/docs/HyperIndex/dynamic-contracts#async-contract-register)
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between 0b2fe86 and 5a95b4a.

📒 Files selected for processing (7)
  • docs/HyperIndex/Advanced/dynamic-contracts.md (1 hunks)
  • docs/HyperIndex/Guides/configuration-file.mdx (1 hunks)
  • docs/HyperIndex/Guides/event-handlers.mdx (1 hunks)
  • docs/HyperSync/HyperRPC/hyperrpc-url-endpoints.md (0 hunks)
  • docs/HyperSync/hypersync-supported-networks.md (0 hunks)
  • static/schemas/config.evm.json (5 hunks)
  • supported-networks.json (1 hunks)
💤 Files with no reviewable changes (2)
  • docs/HyperSync/HyperRPC/hyperrpc-url-endpoints.md
  • docs/HyperSync/hypersync-supported-networks.md
🧰 Additional context used
🪛 LanguageTool
docs/HyperIndex/Guides/configuration-file.mdx

[uncategorized] ~220-~220: You might be missing the article “the” here.
Context: ...e schema.graphql is expected to be in rood directory of your project. --- ## Ful...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)

🔇 Additional comments (7)
supported-networks.json (1)

5-5: Add trailing newline for POSIX compliance
This change introduces a newline at the end of the JSON file, which avoids potential tooling warnings and adheres to POSIX conventions without altering any network entries.

static/schemas/config.evm.json (6)

232-241: Ensure new transaction fields are supported and documented.

The enum now includes accessList, gasUsedForL1, and authorizationList. Verify that these fields are recognized in your SDKs, type definitions, and user documentation, and that they maintain backward compatibility.


277-281: Approve refined network ID description.

The updated description “The public blockchain network ID.” is concise and clear.


283-291: Approve enhanced rpc_config description.

The expanded text clarifies when to use HyperSync vs. RPC and highlights the significant performance benefits.


293-303: Document new rpc property in user guides.

The addition of the rpc option offers flexible endpoint configuration. Please update configuration-file.mdx and schema-file.md with examples and explanations for this property.


454-533: Validate Rpc object structure and required fields.

The Rpc definition—with url and for as required fields—correctly supports detailed RPC configurations. Everything looks consistent.


534-547: Approve For enum values.

The For oneOf correctly restricts to "sync" or "fallback", matching design requirements.

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@DZakh DZakh merged commit 868521b into main May 19, 2025
1 of 3 checks passed
@DZakh DZakh deleted the dz/v2.21 branch May 19, 2025 15:53
@DenhamPreen DenhamPreen mentioned this pull request Jul 29, 2025
@coderabbitai coderabbitai bot mentioned this pull request Aug 11, 2025
@coderabbitai coderabbitai bot mentioned this pull request Oct 3, 2025
@coderabbitai coderabbitai bot mentioned this pull request Dec 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Possible typo in docs for schema field in YAML config

2 participants