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

docs: update token command docs #2940

Merged
merged 2 commits into from
May 30, 2024
Merged

docs: update token command docs #2940

merged 2 commits into from
May 30, 2024

Conversation

dreamer-zq
Copy link
Contributor

@dreamer-zq dreamer-zq commented May 15, 2024

Summary by CodeRabbit

  • New Features

    • Added swap-from-erc20 and swap-to-erc20 commands for token swapping with ERC20 tokens.
    • Introduced balances command to query all balances of an owner in a special denomination.
  • Documentation

    • Updated CLI client documentation to include new commands for token swapping and balance querying.

Copy link

coderabbitai bot commented May 15, 2024

Walkthrough

The token.md file in the CLI client documentation has been updated to introduce new commands for token swapping with ERC20 tokens and querying balances. Specifically, the swap-from-erc20 and swap-to-erc20 commands facilitate 1:1 token swaps, while the balances command allows users to query all balances of an owner in a special denomination.

Changes

File Change Summary
docs/cli-client/token.md Added swap-from-erc20, swap-to-erc20, and balances commands to the documentation.

Sequence Diagram(s) (Beta)

sequenceDiagram
    participant User
    participant CLI
    participant TokenService
    participant ERC20Service

    User->>CLI: Execute swap-from-erc20
    CLI->>TokenService: Request token swap from ERC20
    TokenService->>ERC20Service: Validate and process ERC20 token
    ERC20Service->>TokenService: Confirm token swap
    TokenService->>CLI: Provide swap confirmation
    CLI->>User: Display swap results

    User->>CLI: Execute balances query
    CLI->>TokenService: Request balances for owner
    TokenService->>CLI: Provide balances
    CLI->>User: Display balances
Loading

In fields of code where tokens flow,
New commands help the balance grow.
Swap and query with ease and grace,
ERC20 finds its place.
A rabbit's cheer for features new,
In docs, they shine like morning dew. 🐇✨


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>.
    • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @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.

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)

  • @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 full the 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 help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration 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.

@dreamer-zq dreamer-zq marked this pull request as draft May 15, 2024 02:43
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: 4

Out of diff range and nitpick comments (8)
docs/cli-client/token.md (8)

15-16: Ensure consistent formatting for new commands.

The new commands swap-from-erc20 and swap-to-erc20 are correctly added. However, ensure that the descriptions are clear and consistent with the existing commands.


22-22: Ensure consistent formatting for new commands.

The new command balances is correctly added. However, ensure that the description is clear and consistent with the existing commands.


169-172: Clarify the command description.

The description "Swap native token from the corresponding ERC20 at 1:1" could be more detailed. Consider specifying the context or use case for this command.


191-192: Clarify the command description.

The description "Swap native token to the corresponding ERC20 at 1:1" could be more detailed. Consider specifying the context or use case for this command.


287-288: Clarify the command description.

The description "Query all the balances of an owner in special denom" could be more detailed. Consider specifying the context or use case for this command.


Line range hint 37-37: Use a hyphen for "case-insensitive".

The word "case insensitive" is normally spelled with a hyphen.

- case insensitive
+ case-insensitive

Line range hint 39-39: Use "cannot" instead of "can not".

Unless you want to emphasize "not", use "cannot" which is more common.

- can not exceed max supply
+ cannot exceed max supply

Line range hint 62-62: Fix the markdown link.

The markdown link for "sending iris" is missing a closing bracket.

- [sending iris](./bank.md#iris-tx-bank-send
+ [sending iris](./bank.md#iris-tx-bank-send)
Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between b1a5870 and 161f229.
Files selected for processing (1)
  • docs/cli-client/token.md (4 hunks)
Additional Context Used
LanguageTool (4)
docs/cli-client/token.md (4)

Near line 37: This word is normally spelled with a hyphen.
Context: ...umeric characters beginning with alpha, case insensitive | | --initial-supply | u...


Near line 39: Unless you want to emphasize “not”, use “cannot” which is more common.
Context: ...he hard cap of this token, total supply can not exceed max supply. The amount before bo...


Near line 62: Unpaired symbol: ‘]’ seems to be missing
Context: ... can send any tokens you have just like [sending iris](./bank.md#iris-tx-bank-sen...


Near line 209: Possible typo: you repeated a word
Context: ...ain-id> --fees= ## iris query token token Query a token by symbol bash iris ...

docs/cli-client/token.md Outdated Show resolved Hide resolved
docs/cli-client/token.md Outdated Show resolved Hide resolved
docs/cli-client/token.md Show resolved Hide resolved
docs/cli-client/token.md Show resolved Hide resolved
@dreamer-zq dreamer-zq marked this pull request as ready for review May 27, 2024 08:46
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

Outside diff range and nitpick comments (5)
docs/cli-client/token.md (5)

15-16: Add a more detailed description for the swap-from-erc20 command.

The current description "Swap native token from the corresponding ERC20 at 1:1" could be expanded to explain the context or purpose of this operation more clearly.


16-16: Ensure consistency in command descriptions.

The description for swap-from-erc20 ends with "at 1:1", which is not followed by a period, unlike other descriptions in the table. Consider adding a period for consistency.


22-22: Clarify the description of the balances command.

The description "Query all the balances of an owner in special denom" could be improved for clarity. Consider specifying what "special denom" refers to or rephrasing it to "Query all token balances of an owner in a specified denomination."


Line range hint 37-37: Correct the spelling of "case-insensitive".

- case insensitive
+ case-insensitive

Line range hint 39-39: Use "cannot" instead of "can not".

- can not exceed max supply
+ cannot exceed max supply
Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 161f229 and 265ad76.
Files selected for processing (1)
  • docs/cli-client/token.md (4 hunks)
Additional Context Used
LanguageTool (3)
docs/cli-client/token.md (3)

Near line 37: This word is normally spelled with a hyphen.
Context: ...umeric characters beginning with alpha, case insensitive | | --initial-supply | u...
Rule ID: EN_COMPOUNDS_CASE_INSENSITIVE


Near line 39: Unless you want to emphasize “not”, use “cannot” which is more common.
Context: ...he hard cap of this token, total supply can not exceed max supply. The amount before bo...
Rule ID: CAN_NOT_PREMIUM


Near line 209: Possible typo: you repeated a word
Context: ...ain-id> --fees= ## iris query token token Query a token by symbol bash iris ...
Rule ID: ENGLISH_WORD_REPEAT_RULE

Additional comments not posted (2)
docs/cli-client/token.md (2)

209-209: Remove the repeated word "token".

- ## iris query token token
+ ## iris query token

Likely invalid or redundant comment.


16-16: Verify the accuracy of the swap-from-erc20 command.

@mitch1024 mitch1024 merged commit 90565e9 into master May 30, 2024
3 checks passed
@mitch1024 mitch1024 deleted the update-docs branch May 30, 2024 08:18
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