Skip to content
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

config(bens): index address lookups for apechain testnet #1242

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

renatoalencar
Copy link
Contributor

@renatoalencar renatoalencar commented Feb 7, 2025

Add configs for Apechain testnet so it can index address lookups for D3 and display them on the explorer.

Summary by CodeRabbit

  • New Features
    • Expanded blockchain support now enables connectivity with both Ape Mainnet and Ape Testnet.
    • Added new network configurations for D3 Connect, enhancing access to additional protocols.
    • Improved integration details for the D3 Connect platform, including metadata for better user experience.
    • Introduced new protocol configurations for D3 Connect on Ape Testnet and Mainnet.
    • Added new network entries for "ape-testnet" with specific registry and resolver details.

@renatoalencar renatoalencar marked this pull request as ready for review February 7, 2025 22:17
Copy link
Contributor

coderabbitai bot commented Feb 7, 2025

Walkthrough

This update adds support for additional D3 Connect networks and protocols. In the bens-server configuration, new network entries for IDs 33111 and 33139 are introduced with corresponding blockscout URLs, protocols (d3-connect-ape-testnet and d3-connect-ape-mainnet), and RPC endpoints. Alongside these, new protocol configurations are defined with subgraph names and specific contract addresses. The graph-node configuration files have been updated to include new chains (ape-mainnet and ape-testnet) with their provider details. Additionally, the deployer configuration now features an entry for d3-connect-ape-testnet, and the subgraph networks configuration has been extended with a new ape-testnet entry that specifies both Registry and Resolver information.

Possibly related PRs

  • feat(bens): add zns-ink #1222: The changes in the main PR are related to the addition of the d3-connect-ape-testnet protocol and its configuration, which is also referenced in the retrieved PR's modifications to the prod.json file, specifically regarding the handling of protocols.
  • feat(bens): add indexing reverse records to d3-connect  #1220: The changes in the main PR and the retrieved PR are related as both introduce new network configurations and protocols for the d3-connect platform, specifically focusing on the d3-connect-ape-testnet protocol in the main PR and the d3-connect-shib-testnet protocol in the retrieved PR, which share similar structural modifications.
  • bens(config): add ape chain to configs #1188: The changes in the main PR are related to the addition of network configurations and protocols for d3-connect-ape-testnet and d3-connect-ape-mainnet, while the retrieved PR also adds configurations for d3-connect-ape and ape-mainnet, indicating a direct connection in the context of network and protocol definitions.

Poem

I'm a coding rabbit with a happy little hop,
Config gardens blossom where new networks top,
With ape chains and subgraphs shining in the night,
I nibble on updates with joyful delight,
Hopping through configs in a springtime parade,
Celebrating fresh changes in every byte! 🐰


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9616f5c and f8e3665.

📒 Files selected for processing (2)
  • blockscout-ens/bens-server/config/dev.json (3 hunks)
  • blockscout-ens/bens-server/config/prod.json (3 hunks)
🧰 Additional context used
🪛 Gitleaks (8.21.2)
blockscout-ens/bens-server/config/dev.json

142-142: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)


160-160: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

blockscout-ens/bens-server/config/prod.json

468-468: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Unit, doc and integration tests
🔇 Additional comments (5)
blockscout-ens/bens-server/config/dev.json (2)

39-56: LGTM! Network configurations are well-structured.

The network configurations for Apechain testnet (33111) and mainnet (33139) follow the established pattern and include all necessary components:

  • Blockscout URLs
  • Protocol specifications
  • RPC endpoints

135-162: LGTM! Protocol configurations are consistent.

The protocol configurations for d3-connect-ape-testnet and d3-connect-ape-mainnet are well-structured and consistent with other D3 Connect protocols:

  • Correct TLD list
  • Matching network IDs
  • Appropriate subgraph names
  • Consistent address resolution technique
  • Required contract addresses
🧰 Tools
🪛 Gitleaks (8.21.2)

142-142: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)


160-160: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

blockscout-ens/bens-server/config/prod.json (3)

100-108: LGTM! Network configuration is well-structured.

The network configuration for Apechain testnet (33111) follows the established pattern and includes all necessary components:

  • Blockscout URL
  • Protocol specification
  • RPC endpoint

461-478: LGTM! Protocol configuration is consistent.

The protocol configuration for d3-connect-ape-testnet is well-structured and consistent with other D3 Connect protocols:

  • Correct TLD list
  • Matching network ID
  • Appropriate subgraph name
  • Consistent address resolution technique
  • Required contract addresses
🧰 Tools
🪛 Gitleaks (8.21.2)

468-468: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)


492-492: LGTM! Description update is consistent.

The description update for D3 Connect protocols is consistent across all instances.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 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.
    • Generate unit testing code for this file.
    • 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 generate unit testing code for this file.
    • @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 generate unit testing code.
    • @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.

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. (Beta)
  • @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
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: 0

🧹 Nitpick comments (1)
blockscout-ens/graph-node/subgraphs/d3-connect-subgraph/networks.json (1)

