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

feat: update zaar to zaar-testnet-2 #273

Merged
merged 1 commit into from
Feb 6, 2025
Merged

feat: update zaar to zaar-testnet-2 #273

merged 1 commit into from
Feb 6, 2025

Conversation

ALPAC-4
Copy link
Collaborator

@ALPAC-4 ALPAC-4 commented Feb 6, 2025

  • update zaar to zaar-testnet-2
  • update initia-registry npm package to v0.2.3

Summary by CodeRabbit

  • Chores

    • Bumped package version to 0.2.3.
    • Updated testnet configurations with new identifiers and service endpoints.
  • New Features

    • Added several token assets, including Noble USDC and an enhanced USDC listing, expanding the token registry across networks.
  • Refactor

    • Revised asset identifiers and updated chain display names for a more consistent and reliable user experience.

Copy link

coderabbitai bot commented Feb 6, 2025

Walkthrough

This pull request updates the version of the registry package and makes extensive modifications to asset definitions and chain configurations across multiple testnets. It updates denomination and base values, revises contract and channel details, and adds new asset entries. Chain metadata and API endpoints for testnets such as zaar, initia, culinaris, and yominet are revised to reflect new identifiers, channels, and domains without altering the underlying functionality.

Changes

File(s) Change Summary
_packages/initia-registry/package.json Updated version from "0.2.2" to "0.2.3".
_packages/initia-registry/src/testnet/{civitia, initia}/assets.ts For "Wrapped Minievm GAS": updated denom, base, contract, and counterparty details. In civitia, added a new asset "Noble USDC".
_packages/initia-registry/src/testnet/culinaris/assets.ts Added a new USDC asset entry with full IBC trace details.
_packages/initia-registry/src/testnet/yominet/{assets.ts, chain.ts} Added three new asset entries and updated chain configuration: changed pretty_name from "PreYominet" to "Kamigotchi" and updated associated image URLs.
_packages/initia-registry/src/testnet/zaar/{assets.ts, chain.ts} Updated "Fake ZAAR Token" (denom, base, and address); added "Initia Native Token" and "USDC"; revised chain configuration including chain_id, evm_chain_id, API endpoints, op_bridge_id, and executor_uri.
testnets/initia/chain.json Modified metadata: updated chain_id and channel IDs for transfer and nft-transfer.
testnets/zaar/{assetlist.json, chain.json} Updated asset details: adjusted denom, base, address for tokens and revised chain configuration parameters (chain IDs, API endpoints, bridge details).

Possibly related PRs

Suggested reviewers

  • simcheolhwan

Poem

I hopped through code with nimble feet,
Updating tokens and chains so neat.
New assets bloom like springtime cheer,
With every change, a brighter sphere.
A rabbit’s dance in lines of code brings delight so sweet!
🐇✨

Tip

🌐 Web search-backed reviews and chat
  • We have enabled web search-based reviews and chat for all users. This feature allows CodeRabbit to access the latest documentation and information on the web.
  • You can disable this feature by setting web_search: false in the knowledge_base settings.
  • Please share any feedback in the Discord discussion.

📜 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 174cb2c and edbd76a.

📒 Files selected for processing (12)
  • _packages/initia-registry/package.json (1 hunks)
  • _packages/initia-registry/src/testnet/civitia/assets.ts (3 hunks)
  • _packages/initia-registry/src/testnet/culinaris/assets.ts (1 hunks)
  • _packages/initia-registry/src/testnet/initia/assets.ts (2 hunks)
  • _packages/initia-registry/src/testnet/initia/chain.ts (1 hunks)
  • _packages/initia-registry/src/testnet/yominet/assets.ts (1 hunks)
  • _packages/initia-registry/src/testnet/yominet/chain.ts (1 hunks)
  • _packages/initia-registry/src/testnet/zaar/assets.ts (3 hunks)
  • _packages/initia-registry/src/testnet/zaar/chain.ts (4 hunks)
  • testnets/initia/chain.json (1 hunks)
  • testnets/zaar/assetlist.json (4 hunks)
  • testnets/zaar/chain.json (4 hunks)
✅ Files skipped from review due to trivial changes (1)
  • _packages/initia-registry/package.json
🧰 Additional context used
📓 Learnings (1)
testnets/zaar/chain.json (1)
Learnt from: ALPAC-4
PR: initia-labs/initia-registry#248
File: testnets/zaar/chain.json:5-5
Timestamp: 2025-01-14T07:16:32.354Z
Learning: The correct EVM chain ID for the Zaar testnet (zaar-testnet-1) is 3814270102388757.
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: Cloudflare Pages: registry-initiation-1
🔇 Additional comments (26)
_packages/initia-registry/src/testnet/yominet/chain.ts (1)

5-5: LGTM!

The name change from "PreYominet" to "Kamigotchi" is consistent with the image and logo URLs.

_packages/initia-registry/src/testnet/zaar/chain.ts (1)

