-
Notifications
You must be signed in to change notification settings - Fork 110
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(e2e): add support for dynamically resolving erc20 addresses #2783
Conversation
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughWalkthroughThe changes involve modifications to the Changes
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
Documentation and Community
|
d42552a
to
74c49aa
Compare
13a7b7d
to
e214c06
Compare
e214c06
to
d4a4858
Compare
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 (4)
- cmd/zetae2e/config/clients.go (4 hunks)
- cmd/zetae2e/run.go (6 hunks)
- e2e/runner/balances.go (3 hunks)
- e2e/runner/report.go (1 hunks)
Files skipped from review due to trivial changes (1)
- e2e/runner/report.go
Additional context used
Path-based instructions (3)
cmd/zetae2e/config/clients.go (1)
Pattern
**/*.go
: Review the Go code, point out issues relative to principles of clean code, expressiveness, and performance.cmd/zetae2e/run.go (1)
Pattern
**/*.go
: Review the Go code, point out issues relative to principles of clean code, expressiveness, and performance.e2e/runner/balances.go (1)
Pattern
**/*.go
: Review the Go code, point out issues relative to principles of clean code, expressiveness, and performance.
Additional comments not posted (8)
cmd/zetae2e/config/clients.go (3)
76-76
: LGTM!The function correctly uses the new exported function
GetZetaClients
.The code changes are approved.
155-157
: LGTM!The function adheres to Go's naming conventions for exported functions and types. The error handling and client initialization logic are correctly implemented.
The code changes are approved.
Also applies to: 162-173
46-47
: LGTM!The type adheres to Go's naming conventions for exported types. The fields remain consistent with the previous implementation.
The code changes are approved.
cmd/zetae2e/run.go (3)
25-26
: LGTM!The addition of the new flags enhances the configurability of the E2E tests. The flags are correctly defined and integrated into the command.
The code changes are approved.
Also applies to: 48-50
77-85
: LGTM!The function correctly retrieves the new flag values and updates the configuration if both flags are provided. The error handling is consistent with the rest of the function.
The code changes are approved.
167-207
: LGTM!The function correctly handles the dynamic resolution of ERC20 addresses. The error handling and logic for querying supported chains and foreign coins are well-implemented.
The code changes are approved.
e2e/runner/balances.go (2)
37-42
: LGTM!The function correctly checks for a nil contract before attempting to call
BalanceOf
. This centralizes error handling for ZRC20 balance retrieval.The code changes are approved.
55-69
: LGTM!The function correctly uses
getZRC20BalanceSafe
for ZRC20 balance retrieval, improving error handling and robustness.The code changes are approved.
0a1acec
to
e94c9f8
Compare
Allow setting erc20 info via cli parameters. When provided, we will resolve the addresses via RPC call. This is a bit tricky/fragile because the naming of our foreign coins are not consistent across different networks.
Also tolerate nil contract address in balance checks and remove duplicate balance check (it's already done by the test report).
Related to https://github.com/zeta-chain/infrastructure/issues/1498
Summary by CodeRabbit
New Features
Bug Fixes
Refactor
Chores