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

updated to use injective-core v1.12.1 and the matching cosmos-sdk #218

Merged
merged 6 commits into from
May 2, 2024

Conversation

maxrobot
Copy link
Contributor

@maxrobot maxrobot commented Apr 29, 2024

  • Updated injective-std
    • Injective-Core v1.12.1
    • Cosmos SDK v0.47.5

Summary by CodeRabbit

  • New Features

    • Introduced new auction and insurance functionalities with complete struct and query support.
    • Added new commands in the README for building a file descriptor set.
    • Launched new modules for auction and CosmWasm functionalities.
  • Enhancements

    • Updated serialization and deserialization traits across various modules to improve clarity and organization.
  • Documentation

    • Updated README with additional command snippets for more robust build options.
  • Refactor

    • Reordered module declarations and trait derivations to streamline processing and serialization behaviors.

@maxrobot maxrobot requested review from gorgos and jbernal87 April 29, 2024 18:38
Copy link

coderabbitai bot commented Apr 29, 2024

Walkthrough

This update focuses on refining the derivation of traits across various modules in the injective-std package, enhancing serialization and deserialization processes. It introduces new modules like cosmwasm and auction, adjusts existing structures, and improves code readability and organization. Additionally, it includes updates to command snippets in documentation for better utility.

Changes

File Path Change Summary
.../injective-std/Cargo.toml Updated package version from 0.1.6 to 0.1.7.
.../types/cosmos/.../module/v1.rs, .../cosmos/.../v1beta1.rs Modified trait derivations, improved serialization traits handling.
.../types/injective/auction/..., .../injective/insurance/v1beta1.rs, .../injective/tokenfactory/v1beta1.rs Introduced new modules and updated trait derivations, added and modified various structs.
.../types/cosmwasm/... New modules introduced related to CosmWasm functionality.
.../injective-std/README.md, .../injective-std/src/lib.rs Updated command snippets and added compiler directives.

🐰✨📜
In the realm of code where the bytes frolic and play,
A rabbit hopped through, tweaking structs on its way.
With a whisk of its tail, changes were made,
New traits and modules, in the code they laid.
Celebrate the updates, for they're crafted so bright,
In the burrows of data, they bring new light! 🌟🐇


Recent Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 46df112 and 4d80824.
Files selected for processing (1)
  • packages/injective-std/src/lib.rs (1 hunks)
Files skipped from review due to trivial changes (1)
  • packages/injective-std/src/lib.rs

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 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.
  • 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

@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: 1

Out of diff range and nitpick comments (1)
packages/injective-std/src/types/cosmos/distribution/v1beta1.rs (1)

4-5: Ensure consistent formatting of derive attributes.

Consider placing all derive attributes in a single block for consistency and readability, as seen in other parts of the code.

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: 6

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

Out of diff range and nitpick comments (1)
packages/injective-std/README.md (1)

25-30: Consider adding a brief explanation for the new command snippet.

It would be helpful for users if a brief description of what the new command does and when it should be used is added above the command snippet.

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

#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/cosmwasm.wasm.v1.StoreCodeProposalStoreCodeProposal")]
#[deprecated]
pub struct StoreCodeProposal {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use of deprecated struct StoreCodeProposal.

Consider removing or replacing this deprecated struct to avoid potential issues with future compatibility.

#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/cosmwasm.wasm.v1.InstantiateContractProposalInstantiateContractProposal")]
#[deprecated]
pub struct InstantiateContractProposal {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use of deprecated struct InstantiateContractProposal.

Consider removing or replacing this deprecated struct to avoid potential issues with future compatibility.

#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/cosmwasm.wasm.v1.InstantiateContract2ProposalInstantiateContract2Proposal")]
#[deprecated]
pub struct InstantiateContract2Proposal {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use of deprecated struct InstantiateContract2Proposal.

Consider removing or replacing this deprecated struct to avoid potential issues with future compatibility.

#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/cosmwasm.wasm.v1.MigrateContractProposalMigrateContractProposal")]
#[deprecated]
pub struct MigrateContractProposal {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use of deprecated struct MigrateContractProposal.

Consider removing or replacing this deprecated struct to avoid potential issues with future compatibility.

#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/cosmwasm.wasm.v1.SudoContractProposalSudoContractProposal")]
#[deprecated]
pub struct SudoContractProposal {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use of deprecated struct SudoContractProposal.

Consider removing or replacing this deprecated struct to avoid potential issues with future compatibility.

#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/cosmwasm.wasm.v1.ExecuteContractProposalExecuteContractProposal")]
#[deprecated]
pub struct ExecuteContractProposal {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use of deprecated struct ExecuteContractProposal.

Consider removing or replacing this deprecated struct to avoid potential issues with future compatibility.

#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)]
#[proto_message(type_url = "/cosmwasm.wasm.v1.UpdateAdminProposalUpdateAdminProposal")]
#[deprecated]
pub struct UpdateAdminProposal {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use of deprecated struct UpdateAdminProposal.

Consider removing or replacing this deprecated struct to avoid potential issues with future compatibility.

Copy link
Contributor

@jbernal87 jbernal87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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 (1)
packages/injective-std/README.md (1)

Line range hint 18-19: Consider revising the sentence for conciseness and clarity.

- In order to generate an individual proto file run:
+ To generate an individual proto file, run:


### Examples

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct grammatical error for clarity.

- Lets try to create the bindings for
+ Let's try to create the bindings for

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change


First create a directory with the dependencies as below:

```
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Specify the language for the fenced code block to improve readability.

- ```
+ ```plaintext


Next generate the proto:

```
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Specify the language for the fenced code block to improve readability.

- ```
+ ```shell

buf generate /Users/wandlitz/go/src/github.com/osmosis-labs/osmosis-rust/packages/proto-build-injective/../../dependencies/injective-core/proto --template /Users/wandlitz/go/src/github.com/osmosis-labs/osmosis-rust/packages/proto-build-injective/buf.gen.yaml --output ./tmp/tmp-protobuf/injective --path /Users/wandlitz/go/src/github.com/osmosis-labs/osmosis-rust/packages/proto-build-injective/../../dependencies/injective-core/proto/injective/auction
```

```
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Specify the language for the fenced code block to improve readability.

- ```
+ ```shell

@maxrobot maxrobot merged commit 620bdbf into dev May 2, 2024
4 checks passed
@maxrobot maxrobot deleted the f/bump-injective-std branch May 2, 2024 11:19
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.

3 participants