5-6: LGTM! Verify EVM chain ID uniqueness.

The changes reflect a comprehensive transition to "zaar-testnet-2" with updated identifiers and service endpoints.

Let's verify that the new EVM chain ID is unique across all chains:

Also applies to: 18-18, 29-29, 34-34, 39-39, 44-44, 49-49, 64-66

✅ Verification successful

🏁 Script executed:

#!/bin/bash
# Description: Check for duplicate EVM chain IDs across all chain.ts files.
# Expected: Only one occurrence of the EVM chain ID.

ast-grep --pattern 'evm_chain_id: $id' | sort | uniq -c | sort -nr | grep -v '^ *1 '

Length of output: 86


Below is an updated script that extracts evm_chain_id values from all chain.ts files (using a regex to capture the numeric value) and then checks for duplicates. Please run this script and verify that it outputs “All evm_chain_id values are unique.” If any duplicate entries are reported, then further investigation will be needed.

Once you run this script:

  • If you see “All evm_chain_id values are unique.” then the new evm_chain_id (113765719155157) is indeed unique.
  • If not, please review the duplicate entries reported.

🏁 Script executed:

#!/bin/bash
echo "Checking for duplicate evm_chain_id values in all chain.ts files..."

# Use ripgrep (rg) to extract numeric evm_chain_id values from files ending in chain.ts
evm_ids=$(rg -o 'evm_chain_id:\s*\K\d+' -g '*chain.ts' .)

if [ -z "$evm_ids" ]; then
    echo "No evm_chain_id entries found in chain.ts files."
    exit 1
fi

# Sort the IDs and count each occurrence
duplicates=$(echo "$evm_ids" | sort | uniq -c | awk '$1 > 1')

if [ -n "$duplicates" ]; then
    echo "Duplicate evm_chain_id entries found:"
    echo "$duplicates"
    exit 1
else
    echo "All evm_chain_id values are unique."
fi

Length of output: 563


Below is an updated script that avoids using the unsupported escape sequence. This script uses a simple regex with sed to strip the prefix and extract the numeric evm_chain_id values. Please run this script to confirm that all evm_chain_id values in the chain.ts files are unique.

After running this script:

  • If you see "All evm_chain_id values are unique.", then the new evm_chain_id value (113765719155157) is unique.
  • Otherwise, please investigate the duplicate entries.

🏁 Script executed:

#!/bin/bash
echo "Checking for duplicate evm_chain_id values in all chain.ts files..."

# Extract lines with 'evm_chain_id:' and then remove the prefix to get only the numeric value
evm_ids=$(rg -o 'evm_chain_id:\s*[0-9]+' -g '*chain.ts' . | sed 's/evm_chain_id:\s*//')

if [ -z "$evm_ids" ]; then
    echo "No evm_chain_id entries found in chain.ts files."
    exit 1
fi

# Sort the IDs, count each occurrence, and find any duplicates
duplicates=$(echo "$evm_ids" | sort | uniq -c | awk '$1 > 1')

if [ -n "$duplicates" ]; then
    echo "Duplicate evm_chain_id entries found:"
    echo "$duplicates"
    exit 1
else
    echo "All evm_chain_id values are unique."
fi

Length of output: 1412


EVM Chain ID Uniqueness Verified

The execution confirms that each evm_chain_id value across all chain.ts files is unique. Specifically, the following IDs were extracted:

  • culinaris: 2906125577721809
  • zaar: 113765719155157
  • yominet: 4471190363524365
  • minievm: 4303131403034904

No duplicates were found.

_packages/initia-registry/src/testnet/culinaris/assets.ts (1)

77-119: LGTM!

The new USDC asset is properly configured with:

  • Clear indication that it's a test asset ("The fake USDC")
  • Correct IBC configuration with proper channel IDs
  • Consistent image and logo URIs
_packages/initia-registry/src/testnet/zaar/assets.ts (1)

10-10: LGTM!

The changes are consistent and well-structured:

  • Updated ERC20 contract address matches the fee token denom in chain.ts
  • New Initia Native Token with bridge ID matching op_bridge_id in chain.ts
  • New USDC asset with configuration matching culinaris/assets.ts

Also applies to: 19-20, 36-119

_packages/initia-registry/src/testnet/yominet/assets.ts (2)

36-78: LGTM! Well-structured asset entry for Fake USDC.

The asset entry is complete with all required fields and proper IBC traces configuration.


79-119: LGTM! Well-structured asset entry for Initia native token.

The asset entry is complete with all required fields and proper OP traces configuration.

_packages/initia-registry/src/testnet/civitia/assets.ts (2)

52-52: LGTM! Consistent updates to Wrapped Minievm GAS asset.

The changes to denom, base values, and traces are consistent with the updates across other files.

Also applies to: 60-60, 69-69, 71-71, 76-76


91-119: LGTM! Well-structured asset entry for Noble USDC.

