Skip to content

Update NFT/token to latest standard contracts #258

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

Merged
merged 2 commits into from
May 13, 2025

Conversation

fadeev
Copy link
Member

@fadeev fadeev commented May 13, 2025

Summary by CodeRabbit

  • Chores
    • Updated dependencies to newer versions in NFT and Token examples.
    • Added a new dependency to both NFT and Token examples.
    • Removed the deploy:localnet script from both NFT and Token example scripts.
    • Adjusted localnet scripts to no longer forward command-line arguments.

@fadeev fadeev requested a review from a team as a code owner May 13, 2025 09:29
Copy link

coderabbitai bot commented May 13, 2025

📝 Walkthrough

Walkthrough

The updates modify the package.json files in the examples/nft and examples/token directories by upgrading dependency versions, adding a new dependency, and removing the deploy:localnet script. Corresponding localnet.sh scripts are also updated to eliminate forwarding of command-line arguments to underlying scripts.

Changes

File(s) Change Summary
examples/nft/package.json
examples/token/package.json
Upgraded @zetachain/protocol-contracts and @zetachain/standard-contracts dependencies; added zetachain dependency; removed deploy:localnet script from scripts section.
examples/nft/scripts/localnet.sh
examples/token/scripts/localnet.sh
Removed forwarding of positional argument $1 to the underlying script; now invokes the script without arguments.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant LocalnetScript
    participant UnderlyingScript

    User->>LocalnetScript: Execute localnet.sh [no arguments]
    LocalnetScript->>UnderlyingScript: Invoke underlying localnet.sh (no arguments)
    UnderlyingScript-->>LocalnetScript: Execute logic
    LocalnetScript-->>User: Complete
Loading

Tip

⚡️ Faster reviews with caching
  • CodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure Review - Disable Cache at either the organization or repository level. If you prefer to disable all data retention across your organization, simply turn off the Data Retention setting under your Organization Settings.

Enjoy the performance boost—your workflow just got faster.

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ 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.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 explain its main purpose.
    • @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.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @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.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

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.

Copy link

@coderabbitai coderabbitai bot left a 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

♻️ Duplicate comments (3)
examples/nft/package.json (2)

59-60: See token example for Zeta dependency upgrades
These lines perform the same upgrades to @zetachain/protocol-contracts and @zetachain/standard-contracts. Refer to the token example review for compatibility verification steps.


62-62: See token example for validator dependency
The validator library was introduced here as well; please verify its usage in the NFT example.

examples/nft/scripts/localnet.sh (1)

3-3: See token example for CLI argument forwarding change
This mirrors the removal of $1 forwarding in the token script. Confirm that the NFT localnet.sh from standard-contracts handles being invoked without arguments.

🧹 Nitpick comments (1)
examples/token/package.json (1)

63-63: Align zetachain version specifier across examples
Here zetachain is pinned exactly to 3.0.0, whereas in the NFT example it uses ^3.0.0. Consider standardizing on a caret range (^3.0.0) for consistency and to allow patch updates.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a7fef3d and 4ca0c18.

⛔ Files ignored due to path filters (2)
  • examples/nft/yarn.lock is excluded by !**/yarn.lock, !**/*.lock
  • examples/token/yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (4)
  • examples/nft/package.json (2 hunks)
  • examples/nft/scripts/localnet.sh (1 hunks)
  • examples/token/package.json (2 hunks)
  • examples/token/scripts/localnet.sh (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (5)
  • GitHub Check: test (examples/swap)
  • GitHub Check: test (examples/call)
  • GitHub Check: slither (examples/swap, swap.sarif)
  • GitHub Check: slither (examples/call, call.sarif)
  • GitHub Check: slither (examples/hello, hello.sarif)
🔇 Additional comments (5)
examples/token/package.json (3)

9-9: Removed deploy:localnet script in scripts
The deploy:localnet entry was removed to streamline the example. Ensure any CI jobs, documentation, or README references to this script are updated accordingly.


59-60: Upgraded Zeta dependencies to new major versions
@zetachain/protocol-contracts and @zetachain/standard-contracts were bumped to stable releases (13.0.0 and 2.0.0-rc5). Verify that the example code aligns with any breaking changes introduced in these versions.


62-62: Confirm usage of new validator dependency
The validator library was added here. Ensure it’s actually used in the example code; otherwise consider removing it to reduce unnecessary dependencies.

examples/token/scripts/localnet.sh (1)

3-3: Removed forwarding of CLI argument $1
The script now invokes the Zeta localnet script without passing any parameters. Confirm that the underlying localnet.sh supports being called without arguments and that no required configuration is lost.

examples/nft/package.json (1)

9-9: Removed deploy:localnet script in scripts
The deploy:localnet entry has been removed. Ensure all example documentation and CI configurations are updated to reflect this removal.

@fadeev fadeev merged commit 7337fca into main May 13, 2025
14 checks passed
@fadeev fadeev deleted the nft-token-update-standard-contracts branch May 13, 2025 10:20
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