Skip to content
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

chore: update deps protocol-contracts-solana and networks #213

Merged
merged 4 commits into from
Jan 20, 2025

Conversation

fadeev
Copy link
Member

@fadeev fadeev commented Jan 14, 2025

  • Moved protocol-contracts-solana to deps from dev deps
  • Updated networks package to use Publicnode RPC

Summary by CodeRabbit

  • Dependencies

    • Updated @zetachain/networks to version 10.0.0-rc4
    • Refreshed @zetachain/protocol-contracts-solana dependency
  • Configuration

    • Updated Hardhat configuration with new ZetaChain testnet Blockscout URLs
    • Upgraded Solidity compiler version to 0.8.26
  • Client

    • Modified ZetaChainClient constructor to provide more flexible network handling

Copy link
Contributor

coderabbitai bot commented Jan 14, 2025

📝 Walkthrough

Walkthrough

This pull request involves updates to the ZetaChain toolkit, focusing on dependency management and configuration changes. The modifications include updating the @zetachain/networks package version, adjusting the @zetachain/protocol-contracts-solana dependency, and modifying the ZetaChainClient constructor logic. Additionally, the Hardhat configuration has been updated with new Blockscout API endpoints and an updated Solidity compiler version.

Changes

File Change Summary
package.json - Updated @zetachain/networks from 10.0.0-rc3 to 10.0.0-rc4
- Removed and re-added @zetachain/protocol-contracts-solana@2.0.0-rc1
packages/client/src/client.ts - Removed strict error checking for contracts parameter in local network environments
- Modified default contract address assignment logic
packages/client/src/getHardhatConfig.ts - Updated Blockscout API URLs for zeta_testnet
- Updated Solidity compiler version from 0.8.7 to 0.8.26

Possibly related PRs

Suggested reviewers

  • andresaiello

📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a0892ba and b2d6147.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (3)
  • package.json (2 hunks)
  • packages/client/src/client.ts (0 hunks)
  • packages/client/src/getHardhatConfig.ts (2 hunks)
💤 Files with no reviewable changes (1)
  • packages/client/src/client.ts
🔇 Additional comments (4)
packages/client/src/getHardhatConfig.ts (2)

52-53: LGTM: Updated Blockscout API endpoints for testnet.

The change from zetachain-athens-3 to zetachain-testnet aligns with the network updates mentioned in the PR objectives.


70-70: Verify compatibility with the updated Solidity version.

The Solidity version has been updated from 0.8.7 to 0.8.26, which is a significant version jump.

Let's verify compatibility with dependencies:

✅ Verification successful

Solidity version update to 0.8.26 is compatible with the codebase

  • WZETA.sol (0.8.7) is only referenced by address, no direct contract interactions
  • OnlySystem.sol uses flexible versioning (^0.8.7) which is compatible with 0.8.26
  • Other version differences are in isolated test contracts or interface definitions following standard practices
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check Solidity version compatibility with OpenZeppelin contracts
rg -A 1 "pragma solidity" contracts/

Length of output: 1729


Script:

#!/bin/bash
# Check imports between contracts with different versions
rg -l "import.*WZETA" contracts/
rg -l "import.*OnlySystem" contracts/

Length of output: 74


Script:

#!/bin/bash
# Search for any references to WZETA and OnlySystem contracts
rg -i "wzeta" contracts/
rg -i "onlysystem" contracts/

Length of output: 1845

package.json (2)

103-103: LGTM: Updated networks package to rc4.

The update of @zetachain/networks to version 10.0.0-rc4 aligns with the PR objectives to update the networks package.


105-105: LGTM: Moved protocol-contracts-solana to dependencies.

Successfully moved @zetachain/protocol-contracts-solana from devDependencies to regular dependencies as intended in the PR objectives.

Finishing Touches

  • 📝 Generate Docstrings (Beta)

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?

❤️ Share
🪧 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. (Beta)
  • @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.

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.

@fadeev
Copy link
Member Author

fadeev commented Jan 17, 2025

@lukema95 I've removed localnet contract check, because it prevented initializing the client on localnet without contract addresses, even though it's possible to call functions like evmDepositAndCall by passing Gateway EVM contract address directly.

b2d6147

@fadeev fadeev marked this pull request as ready for review January 17, 2025 11:55
@fadeev fadeev requested review from andresaiello and a team as code owners January 17, 2025 11:55
@fadeev fadeev merged commit da34ff8 into main Jan 20, 2025
9 checks passed
@fadeev fadeev deleted the deps-solana-networks branch January 20, 2025 10:00
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.

2 participants