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

chore: add ZetaChain Gateway address #421

Merged
merged 1 commit into from
Nov 4, 2024
Merged

Conversation

fadeev
Copy link
Member

@fadeev fadeev commented Nov 1, 2024

  • Added ZetaChain's gateway on testnet

Summary by CodeRabbit

  • New Features
    • Added a new omnichain address entry to enhance the dataset, including a new chain identifier and name.
  • Bug Fixes
    • Removed the "tMATIC" symbol from the list of possible values for ParamSymbol to ensure accuracy.

Copy link
Contributor

coderabbitai bot commented Nov 1, 2024

📝 Walkthrough

Walkthrough

This pull request includes two main changes. First, the ParamSymbol type in v2/lib/types.ts has been updated to remove the "tMATIC" symbol from its list of possible values. Second, a new entry has been added to the v2/tasks/addresses.testnet.json file, which specifies a new omnichain address along with its associated attributes, enhancing the existing dataset without modifying any other entries.

Changes

File Change Summary
v2/lib/types.ts Updated ParamSymbol type by removing "tMATIC" from the union type.
v2/tasks/addresses.testnet.json Added a new entry for an omnichain address with specified attributes (address, category, chain ID, chain name, type).

Possibly related PRs

  • chore: gateway addresses #414: This PR modifies the ParamType type definition in the same v2/lib/types.ts file, which is relevant as it also involves changes to type declarations in the same file as the main PR.

Suggested reviewers

  • skosito
  • CharlieMc0
  • brewmaster012
  • fbac
  • lumtis

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

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.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.27%. Comparing base (a91ef11) to head (c7e21ad).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #421   +/-   ##
=======================================
  Coverage   84.27%   84.27%           
=======================================
  Files           8        8           
  Lines         388      388           
  Branches      123      123           
=======================================
  Hits          327      327           
  Misses         61       61           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.yaml
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between a91ef11 and c7e21ad.

⛔ Files ignored due to path filters (1)
  • v2/data/addresses.testnet.json is excluded by !v2/data/**
📒 Files selected for processing (2)
  • v2/lib/types.ts (1 hunks)
  • v2/tasks/addresses.testnet.json (1 hunks)
🔇 Additional comments (3)
v2/lib/types.ts (1)

1-3: LGTM! Well-organized type declarations.

The type declarations are well-structured with:

  • Clear naming conventions
  • Logical grouping of mainnet/testnet identifiers
  • Comprehensive coverage of supported chains and contract types
v2/tasks/addresses.testnet.json (2)

16-22: LGTM! The new entry follows the established structure.

The new ZetaChain Gateway entry maintains consistency with other entries in terms of structure, field types, and formatting.


16-22: Please verify the ZetaChain testnet configuration.

Could you confirm:

  1. Chain ID 7001 is the correct identifier for ZetaChain testnet
  2. The gateway address 0x6c533f7fe93fae114d0954697069df33c9b74fd7 is the official ZetaChain Gateway contract address
✅ Verification successful

Based on the search results and the previous findings, I can now generate the final response:

✓ ZetaChain testnet configuration verified

The configuration is correct:

  1. Chain ID 7001 is consistently used as the ZetaChain testnet identifier across the codebase, as evidenced by multiple references in both v1 and v2 task files
  2. The gateway address 0x6c533f7fe93fae114d0954697069df33c9b74fd7 is only used in the testnet configuration and appears to be properly isolated to the testnet environment
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Search for any other occurrences of the ZetaChain testnet chain ID or address
# to verify consistency across the codebase

echo "Searching for ZetaChain testnet chain ID..."
rg -g '!*.json' "7001|zeta_testnet"

echo "Searching for the gateway address..."
rg -g '!*.json' "6c533f7fe93fae114d0954697069df33c9b74fd7"

Length of output: 92735


Script:

#!/bin/bash
# Let's search for the gateway address in JSON files to find any other occurrences
# and verify its consistency across configurations
echo "Searching for the gateway address in JSON files..."
rg "6c533f7fe93fae114d0954697069df33c9b74fd7" "*.json"

# Let's also check if there are any other gateway addresses configured for ZetaChain testnet
echo "Searching for other ZetaChain testnet gateway configurations..."
rg -g "*.json" -C2 '"chain_name":\s*"zeta_testnet".*"type":\s*"gateway"'

Length of output: 424


Script:

#!/bin/bash
# Let's try searching with correct paths and patterns
echo "Searching for the gateway address in JSON files..."
rg "6c533f7fe93fae114d0954697069df33c9b74fd7" v1/tasks/addresses.*.json v2/tasks/addresses.*.json

echo "Searching for ZetaChain testnet gateway configurations..."
rg -g "*.json" -C2 '"chain_name": "zeta_testnet".*"type": "gateway"' v1/tasks/ v2/tasks/

# Let's also check the official ZetaChain documentation or config files
echo "Searching for ZetaChain chain ID references..."
rg -g "*.md" -g "*.json" "chain.*id.*7001|zetachain.*testnet" v1/docs/ v2/docs/

Length of output: 778

@lumtis lumtis merged commit 3ede272 into main Nov 4, 2024
11 checks passed
@lumtis lumtis deleted the zetachain-gateway-address branch November 4, 2024 10:36
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.

5 participants