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

Update account cmd and balance cmd docs on tutorials intro #498

Merged
merged 1 commit into from
Nov 1, 2024

Conversation

lukema95
Copy link
Collaborator

@lukema95 lukema95 commented Oct 26, 2024

Related issue: zeta-chain/toolkit#187

Summary by CodeRabbit

  • New Features
    • Expanded tutorial content for setting up smart contracts on ZetaChain.
    • Clarified wallet types generated during setup, including EVM and Solana wallets.
    • Detailed instructions for importing Solana wallets, including automatic and manual options.
    • Updated output formats for derived addresses to include base58 for Solana wallets.
    • Modified command for querying token balances to support multiple address types (EVM, Solana, Bitcoin).
    • Enhanced description of tokens available for querying, now explicitly mentioning SOL.

Copy link

vercel bot commented Oct 26, 2024

@lukema95 is attempting to deploy a commit to the Zeta Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

coderabbitai bot commented Oct 26, 2024

📝 Walkthrough

Walkthrough

The pull request introduces enhancements to the tutorial for setting up smart contracts on ZetaChain. Key modifications include clarification on wallet types generated by the npx hardhat account --save command, expanded instructions for importing Solana wallets, updated output formats for derived addresses, and modifications to the token balance query command. The tutorial now provides a more comprehensive overview of wallet management and token queries, explicitly mentioning SOL for Solana alongside existing tokens.

Changes

File Path Change Summary
src/pages/developers/tutorials/intro.mdx - Clarified wallet types generated by npx hardhat account --save (EVM and Solana wallets).
- Expanded instructions for importing Solana wallets, detailing automatic and manual entry.
- Updated output formats for derived addresses to include base58 for Solana wallets.
- Modified the token balance query command to allow specifying addresses for EVM, Solana, and Bitcoin.
- Updated description of tokens available for querying, now explicitly mentioning SOL for Solana.

Possibly related PRs

  • Swap from ZetaChain tutorial #393: The "Swap from ZetaChain tutorial" PR includes modifications to the Swap contract, which are relevant to the wallet management and token balance queries discussed in the main PR.
  • Update examples to use gateway and localnet #470: The "Update examples to use gateway and localnet" PR revises the Swap tutorial to utilize gateway and localnet features, which aligns with the enhancements made in the main PR regarding wallet types and token management.
  • localnet #443: The "localnet" PR introduces a tutorial for a local development environment that may relate to the overall context of setting up smart contracts, similar to the changes in the main PR.

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 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
Contributor

@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

🧹 Outside diff range and nitpick comments (4)
src/pages/developers/tutorials/intro.mdx (4)

66-66: Consider rephrasing to avoid split infinitive.

Consider rewording to "first attempts to import the private key automatically" for better grammatical structure.

-1. It first attempts to automatically import the private key from the `~/.config/solana/id.json` file.
+1. It first attempts to import the private key automatically from the `~/.config/solana/id.json` file.
🧰 Tools
🪛 LanguageTool

[style] ~66-~66: Style-wise, it’s not ideal to insert an adverb (‘automatically’) in the middle of an infinitive construction (‘to import’). Try moving the adverb to avoid split infinitives.
Context: ... the process is as follows: 1. It first attempts to automatically import the private key from the ~/.config/solana/id.json fil...

(SPLIT_INFINITIVE)


65-69: Add private key format specifications.

Consider adding information about the expected format of Solana private keys for manual entry to help users avoid input errors.

For Solana wallets, the process is as follows:
1. It first attempts to import the private key automatically from the `~/.config/solana/id.json` file.
-2. If this file doesn't exist or can't be read, you'll be prompted to enter the private key manually.
+2. If this file doesn't exist or can't be read, you'll be prompted to enter the private key manually (expected format: base58-encoded string).

Finally, the private key is saved into the `.env` file.
🧰 Tools
🪛 LanguageTool

[style] ~66-~66: Style-wise, it’s not ideal to insert an adverb (‘automatically’) in the middle of an infinitive construction (‘to import’). Try moving the adverb to avoid split infinitives.
Context: ... the process is as follows: 1. It first attempts to automatically import the private key from the ~/.config/solana/id.json fil...

(SPLIT_INFINITIVE)


71-72: Consider using a structured list for address formats.

The address format information would be clearer in a structured list format.

-The `account` command shows derived addresses in hexadecimal (for EVM-based
-chains), bech32 with `zeta` prefix for ZetaChain, base58 for Solana, and bech32 for Bitcoin.
+The `account` command shows derived addresses in the following formats:
+- EVM-based chains: hexadecimal format
+- ZetaChain: bech32 format with `zeta` prefix
+- Solana: base58 format
+- Bitcoin: bech32 format

96-96: Enhance example with realistic placeholder values.

Consider providing more realistic placeholder values in the example to better guide users.

-npx hardhat balances --evm EVM_ADDRESS --solana SOLANA_ADDRESS --bitcoin BITCOIN_ADDRESS
+npx hardhat balances --evm 0x742d35Cc6634C0532925a3b844Bc454e4438f44e --solana 5ZWj7a1f8tWkjBESHKgrNmk1kXUrcHjsWdh2TK7zUX9 --bitcoin bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between f58bc89 and 56edec4.

📒 Files selected for processing (1)
  • src/pages/developers/tutorials/intro.mdx (3 hunks)
🧰 Additional context used
🪛 LanguageTool
src/pages/developers/tutorials/intro.mdx

[style] ~66-~66: Style-wise, it’s not ideal to insert an adverb (‘automatically’) in the middle of an infinitive construction (‘to import’). Try moving the adverb to avoid split infinitives.
Context: ... the process is as follows: 1. It first attempts to automatically import the private key from the ~/.config/solana/id.json fil...

(SPLIT_INFINITIVE)

Copy link

vercel bot commented Oct 29, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 29, 2024 6:09am

@fadeev fadeev merged commit 46dc3d3 into zeta-chain:main Nov 1, 2024
4 checks passed
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