The asset entry is complete with all required fields and consistent image usage.

_packages/initia-registry/src/testnet/initia/chain.ts (1)

220-222: LGTM! Consistent updates to zaar-testnet IBC channels.

The changes align with the PR objective to update zaar to zaar-testnet-2 and include corresponding channel ID updates.

Also applies to: 226-228

_packages/initia-registry/src/testnet/initia/assets.ts (1)

346-346: LGTM! Consistent updates to Wrapped Minievm GAS asset.

The changes to denom, base, contract, and base_denom values are consistent with updates across other files.

Also applies to: 354-354, 367-367, 375-375, 380-380

testnets/zaar/chain.json (9)

4-5: Updated Chain Identifiers
The chain_id has been updated to "zaar-testnet-2", and the evm_chain_id has been updated accordingly. Please verify that all dependent services and configurations referencing these identifiers (e.g., in related chain or asset files) are also updated.


17-17: Updated Denom for Fee Tokens
The denom for fee tokens is changed to "evm/6ed1637781269560b204c27Cd42d95e057C4BE44". Confirm that any related asset definitions (e.g. in assetlist.json) and smart contract deployments use this same identifier.


28-29: Updated RPC API Endpoint
The RPC endpoint now points to "https://rpc-zaar-testnet-2.anvil.testnet.initia.xyz". Ensure that the new endpoint is correctly routable and that client configurations are updated as needed.


32-33: Updated REST API Endpoint
The REST API endpoint has been updated to "https://rest-zaar-testnet-2.anvil.testnet.initia.xyz". Verify that this endpoint is operational and consistent with the overall testnet configuration.


36-38: Updated gRPC API Endpoint
The gRPC address now reflects the new testnet by using "grpc-zaar-testnet-2.anvil.testnet.initia.xyz:443". Confirm that connection parameters (such as port and security settings) remain valid.


41-44: Updated JSON-RPC Endpoint
The JSON-RPC address has been updated to "https://jsonrpc-zaar-testnet-2.anvil.testnet.initia.xyz". Please ensure clients and middleware that depend on JSON-RPC connectivity are tested with this new endpoint.


46-49: Updated JSON-RPC Websocket Endpoint
The websocket endpoint now points to "wss://jsonrpc-ws-zaar-testnet-2.anvil.testnet.initia.xyz". Verify the stability and security of the websocket connection under this configuration.


63-63: Updated op_bridge_id in Metadata
The op_bridge_id is updated to "612". Confirm that any downstream systems or integrations that rely on this identifier are aware of and compatible with the update.


65-65: Updated Executor URI
The executor_uri now reflects the new testnet endpoint "https://opinit-api-zaar-testnet-2.anvil.testnet.initia.xyz". Ensure that any client or server-side components consuming this URI are updated and tested.

testnets/zaar/assetlist.json (5)

9-9: Updated Denom for Fake ZAAR Token
The denomination for the Fake ZAAR Token is updated to "evm/6ed1637781269560b204c27Cd42d95e057C4BE44". This change should be coordinated with front-end displays and any contract interactions.


18-19: Updated Address and Base for Fake ZAAR Token
Both the address and base fields have been updated to "0x6ed1637781269560b204c27Cd42d95e057C4BE44". Please confirm that these values are now consistent with the corresponding token contract deployments and other asset references.


39-39: Updated Denom for Initia Native Token
The denomination for the Initia Native Token is updated to "l2/a7add6c5aed49e3f4afa45e63f6fdba01fa5be2d1bf6a5b225d0bec9e9e34988". Verify that this update matches its usage in smart contracts and token displays.


47-47: Updated Base for Initia Native Token
The base field for the Initia Native Token has been updated accordingly. Ensure that this change is reflected in any dependent services and that on-chain references are consistent.


57-57: Updated Bridge ID for Initia Native Token Trace
Within the trace definition, the bridge_id is updated to "612". Confirm that all cross-chain communication setups are aligned with this new identifier.

testnets/initia/chain.json (2)

309-312: Updated IBC Channel for Zaar Testnet (Transfer)
The IBC channel configuration now uses "zaar-testnet-2" as the chain_id with "channel-1321" for the transfer port. Ensure that these values are correctly integrated with any inter-chain communication protocols and that related documentation is updated.


315-317: Updated IBC Channel for Zaar Testnet (NFT-Transfer)
The NFT-transfer channel configuration is updated with "zaar-testnet-2" as the chain_id and "channel-1322" as the channel_id. Verify that these settings are consistent with the expected testnet behavior and external channel configurations.

✨ Finishing Touches
  • 📝 Generate Docstrings (Beta)

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

@ALPAC-4 ALPAC-4 merged commit 26f3e05 into main Feb 6, 2025
12 checks passed
@ALPAC-4 ALPAC-4 deleted the feat/zaar-testnet-2 branch February 6, 2025 06:59
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.

2 participants