24-34: New 'ape-testnet' network entry added:
The new entry correctly defines the "ape-testnet" network with its own "Registry" and "Resolver" sections including the specified addresses and startBlock values. This aligns with the PR objectives to support additional networks.
Note: The presence of an empty key ("": "") is consistent with other entries, but please confirm if it’s intended or could be omitted for clarity.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d02877c and 1782d2a.

📒 Files selected for processing (4)
  • blockscout-ens/bens-server/config/dev.json (2 hunks)
  • blockscout-ens/graph-node/config.toml (1 hunks)
  • blockscout-ens/graph-node/deployer/config.json (1 hunks)
  • blockscout-ens/graph-node/subgraphs/d3-connect-subgraph/networks.json (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Unit, doc and integration tests
🔇 Additional comments (6)
blockscout-ens/graph-node/config.toml (3)

51-52: Consistent shard configuration added for shibarium-testnet:
Adding shard = "primary" for the shibarium-testnet chain ensures uniformity with the other chain configurations.


53-58: New chain configuration for 'ape-mainnet':
This section introduces the ape-mainnet chain with the correct provider URL (https://rpc.apechain.com) and shard setting. The configuration is in line with the project’s expansion to support additional networks.


59-63: New chain configuration for 'ape-testnet':
The addition of the ape-testnet chain with provider URL https://curtis.rpc.caldera.xyz/http and shard = "primary" is correctly implemented. Ensure that the endpoint connectivity is validated during integration testing.

blockscout-ens/graph-node/deployer/config.json (1)

73-77: New protocol configuration for 'd3-connect-ape-testnet':
This new protocol entry appropriately links the "ape-testnet" network to its subgraph by specifying the subgraph path, subgraph name, and the corresponding network. It correctly extends the deployment configuration without altering existing protocols.

blockscout-ens/bens-server/config/dev.json (2)

39-47: New network configuration for network ID '33111' (ape-testnet):
This configuration adds support for the "ape-testnet" network by using the correct blockscout URL (https://curtis.explorer.caldera.xyz/) and RPC endpoint (https://curtis.rpc.caldera.xyz/http). Associating it with the d3-connect-ape-testnet protocol meets the intended design.


48-56: New network configuration for network ID '33139' (ape-mainnet):
The configuration for network ID 33139 properly specifies the blockscout URL (https://apescan.io/) and RPC URL (https://rpc.apechain.com/) and assigns the d3-connect-ape-mainnet protocol. This addition is consistent with the overall configuration strategy.

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

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1782d2a and 9616f5c.

📒 Files selected for processing (1)
  • blockscout-ens/bens-server/config/prod.json (2 hunks)
🧰 Additional context used
🪛 Gitleaks (8.21.2)
blockscout-ens/bens-server/config/prod.json

468-468: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Unit, doc and integration tests
🔇 Additional comments (2)
blockscout-ens/bens-server/config/prod.json (2)

100-108: LGTM!

The network configuration for Apechain testnet (ID: 33111) follows the established pattern and includes all required fields.


468-469: Verify contract addresses.

Please verify that these contract addresses are correct for the Apechain testnet:

  • Native token contract: 0xA6A33ddE98BAb3ee5262e7e1a14ee5B1F06D0D40
  • Resolver contract: 0x2ad234136165B59f98cf03f696cB84eaf48E30cF
✅ Verification successful

🏁 Script executed:

#!/bin/bash
# Description: Verify contract addresses exist on the Apechain testnet

# Check if the contracts exist and are verified
curl -s -X POST -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"eth_getCode","params":["0xA6A33ddE98BAb3ee5262e7e1a14ee5B1F06D0D40", "latest"],"id":1}' \
  https://curtis.rpc.caldera.xyz/http

curl -s -X POST -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"eth_getCode","params":["0x2ad234136165B59f98cf03f696cB84eaf48E30cF", "latest"],"id":1}' \
  https://curtis.rpc.caldera.xyz/http

Length of output: 3327


Contract Addresses Verified for Apechain Testnet

Both contract addresses return valid, non-empty contract bytecode on the Apechain testnet. The output from the RPC calls confirms that there is deployed contract code at both addresses:

  • Native token contract (0xA6A33ddE98BAb3ee5262e7e1a14ee5B1F06D0D40)
  • Resolver contract (0x2ad234136165B59f98cf03f696cB84eaf48E30cF)

Thus, these addresses are correct as per the test output.

🧰 Tools
🪛 Gitleaks (8.21.2)

468-468: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

"meta": {
"short_name": "D3 Connect",
"title": "D3 Connect",
"description": "D3 Connect is a platform for connecting to the Shibarium network.",
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Update the protocol description.

The description incorrectly mentions "Shibarium network" for the Apechain testnet protocol.

-          "description": "D3 Connect is a platform for connecting to the Shibarium network.",
+          "description": "D3 Connect is a platform for connecting to the Apechain network.",
📝 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
"description": "D3 Connect is a platform for connecting to the Shibarium network.",
"description": "D3 Connect is a platform for connecting to the Apechain network.",

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.

1 participant