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: add 5ireChain #602

Merged
merged 4 commits into from
Jan 23, 2025
Merged

feat: add 5ireChain #602

merged 4 commits into from
Jan 23, 2025

Conversation

dung5ire
Copy link
Contributor

@dung5ire dung5ire commented Jan 21, 2025

Summary by CodeRabbit

  • New Features

    • Added support for 5ireChain network in Enkrypt wallet
    • Expanded list of supported blockchain platforms
  • Documentation

    • Updated README to include 5ireChain in the list of supported chains

Copy link

coderabbitai bot commented Jan 21, 2025

Walkthrough

This pull request introduces support for the 5ireChain blockchain network to the Enkrypt wallet. The changes include updating the README.md to list 5ireChain as a supported network, creating a new network configuration file for 5ire in the Ethereum providers, and extending the network types to include the new network in the NetworkNames and CoingeckoPlatform enums.

Changes

File Change Summary
README.md Added 5ireChain to the list of supported chains
packages/extension/src/providers/ethereum/networks/5ire.ts Created new network configuration file for 5ireChain with EvmNetwork instance and network options
packages/types/src/networks.ts Added Fire = "5ire" enum entries to NetworkNames and CoingeckoPlatform

Sequence Diagram

sequenceDiagram
    participant User
    participant Enkrypt Wallet
    participant 5ireChain Network
    
    User->>Enkrypt Wallet: Select 5ireChain Network
    Enkrypt Wallet->>5ire.ts: Load Network Configuration
    5ire.ts-->>Enkrypt Wallet: Return Network Details
    Enkrypt Wallet->>5ireChain Network: Connect and Interact
Loading

Possibly related PRs

Suggested reviewers

  • SemajaM8
✨ Finishing Touches
  • 📝 Generate Docstrings (Beta)

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

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

18-18: Consider adding multiple RPC endpoints for redundancy.

The network configuration currently uses a single RPC endpoint. Consider adding fallback RPC nodes to improve reliability.

-  node: 'https://rpc.5ire.network',
+  node: [
+    'https://rpc.5ire.network',
+    // Add additional official RPC endpoints here
+  ],
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 620d312 and 59e021b.

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

12-13: Ensure block explorer URL templates are correct.

The block explorer URL templates use [[txHash]] and [[address]] placeholders. Verify these are the correct formats for 5irescan.io.

✅ Verification successful

Block explorer URL templates are correctly implemented.

The URL templates follow the standard format used by EVM block explorers, consistent with other networks in the codebase.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for other block explorer URL formats in the codebase
rg "blockExplorerTX.*:" -A 1
rg "blockExplorerAddr.*:" -A 1

Length of output: 46542


14-14: Verify the chain ID matches the official 5ireChain documentation.

The chain ID is set to 0x3e3 (995 in decimal). Please ensure this matches the official 5ireChain documentation.

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

99-99: LGTM! Consistent enum values.

The network name and platform identifiers are consistently defined as "5ire" across both enums.

Also applies to: 158-158

README.md (2)

111-111: LGTM! Documentation updated correctly.

5ireChain has been added to the list of supported chains in alphabetical order.


Line range hint 22-23: Verify integration with activity and asset handlers.

Please ensure that:

  1. The Etherscan-style activity handler is compatible with 5irescan.io's API
  2. The MEW asset info handler supports 5ireChain tokens
✅ Verification successful

Both handlers are properly integrated and compatible with 5ireChain

The implementation follows the standard pattern used across other EVM networks:

  • MEW asset info handler is correctly integrated for EVM token support
  • EtherscanActivity handler is properly configured for 5irescan.io which follows the Etherscan API standard
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check for similar configurations in other networks
rg "assetsInfoHandler.*mew" -B 5 -A 5
rg "activityHandler.*EtherscanActivity" -B 5 -A 5

Length of output: 69060

🧰 Tools
🪛 LanguageTool

[duplication] ~109-~109: Possible typo: you repeated a word.
Context: ...Network - Viction - Westend - ZChains - zkSync - zkSync Goerli - 5ireChain - More coming soon! ...

(ENGLISH_WORD_REPEAT_RULE)

@kvhnuke kvhnuke changed the base branch from main to devop/new-networks-2 January 23, 2025 20:12
@kvhnuke kvhnuke merged commit ea3d27f into enkryptcom:devop/new-networks-2 Jan 23, 2025
2 checks passed
This was referenced Jan 23, 2025
Copy link

@Goddessnunu22 Goddessnunu22 left a comment

Choose a reason for hiding this comment

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

Hello

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