Skip to content

Add flow into the list - #3

Closed
lmcmz wants to merge 1 commit into
mcpdotdirect:mainfrom
lmcmz:patch-1
Closed

Add flow into the list#3
lmcmz wants to merge 1 commit into
mcpdotdirect:mainfrom
lmcmz:patch-1

Conversation

@lmcmz

@lmcmz lmcmz commented Mar 19, 2025

Copy link
Copy Markdown
Contributor

Flow Mainnet:
https://github.com/wevm/viem/blob/main/src/chains/definitions/flowMainnet.ts

Flow Testnet:
https://github.com/wevm/viem/blob/main/src/chains/definitions/flowTestnet.ts

Summary by CodeRabbit

  • New Features
    • Added support for the Flow blockchain with both mainnet and testnet environments, giving users enhanced network connectivity and access to new blockchain options.

@coderabbitai

coderabbitai Bot commented Mar 19, 2025

Copy link
Copy Markdown

Walkthrough

The changes integrate two new chain configurations into the application. Specifically, two new entries—flowMainnet with chain ID 747 and flowTestnet with chain ID 545—are added to the chain mapping. The network name mapping is updated to associate 'flow' with chain ID 747 and 'flow-testnet' with chain ID 545. Additionally, new RPC URLs for both chains are provided and minor formatting adjustments have been applied to the file.

Changes

File(s) Summary
src/core/chains.ts Added new entries flowMainnet (chain ID: 747) and flowTestnet (chain ID: 545) to chainMap; updated networkNameMap and rpcUrlMap with respective values; applied formatting fixes.

Poem

Hoppin’ through code with a twitch of my nose,
I uncovered new chains where configuration flows.
With flowMainnet and flowTestnet, our mappings now expand,
Every update's a treat in this tech wonderland.
A bunny's delight—a hop, skip, and a tweak! 🐇✨

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

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

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

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)
src/core/chains.ts (1)

167-167: Network name mappings added for Flow chains.

The 'flow' and 'flow-testnet' network names are correctly mapped to their respective chain IDs (747 and 545).

Consider adding common aliases for Flow chains to maintain consistency with other chains. For example:

 'flow': 747,
+'flw': 747,
 
 // Testnets
+'flow-test': 545,

Also applies to: 211-211

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 241658a and 6d69a2c.

📒 Files selected for processing (1)
  • src/core/chains.ts (9 hunks)
🔇 Additional comments (4)
src/core/chains.ts (4)

33-33: Properly imports Flow blockchain chains.

The addition of Flow blockchain imports for both mainnet and testnet follows the existing pattern of separating mainnet and testnet imports. The imports are placed correctly.

Also applies to: 57-57


344-344: Minor formatting change.

Added trailing space in function definition - not significant but maintains consistent formatting.


246-246:

Details

✅ Verification successful

RPC URLs added for Flow blockchain networks.

The RPC URLs for Flow mainnet ('https://mainnet.evm.nodes.onflow.org') and testnet ('https://testnet.evm.nodes.onflow.org') have been correctly added to the rpcUrlMap.

Also applies to: 270-270


🏁 Script executed:

#!/bin/bash
# Verify that the Flow RPC URLs are accessible
echo "Verifying Flow RPC URL accessibility:"
curl -s -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}' https://mainnet.evm.nodes.onflow.org | grep "result"
curl -s -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}' https://testnet.evm.nodes.onflow.org | grep "result"

Length of output: 516


Flow RPC URLs for mainnet and testnet verified successfully.

After running the verification script, both RPC endpoints are fully functional:

The additions in src/core/chains.ts (lines 246 and 270) to include these endpoints in the rpcUrlMap are correct and require no further action.


96-96:

Details

✅ Verification successful

Flow blockchain chain configurations correctly added.

Flow mainnet (ID: 747) and testnet (ID: 545) are properly added to the chainMap, maintaining the separation between mainnet and testnet entries.

Also applies to: 120-120


🏁 Script executed:

#!/bin/bash
# Verify that the Flow chain IDs are correct
echo "Verifying Flow chain IDs against references"
curl -s https://chainlist.org/chain/747 | grep -i "flow mainnet" || echo "Flow mainnet ID 747 not found on chainlist.org"
curl -s https://chainlist.org/chain/545 | grep -i "flow testnet" || echo "Flow testnet ID 545 not found on chainlist.org"

# Alternative verification using the provided links in PR
curl -s https://raw.githubusercontent.com/wevm/viem/main/src/chains/definitions/flowMainnet.ts | grep -A 5 "id:" | grep -A 1 747
curl -s https://raw.githubusercontent.com/wevm/viem/main/src/chains/definitions/flowTestnet.ts | grep -A 5 "id:" | grep -A 1 545

Length of output: 772


Verified Flow Chain Configurations: IDs Are Correct

The Flow blockchain configurations have been confirmed as follows:

  • Flow Mainnet (ID: 747): The GitHub definition file (src/chains/definitions/flowMainnet.ts) shows the correct entry with id: 747 and name "Flow EVM Mainnet."
  • Flow Testnet (ID: 545): The definition file (src/chains/definitions/flowTestnet.ts) confirms the entry with id: 545 and name "Flow EVM Testnet."

Although the chainlist.org queries did not return the expected string matches, the alternative verification clearly confirms the configurations. No further changes are needed.

@lmcmz lmcmz closed this Mar 19, 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.

1 participant