Skip to content

Add Cytonic Testnet network#686

Merged
kvhnuke merged 2 commits intoenkryptcom:devop/packeupdates-0512from
multivmlabs:add-cytonic-network
May 13, 2025
Merged

Add Cytonic Testnet network#686
kvhnuke merged 2 commits intoenkryptcom:devop/packeupdates-0512from
multivmlabs:add-cytonic-network

Conversation

@ChronosXYZ
Copy link
Contributor

@ChronosXYZ ChronosXYZ commented May 13, 2025

Summary by CodeRabbit

  • New Features
    • Added support for the Cytonic Testnet network, including full configuration and integration into the network selection.
    • Users can now view Cytonic Testnet activity and access its block explorer directly from the app.

@coderabbitai
Copy link

coderabbitai bot commented May 13, 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

A new Ethereum-compatible network configuration for the Cytonic Testnet was introduced, including its endpoint mapping, network options, and integration into the existing network registry. The changes extend the network enum, add the network's configuration, and update the list of available networks.

Changes

File(s) Change Summary
packages/types/src/networks.ts Added CytonicTestnet to the NetworkNames enum.
packages/extension/src/providers/ethereum/libs/activity-handlers/providers/etherscan/configs.ts Added endpoint mapping for NetworkNames.CytonicTestnet to the NetworkEndpoints record.
packages/extension/src/providers/ethereum/networks/cytonic-testnet.ts Introduced Cytonic Testnet network configuration and exported a new EvmNetwork instance.
packages/extension/src/providers/ethereum/networks/index.ts Imported and registered the new Cytonic Testnet network in the exported networks object.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Extension
    participant CytonicTestnet
    participant EtherscanAPI

    User->>Extension: Selects Cytonic Testnet
    Extension->>CytonicTestnet: Loads network configuration
    Extension->>EtherscanAPI: Uses CytonicTestnet endpoint for activity queries
    EtherscanAPI-->>Extension: Returns activity data
    Extension-->>User: Displays Cytonic Testnet activity
Loading

Possibly related PRs

  • feat: add derive network #680: Adds a new Derive network configuration and endpoint mapping, modifying similar files and structures for a different network.

Suggested reviewers

  • kvhnuke
  • SemajaM8

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

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 (2)
packages/extension/src/providers/ethereum/networks/index.ts (1)

74-74: Group import with other testnet networks
Consider moving import cytonicTestnetNode from './cytonic-testnet'; alongside existing *Testnet imports (e.g., sepoliaNode, rootstockTestnetNode) to maintain logical grouping and improve readability in this large import list.

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

7-20: Validate EvmNetworkOptions configuration
The netOptions object covers all required fields for EvmNetwork. For enhanced features, consider adding optional fields:

  • coingeckoPlatform/coingeckoID to enable price lookups for CCC
  • buyLink if token purchase support is needed in the UI
    These would improve user experience but are not strictly required.
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between c6d81f2 and 64ad768.

📒 Files selected for processing (4)
  • packages/extension/src/providers/ethereum/libs/activity-handlers/providers/etherscan/configs.ts (1 hunks)
  • packages/extension/src/providers/ethereum/networks/cytonic-testnet.ts (1 hunks)
  • packages/extension/src/providers/ethereum/networks/index.ts (2 hunks)
  • packages/types/src/networks.ts (1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
packages/extension/src/providers/ethereum/networks/cytonic-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)
🔇 Additional comments (5)
packages/types/src/networks.ts (1)

109-109: New enum member for Cytonic Testnet
Entry CytonicTestnet = "CytonicTestnet" correctly adds the new network identifier to the NetworkNames enum, ensuring type-safety and consistency across the codebase.

packages/extension/src/providers/ethereum/libs/activity-handlers/providers/etherscan/configs.ts (1)

74-74: Verify API endpoint correctness for Cytonic Testnet
The new mapping [NetworkNames.CytonicTestnet] points to https://explorer-api.evm.testnet.cytonic.com/api/. Ensure this base URL and trailing /api/ segment align with how EtherscanActivity constructs its request paths (to avoid duplicated /api segments or missing endpoints).

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

158-159: Register Cytonic Testnet in networks export
Adding cytonicTestnet: cytonicTestnetNode ensures the new network is available in the default export. The key matches the import and the NetworkNames enum.

packages/extension/src/providers/ethereum/networks/cytonic-testnet.ts (2)

1-6: Verify icon import and dependencies
The icon import ./icons/cytonic.webp and aliases (@/libs/activity-state/wrap-activity-handler, ../libs/activity-handlers) must resolve correctly. Please confirm that cytonic.webp exists under networks/icons/ with the expected dimensions/format and that these imports build without errors.


22-24: Instantiate and export Cytonic Testnet network
The pattern const cytonicTestnet = new EvmNetwork(netOptions); export default cytonicTestnet; matches existing network modules and correctly makes the new network available.

@kvhnuke kvhnuke changed the base branch from main to devop/packeupdates-0512 May 13, 2025 17:21
@kvhnuke kvhnuke merged commit c5e82a7 into enkryptcom:devop/packeupdates-0512 May 13, 2025
1 of 2 checks passed
@coderabbitai coderabbitai bot mentioned this pull request May 13, 2025
@coderabbitai coderabbitai bot mentioned this pull request Aug 18, 2025
@coderabbitai coderabbitai bot mentioned this pull request Sep 10, 2025
@coderabbitai coderabbitai bot mentioned this pull request Sep 22, 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.

2 participants