andromedaprotocol / andromeda.js

Command line interface for interactions with Andromeda contracts.
1 stars 1 forks source link

Custom Multi Chain Cosmwasm Client, CLI Wallet command enhancement, CLI Multi Env, and bug fixes #117

Closed SlayerAnsh closed 1 month ago

SlayerAnsh commented 2 months ago

Note - Ignore adocodegen diffs as these are autogerated

ANDRJS

Cosmwasm Client

As there are multiple chains AOS is interacting with, it was hard to manage clients using their own packages specially because it all comes to signer and pubkey. Major refactor is done to CosmWasm Client using by AndromedaClient to support multiple pubkey. With this update, custom packages for terra and archway clients were removed.

Wallet Client

Wallet Client is also updated to now use mnemonic or private key and encrypt it using its own encryption method. This will help clients to use same wallet for multiple chains which was not possible with previous Client. (This feature has more impact on CLI wallet feature which we will discuss below)

Schema Client and GQL Client

Schema client was internally using env variable for fallback which was not visible cleary to library users. Now Andromeda Client needs schema url as constructor. Gql client is not part of AndromedaClient but it was also using env variable, you can update gql client now using setGQLSdkUri.

Bug Fixes

With latest updates to chains, there were some bugs with msg parsing related to store code mainly. Now with new Cosmwasm client implementation, all messages are wrapped inside there own encoder and we have implemented event parsing logic with all the fallbacks that are needed to support events from multiple chains

CLI

Wallet Command

Wallet command is refactored completely and now supports both mnemonic and private key. In contrast to previous version were you need to store your wallet for each chain, now same wallet can be used for multiple chain. Encryption method for wallet store has been updated (Any suggestion regarding other, more secure encyption method are highly welcomed).

ENV Command

One of the issues that I personally face with any wallet provider is isolation of different env. I want to use 5-6 testing wallets but don't want to accidently use these for any mainnet stuff. With new env you can isolate your keys and configs inside an env and quickly shift between them.

Chain Command

Updated localchains storage to fix all the local config related bugs. Localchains are also part of env so you can set different chains per env.

Summary by CodeRabbit

Summary by CodeRabbit

coderabbitai[bot] commented 2 months ago

[!IMPORTANT]

Review skipped

Review was skipped as selected files did not have any reviewable changes.

💤 Files selected but had no reviewable changes (19) * packages/andrjs/src/AndromedaClient.ts * packages/cli/.gitignore * packages/cli/package.json * packages/cli/src/config/index.ts * packages/cli/src/handlers/ado/common.ts * packages/cli/src/handlers/ado/index.ts * packages/cli/src/handlers/ado/modules.ts * packages/cli/src/handlers/bank.ts * packages/cli/src/handlers/chain.ts * packages/cli/src/handlers/env/index.ts * packages/cli/src/handlers/os/db.ts * packages/cli/src/handlers/os/index.ts * packages/cli/src/handlers/os/vfs.ts * packages/cli/src/handlers/tx.ts * packages/cli/src/handlers/user.ts * packages/cli/src/handlers/utils.ts * packages/cli/src/handlers/wallet.ts * packages/cli/src/handlers/wasm.ts * packages/cli/src/schema/SchemaPrompt.ts

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

The changes include the introduction of a new configuration file for managing review processes, updates to the package.json file for script commands and dependency versions, and the addition of files for changeset management. Key modifications involve path filters for reviews, adjustments to various dependencies, and a structured approach to version tracking within the project.

Changes

Files Change Summary
.coderabbit.yaml, .changeset/pre.json, .changeset/shaggy-carrots-serve.md Introduced configuration for review processes with path filters, and added changeset management structure with version tracking.
package.json Updated script commands, modified rimraf path, and changed dependency versions for @changesets/cli and rimraf. Added updates to pnpm overrides for compatibility.

Sequence Diagram(s)

sequenceDiagram
    participant Developer
    participant ReviewSystem
    participant Codebase

    Developer->>ReviewSystem: Submit changes for review
    ReviewSystem->>Codebase: Apply path filters
    Codebase-->>ReviewSystem: Return relevant changes
    ReviewSystem-->>Developer: Provide review results

🐇 "In the meadow where code does play,
New filters guide the review each day.
Dependencies updated, paths refined,
A smoother journey for all aligned!
Hops of joy in every line,
Progress blooms, oh how divine!" 🐇


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 - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)
🪧 Tips ### Chat There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai): - Review comments: Directly reply to a review comment made by CodeRabbit. Example: - `I pushed a fix in commit , 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. ### Documentation and Community - Visit our [Documentation](https://coderabbit.ai/docs) for detailed information on how to use CodeRabbit. - Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback. - Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.
SlayerAnsh commented 2 months ago

@coderabbitai resolve

coderabbitai[bot] commented 2 months ago
Actions performed Comments resolved.
SlayerAnsh commented 2 months ago

@coderabbitai review

coderabbitai[bot] commented 2 months ago
Actions performed Review triggered. > Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.
SlayerAnsh commented 2 months ago

Please ignore change requests for adocodegen packages, they are autogenerated.