InjectiveLabs / cw-injective

Apache License 2.0
22 stars 24 forks source link

Feat/stargate tester contract #220

Closed jbernal87 closed 1 month ago

jbernal87 commented 6 months ago

Stargate queries contract example and test.

Summary by CodeRabbit

Release Notes

coderabbitai[bot] commented 6 months ago

[!IMPORTANT]

Review skipped

Review was skipped due to path filters

Files ignored due to path filters (1) * `Cargo.lock` is excluded by `!**/*.lock`

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory.

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

Walkthrough

The updates involve significant changes to dependency management and the introduction of new functionalities across various smart contract projects. Key updates include the upgrade of the base64 crate and the addition of the serde_json dependency. Several modules, functions, and constants were introduced to enhance order management, querying, and testing capabilities. Additionally, the removal of the workspace = true attribute from multiple dependencies indicates a shift in how these packages are managed within the project.

Changes

Files Change Summary
Cargo.toml, contracts/injective-cosmwasm-mock/Cargo.toml, contracts/injective-cosmwasm-stargate-example/Cargo.toml Updated dependencies, added new paths, and made multiple version updates and removals, including the introduction of serde_json and the upgrade of base64.
contracts/injective-cosmwasm-stargate-example/src/... Added numerous modules and functions across files for managing orders, queries, replies, error handling, and testing including contract.rs, handle.rs, etc.
contracts/injective-cosmwasm-stargate-example/src/testing/mod.rs Introduced a new module file organizing submodules for testing functionalities, enhancing code organization for various components.
contracts/injective-cosmwasm-stargate-example/src/testing/authz.rs Added test functions to validate authorization queries, improving testing coverage for authorization functionalities.
packages/injective-std/Cargo.toml, packages/injective-testing/Cargo.toml Modified dependency declarations to remove workspace = true, indicating a change in how dependencies are referenced.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Contract
    participant Exchange
    User->>Contract: Initiate Spot Market Order
    Contract->>Exchange: Create Spot Market Order Message
    Exchange->>Contract: Spot Market Order Created
    Contract->>User: Order Confirmation

Possibly related PRs

Poem

In the code where bugs may creep,
A bunny leaps and bounds so deep,
With updates fresh, dependencies cheer,
New paths and functions, all made clear.
Market orders swift, in code we weave,
Injective's wisdom, we now believe. 🌟


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 generate interesting stats about this repository and render them as a table.` -- `@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](https://docs.coderabbit.ai/guides/configure-coderabbit) 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](https://coderabbit.ai/docs) for detailed information on how to use CodeRabbit. - Join our [Discord Community](https://discord.com/invite/GsXnASn26c) to get help, request features, and share feedback. - Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.
jbernal87 commented 1 month ago

Just fix merge conflicts