-
Notifications
You must be signed in to change notification settings - Fork 64
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: Remove outdated chains on protocol contracts types #276
feat: Remove outdated chains on protocol contracts types #276
Conversation
WalkthroughThe recent changes enhance the type definitions and constants related to the Zeta Protocol's network configurations, streamlining test and main network declarations. Notably, several test networks were removed, while a new main network was added. Function signatures were modified for greater flexibility, and typographical errors were corrected. Overall, these updates improve clarity and maintainability across the codebase. Changes
Poem
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 as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #276 +/- ##
=======================================
Coverage 58.10% 58.10%
=======================================
Files 16 16
Lines 401 401
Branches 28 28
=======================================
Hits 233 233
Misses 165 165
Partials 3 3 ☔ View full report in Codecov by Sentry. |
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
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (2)
- lib/address.tools.ts (2 hunks)
- lib/types.ts (1 hunks)
Additional comments not posted (11)
lib/types.ts (3)
3-22
: Reordering and restructuring improve readability.The reordering and restructuring of
ParamSymbol
values enhance readability and maintainability. The explicit listing ofUSDC.SEPOLIA
is noted.
24-24
: Transition to structured type improves type safety.The transition of
ParamChainName
to referenceZetaProtocolNetwork
enhances type safety and clarity.
26-41
: Improved formatting enhances readability.The improved formatting of
ParamType
enhances readability and maintainability.lib/address.tools.ts (8)
41-41
: Streamlined test networks improve clarity.The removal of outdated test networks from
ZetaProtocolTestNetwork
streamlines the type definition and reflects current usage.
41-41
: Constant array aligns with updated type definition.The
zetaProtocolTestNetworks
constant array has been updated to reflect the changes in theZetaProtocolTestNetwork
type, ensuring consistency.
63-68
: Addition ofbtc_mainnet
broadens scope.The inclusion of "btc_mainnet" in the
ZetaProtocolMainNetwork
type broadens the scope of available main networks.
70-76
: Constant array aligns with updated type definition.The
zetaProtocolMainNetworks
constant array has been updated to include "btc_mainnet", ensuring consistency with the type definition.
78-78
: Type definition reflects current state of networks.The
ZetaProtocolNetwork
type now encompasses both the updatedZetaProtocolMainNetwork
andZetaProtocolTestNetwork
, reflecting the current state of networks.
81-81
: Typographical correction improves clarity.The correction of "Enviroment" to "Environment" improves clarity and accuracy.
86-88
: Signature modification allows greater flexibility.The modification of
isTestnetNetwork
to accept astring
type allows for greater flexibility in input, with explicit type assertions ensuring type safety.
90-92
: Signature modification allows greater flexibility.The modification of
isMainnetNetwork
to accept astring
type allows for greater flexibility in input, with explicit type assertions ensuring type safety.
Summary
Summary by CodeRabbit
New Features
Bug Fixes
Refactor