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

feat(cmd): new converter helper app #2408

Merged
merged 5 commits into from
Jan 31, 2024
Merged

feat(cmd): new converter helper app #2408

merged 5 commits into from
Jan 31, 2024

Conversation

robert-zaremba
Copy link
Member

@robert-zaremba robert-zaremba commented Jan 30, 2024

Description

new command in cmd/converter to convert between bech32 addresses. In the future we can add more convertion options

Summary by CodeRabbit

  • New Features
    • Introduced a command-line tool "converter" for converting bech32 addresses with customizable prefixes.

@robert-zaremba robert-zaremba requested a review from a team as a code owner January 30, 2024 18:20
Copy link
Contributor

coderabbitai bot commented Jan 30, 2024

Warning

Rate Limit Exceeded

@robert-zaremba has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 25 minutes and 7 seconds before requesting another review.

How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.
Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.
Please see our FAQ for further information.

Commits Files that changed from the base of the PR and between 011637c and ab63b4a.

Walkthrough

The update introduces a command-line tool named "converter," designed for transforming bech32 addresses to alternative bech32 formats with customizable prefixes, primarily defaulting to "umee." This tool, leveraging the cosmos-sdk and spf13/cobra, enriches the CLI experience, offering a specific command for address conversion alongside other utilities.

Changes

File(s) Change Summary
cmd/converter/bech32.go Adds a CLI command for converting bech32 addresses with an optional "umee" prefix.
cmd/converter/main.go Introduces a new CLI tool "converter," including commands for address conversion and other utilities.

🐇✨
To change an address, not a feat so rare,
A rabbit hopped in, with code to spare.
"From bech32 here, to bech32 there,
With a hop and a prefix, I go anywhere!"
🚀🌌

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-tests for this file.
  • 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 tests 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 from git and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @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 a review. This is useful when automatic reviews are disabled for the repository.
  • @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.
  • The JSON schema for the configuration file is available here.
  • 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/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

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.

Review Status

Actionable comments generated: 1

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between f9ac6dc and 011637c.
Files selected for processing (2)
  • cmd/converter/bech32.go (1 hunks)
  • cmd/converter/main.go (1 hunks)
Additional comments: 4
cmd/converter/main.go (3)
  • 3-7: The import section is concise and correctly includes only the necessary packages for this file's functionality.
  • 9-14: The main function correctly sets up the root command and handles errors by exiting with a non-zero status code if Execute fails. This is a standard practice for CLI applications.
  • 16-23: The newRootCmd function is well-structured, creating a root command with a short description and adding the bech32Cmd as a subcommand. This setup is clear and follows best practices for CLI applications using Cobra.
cmd/converter/bech32.go (1)
  • 3-6: The import section correctly includes the necessary packages for bech32 address conversion and the Cobra package for CLI command structuring.

cmd/converter/bech32.go Outdated Show resolved Hide resolved
Copy link

codecov bot commented Jan 30, 2024

Codecov Report

Attention: 213 lines in your changes are missing coverage. Please review.

Comparison is base (7f05ad4) 75.38% compared to head (72f483f) 68.45%.
Report is 361 commits behind head on main.

❗ Current head 72f483f differs from pull request most recent head ab63b4a. Consider uploading reports for the commit ab63b4a to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2408      +/-   ##
==========================================
- Coverage   75.38%   68.45%   -6.94%     
==========================================
  Files         100      180      +80     
  Lines        8025    13362    +5337     
==========================================
+ Hits         6050     9147    +3097     
- Misses       1589     3606    +2017     
- Partials      386      609     +223     
Files Coverage Δ
ante/ante.go 66.66% <100.00%> (+18.45%) ⬆️
ante/fee.go 80.00% <100.00%> (+1.64%) ⬆️
ante/spam_prevention.go 75.92% <ø> (ø)
app/inflation/inflation.go 100.00% <100.00%> (ø)
app/upgradev3/migrations.go 84.21% <ø> (+5.94%) ⬆️
sdkclient/tx/sign.go 0.00% <ø> (ø)
util/coin/utoken.go 100.00% <100.00%> (ø)
util/genmap/genmap.go 100.00% <100.00%> (ø)
util/ibc/ibc.go 58.82% <ø> (ø)
util/sdkutil/events.go 0.00% <ø> (ø)
... and 45 more

... and 116 files with indirect coverage changes

@robert-zaremba robert-zaremba added the skip-e2e-test Skip the e2e tests label Jan 31, 2024
@robert-zaremba robert-zaremba added this pull request to the merge queue Jan 31, 2024
Merged via the queue into main with commit 1111f30 Jan 31, 2024
21 of 22 checks passed
@robert-zaremba robert-zaremba deleted the robert/converter branch January 31, 2024 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-e2e-test Skip the e2e tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants