Skip to content

Conversation

@Klyaus
Copy link
Contributor

@Klyaus Klyaus commented Apr 11, 2025

Added support for Unit Zero and Unit Zero Testnet networks from the Units Network ecosystem

Summary by CodeRabbit

  • New Features
    • Added support for the "Unit Zero" and "Unit Zero Testnet" blockchain networks.
  • Documentation
    • Updated the supported chains list to include "Unit Zero" and "Unit Zero Testnet".

@coderabbitai
Copy link

coderabbitai bot commented Apr 11, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (3)
  • main
  • develop
  • devop/vite-migrate

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

Two new Ethereum-compatible networks, "Unit Zero" and "Unit Zero Testnet," are added to the supported chains. This involves updating the documentation, extending network enums, creating configuration files for both networks, and registering them in the network provider index for use within the application.

Changes

File(s) Change Summary
README.md Added "Unit Zero" and "Unit Zero Testnet" to the list of currently supported chains.
packages/types/src/networks.ts Added UnitZero and UnitZeroTestnet to NetworkNames enum; added UnitZero to CoingeckoPlatform enum.
packages/extension/src/providers/ethereum/networks/unitzero.ts New file: Defines and exports the configuration for the Unit Zero EVM network.
packages/extension/src/providers/ethereum/networks/unitzero-testnet.ts New file: Defines and exports the configuration for the Unit Zero Testnet EVM network.
packages/extension/src/providers/ethereum/networks/index.ts Imports and registers unitZero and unitZeroTestnet into the exported networks object.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant App
    participant NetworksIndex
    participant UnitZeroConfig
    participant UnitZeroTestnetConfig

    User->>App: Selects network (Unit Zero or Unit Zero Testnet)
    App->>NetworksIndex: Requests network configuration
    NetworksIndex->>UnitZeroConfig: If Unit Zero selected, provide config
    NetworksIndex->>UnitZeroTestnetConfig: If Unit Zero Testnet selected, provide config
    App-->>User: Connects to selected network using provided configuration
Loading

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.

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

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.

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

@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 (3)
packages/extension/src/providers/ethereum/networks/unitzero-testnet.ts (2)

22-22: Variable name should match the network type.

The variable name unitZero doesn't match the network it represents (testnet). This could lead to confusion, especially since there's another file defining the actual Unit Zero mainnet.

-const unitZero = new EvmNetwork(unitZeroTestnetOptions);
+const unitZeroTestnet = new EvmNetwork(unitZeroTestnetOptions);

24-24: Export variable name should match network type.

The export should use the correct variable name to properly represent the testnet network.

-export default unitZero;
+export default unitZeroTestnet;
packages/extension/src/providers/ethereum/networks/unitzero.ts (1)

7-7: Remove extra blank line for consistency.

There's an unnecessary blank line that could be removed to maintain consistent formatting.

import { EvmNetwork, EvmNetworkOptions } from '../types/evm-network';

-
const unitZeroOptions: EvmNetworkOptions = {
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c11549f and 36d9b65.

📒 Files selected for processing (6)
  • README.md (1 hunks)
  • packages/extension/src/providers/common/libs/new-features.ts (1 hunks)
  • packages/extension/src/providers/ethereum/networks/index.ts (2 hunks)
  • packages/extension/src/providers/ethereum/networks/unitzero-testnet.ts (1 hunks)
  • packages/extension/src/providers/ethereum/networks/unitzero.ts (1 hunks)
  • packages/types/src/networks.ts (2 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
packages/extension/src/providers/ethereum/networks/unitzero-testnet.ts (2)
packages/extension/src/providers/ethereum/types/evm-network.ts (2)
  • EvmNetworkOptions (25-56)
  • EvmNetwork (58-293)
packages/extension/src/providers/ethereum/libs/activity-handlers/index.ts (1)
  • EtherscanActivity (10-10)
🪛 LanguageTool
README.md

[grammar] ~119-~119: This phrase is duplicated. You should probably use “Unit Zero” only once.
Context: ...in - Ink Onchain - Unichain - Gravity - Unit Zero - Unit Zero Testnet - More coming soon! Looking to...

(PHRASE_REPETITION)

🔇 Additional comments (8)
packages/extension/src/providers/common/libs/new-features.ts (1)

12-12: LGTM! Network added correctly to newNetworks array.

The Unit Zero network has been properly added to the newNetworks array, which is used to track newly added networks in the system.

README.md (1)

119-120: LGTM! New networks correctly added to supported chains list.

Both "Unit Zero" and "Unit Zero Testnet" have been properly added to the list of supported chains in the README. The placement and formatting are consistent with other entries.

🧰 Tools
🪛 LanguageTool

[grammar] ~119-~119: This phrase is duplicated. You should probably use “Unit Zero” only once.
Context: ...in - Ink Onchain - Unichain - Gravity - Unit Zero - Unit Zero Testnet - More coming soon! Looking to...

(PHRASE_REPETITION)

packages/extension/src/providers/ethereum/networks/unitzero-testnet.ts (1)

1-20: Configuration for Unit Zero Testnet looks good.

The network configuration includes all required properties for an EvmNetwork: name, homepage URL, block explorer URLs, chain ID, currency details, and node URL. The testnet is properly marked with isTestNetwork: true.

packages/extension/src/providers/ethereum/networks/unitzero.ts (1)

1-23: Configuration for Unit Zero mainnet looks good.

The network configuration includes all required properties for an EvmNetwork: name, homepage URL, block explorer URLs, chain ID, currency details, and node URL. Additionally, proper coingeckoID and coingeckoPlatform values are included, which is appropriate for mainnet networks.

packages/types/src/networks.ts (2)

109-110: Correctly implemented network name additions

The new UnitZero and UnitZeroTestnet entries have been properly added to the NetworkNames enum following the established pattern in the codebase.


176-177: Coingecko platform identifiers properly added

The Coingecko platform identifiers for Unit Zero and Unit Zero Testnet follow the existing kebab-case naming convention used throughout the enum.

packages/extension/src/providers/ethereum/networks/index.ts (2)

74-75: Network imports correctly added

The imports for Unit Zero and Unit Zero Testnet networks are properly defined following the existing import pattern.


159-161: Network exports properly configured

The Unit Zero and Unit Zero Testnet networks have been correctly added to the exports object. The trailing comma after the coti entry has been properly added to support the new entries.

@kvhnuke kvhnuke changed the base branch from main to devop/packeupdates-0512 May 12, 2025 20:01
@kvhnuke kvhnuke merged commit bb046c7 into enkryptcom:devop/packeupdates-0512 May 12, 2025
2 checks passed
@coderabbitai coderabbitai bot mentioned this pull request May 14, 2025
@coderabbitai coderabbitai bot mentioned this pull request Aug 29, 2025
@coderabbitai coderabbitai bot mentioned this pull request Nov 5, 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.

3 participants