Add flow into the list - #3
Conversation
WalkthroughThe changes integrate two new chain configurations into the application. Specifically, two new entries— Changes
Poem
Tip ⚡🧪 Multi-step agentic review comment chat (experimental)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
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
📒 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:
- Flow Mainnet: Returned chain ID
0x2ebfrom 'https://mainnet.evm.nodes.onflow.org'- Flow Testnet: Returned chain ID
0x221from 'https://testnet.evm.nodes.onflow.org'The additions in
src/core/chains.ts(lines 246 and 270) to include these endpoints in therpcUrlMapare 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 545Length 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 withid: 747and name "Flow EVM Mainnet."- Flow Testnet (ID: 545): The definition file (
src/chains/definitions/flowTestnet.ts) confirms the entry withid: 545and 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.
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