Skip to content

Adds Taraxa chain#642

Closed
VargaElod23 wants to merge 2 commits intoenkryptcom:mainfrom
VargaElod23:main
Closed

Adds Taraxa chain#642
VargaElod23 wants to merge 2 commits intoenkryptcom:mainfrom
VargaElod23:main

Conversation

@VargaElod23
Copy link

@VargaElod23 VargaElod23 commented Mar 18, 2025

Summary by CodeRabbit

  • Documentation

    • Updated the supported chains list to include the Taraxa network.
  • New Features

    • Introduced full support for the Taraxa blockchain, enabling users to interact with this network option seamlessly.

@coderabbitai
Copy link

coderabbitai bot commented Mar 18, 2025

Walkthrough

This pull request adds support for the "Taraxa" network. It updates the README to include "Taraxa" in the list of supported chains, introduces a new network configuration file for Taraxa under the Ethereum provider, and extends the type definitions by adding Taraxa-related entries to relevant enums. These changes ensure that the new network is recognized throughout the extension without removing or modifying existing functionality.

Changes

Files Change Summary
README.md Added "Taraxa" to the list of supported chains.
packages/.../taraxa.ts New file created to define the Taraxa network configuration including network name, homepage URL, block explorer links, chain ID, currency details, node URL, Coingecko integration entries, and an activity handler setup.
packages/.../networks.ts Extended enums by adding Taraxa = "Taraxa" to NetworkNames and Taraxa = "taraxa" to CoingeckoPlatform to support the new network in the type definitions.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant UI
    participant Extension
    participant Config as Taraxa Network Config

    User->>UI: Select Taraxa network
    UI->>Extension: Request network configuration
    Extension->>Config: Load taraxa.ts configuration
    Config-->>Extension: Return Taraxa network config
    Extension-->>UI: Provide Taraxa network config
Loading

Possibly related PRs

  • feat: add 5ireChain #602 – This PR added support for the "5ireChain" network with similar modifications to the README and type definitions, making it closely related in terms of code-level changes.

Suggested reviewers

  • kvhnuke
  • SemajaM8

Tip

⚡🧪 Multi-step agentic review comment chat (experimental)
  • We're introducing multi-step agentic chat in review comments. This experimental feature enhances review discussions with the CodeRabbit agentic chat by enabling advanced interactions, including the ability to create pull requests directly from comments.
    - To enable this feature, set early_access to true under in the settings.
✨ Finishing Touches
  • 📝 Generate Docstrings

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.

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 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: 1

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 88b1888 and 69485f4.

⛔ Files ignored due to path filters (1)
  • packages/extension/src/providers/ethereum/networks/icons/tara.png is excluded by !**/*.png
📒 Files selected for processing (3)
  • README.md (1 hunks)
  • packages/extension/src/providers/ethereum/networks/taraxa.ts (1 hunks)
  • packages/types/src/networks.ts (2 hunks)
🔇 Additional comments (7)
README.md (1)

103-103: LGTM: Taraxa chain added to supported chains list

The addition of Taraxa to the supported chains list maintains the alphabetical order and follows the existing format.

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

101-101: LGTM: NetworkNames enum extended properly

The Taraxa entry follows the existing pattern where some networks use full names as values rather than abbreviations.


160-160: LGTM: CoingeckoPlatform enum extended correctly

The "taraxa" value follows the convention of lowercase platform identifiers used by Coingecko.

packages/extension/src/providers/ethereum/networks/taraxa.ts (4)

1-5: LGTM: Import statements are appropriate

All necessary imports are included for the network configuration.


24-26: LGTM: Network instantiation and export

The network instantiation and export follows the pattern used by other networks.


21-21:

Details

✅ Verification successful

Empty activity handler - confirm implementation

The activity handler returns an empty array. Is this intentional for the initial implementation? Consider adding a TODO comment if this will be enhanced in the future.


🏁 Script executed:

#!/bin/bash
# Description: Check if other networks use similar empty activity handlers

echo "Checking for similar activity handler patterns in other network configurations..."
grep -r "activityHandler: wrapActivityHandler(() => Promise.resolve(\[\]))" --include="*.ts" packages/extension/src/providers/ethereum/networks/

Length of output: 1856


Confirm Empty Activity Handler Implementation

The empty activity handler in taraxa.ts is implemented in the same way as in other network configuration files (e.g., 5ire, arb-nova, bitrock, etc.), returning an empty array as a placeholder. This consistency suggests the behavior is intentional as a stub for potential future functionality. However, if you plan to enhance the handler later, please add a TODO comment to document that intention.


6-22:

Details

✅ Verification successful

Verify the RPC endpoint and chain ID

The network configuration looks good, but it's important to verify:

  1. That chain ID 0x349 (841 in decimal) is the correct ID for Taraxa mainnet
  2. That the RPC endpoint is public, stable, and reliable

🏁 Script executed:

#!/bin/bash
# Description: Verify Taraxa chain ID and RPC endpoint

# Check if the RPC endpoint is responsive
echo "Testing RPC endpoint connectivity..."
curl -s -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}' https://rpc.mainnet.taraxa.io

# Check block explorer
echo -e "\n\nVerifying block explorer availability..."
curl -s -I https://tara.to | head -n 1

Length of output: 433


Taraxa Network Configuration Verified

The tests confirm that the chain ID "0x349" (841 in decimal) is correctly returned by the Taraxa RPC endpoint, and the block explorer (https://tara.to) is accessible with a proper HTTP 200 response. No further changes are needed.

Comment on lines +18 to +20
coingeckoID: 'taraxa',
coingeckoPlatform: CoingeckoPlatform.Taraxa,
assetsInfoHandler,
Copy link

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Verify Coingecko platform ID

Ensure that "taraxa" is the correct platform ID used by Coingecko for the Taraxa network.


🌐 Web query:

What is the Coingecko platform ID for Taraxa network?

💡 Result:

The CoinGecko platform ID for the Taraxa network is taraxa3[4]. This identifier is used by CoinGecko to reference Taraxa in its API and cryptocurrency tracking services.

Citations:


Update Coingecko ID for Taraxa Network

Based on our verification, the CoinGecko platform ID for the Taraxa network should be updated from 'taraxa' to 'taraxa3'.

  • File: packages/extension/src/providers/ethereum/networks/taraxa.ts (Lines: 18-20)
  • Action: Update the property value as shown below.

Diff:

-  coingeckoID: 'taraxa',
+  coingeckoID: 'taraxa3',
   coingeckoPlatform: CoingeckoPlatform.Taraxa,
   assetsInfoHandler,
📝 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
coingeckoID: 'taraxa',
coingeckoPlatform: CoingeckoPlatform.Taraxa,
assetsInfoHandler,
coingeckoID: 'taraxa3',
coingeckoPlatform: CoingeckoPlatform.Taraxa,
assetsInfoHandler,

@gamalielhere
Copy link
Contributor

Included in #638

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