-
Notifications
You must be signed in to change notification settings - Fork 9
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
refactor!: enhance ChainAddresses
structure and update values
#110
Conversation
Updated `ChainAddresses` field names for clarity and consistency. Introduced new v4-specific fields and corrected existing address values across multiple networks. These changes improve readability and ensure better network compatibility.
WalkthroughThis pull request updates the blockchain address handling by renaming various fields and introducing new ones in the Changes
Assessment against linked issues
Possibly related PRs
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
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? 🪧 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.
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/addresses.rs (1)
646-654
: Consider adding tests for QUOTER_V2_ADDRESSES.While there are comprehensive tests for SWAP_ROUTER_02_ADDRESSES, similar test coverage for the new QUOTER_V2_ADDRESSES would be beneficial.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
src/addresses.rs
(21 hunks)src/chains.rs
(2 hunks)src/entities/weth9.rs
(6 hunks)
🔇 Additional comments (5)
src/chains.rs (1)
26-36
: LGTM! Chain variants and IDs are properly defined.The new chain variants are correctly added with appropriate chain IDs, and the SUPPORTED_CHAINS array is properly updated to include them.
Also applies to: 43-71
src/entities/weth9.rs (1)
36-37
: LGTM! WETH9 token mappings are properly updated.The new chain IDs are correctly mapped to their respective WETH tokens. Note that MONAD_TESTNET appropriately uses "WMON" (Wrapped Monad) instead of "WETH".
Also applies to: 48-49, 57-58, 81-87, 165-171, 235-241
src/addresses.rs (3)
8-24
: LGTM! ChainAddresses struct improvements enhance clarity.The field renames and additions are well-structured:
- Removed redundant "_address" suffixes for better readability
- Added v4-specific fields as optional addresses
482-496
: LGTM! New chain addresses are properly defined.The address constants for UNICHAIN_SEPOLIA, UNICHAIN, and MONAD_TESTNET are correctly defined with appropriate addresses for all required contracts.
Also applies to: 499-514, 516-525
533-562
: LGTM! Chain-to-addresses mapping is properly updated.The CHAIN_TO_ADDRESSES_MAP is correctly updated to include the new chains and their respective addresses.
Updated
ChainAddresses
field names for clarity and consistency. Introduced new v4-specific fields and corrected existing address values across multiple networks. These changes improve readability and ensure better network compatibility.Closes #91.
Summary by CodeRabbit
New Features
Refactor