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

chore bump #233

Closed
wants to merge 2 commits into from
Closed

chore bump #233

wants to merge 2 commits into from

Conversation

maxrobot
Copy link
Contributor

@maxrobot maxrobot commented Jul 31, 2024

Summary by CodeRabbit

  • New Features
    • Updated the dependency for the injective-cosmwasm package to version 0.2.24, enhancing functionality and compatibility.
    • Introduced new methods for deserialization of SubaccountId, improving usability.
  • Bug Fixes
    • Rolled back the injective-cosmwasm package version in some areas to ensure stability and reliability.
    • Improved monetary value handling by enforcing type safety in monetary calculations.

Copy link

coderabbitai bot commented Jul 31, 2024

Walkthrough

The recent updates across multiple Cargo.toml files reflect a strategic shift in dependency management for the injective-cosmwasm project. By transitioning from local path references to specific version numbers, the project aims for greater stability and compatibility. Notably, the updates include both a new stable release and a rollback in versions across different packages, ensuring that all components work harmoniously while enhancing overall functionality.

Changes

Files Change Summary
contracts/injective-cosmwasm-mock/Cargo.toml Updated injective-cosmwasm from a local path reference to version specification 0.2.18.
contracts/atomic-order-example/Cargo.toml, contracts/dummy/Cargo.toml, packages/injective-testing/Cargo.toml Rolled back injective-cosmwasm version from 0.2.23-rc1 to a stable version 0.2.22.
packages/injective-cosmwasm/CARGO.toml Updated package version to 0.2.24 and dependencies: cosmwasm-std to 2.1.0, and cw-storage-plus to 2.0.0.
packages/injective-cosmwasm/src/exchange/types.rs Enhanced KeyDeserialize with new constant KEY_ELEMS, modified from_vec return type, and added from_slice.
packages/injective-cosmwasm/src/exchange_mock_querier.rs Improved monetary value handling, transitioned to u128 for monetary amounts, and updated handler parameter types.

Sequence Diagram(s)

sequenceDiagram
    participant U as User
    participant A as Application
    participant C as injective-cosmwasm

    U->>A: Initiate Build
    A->>C: Fetch injective-cosmwasm (v0.2.18 or v0.2.22)
    C-->>A: Provide Dependencies
    A-->>U: Build Complete
Loading

Poem

🐰 In fields of code, we leap and bound,
New versions sprout from the ground.
With 0.2.22, stability's near,
Hopping forward, we spread good cheer!
Dependencies align, the path is clear,
Together we build, with joy we steer! 🌿


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

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

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

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between feabd33 and a4273c5.

Files selected for processing (1)
  • contracts/injective-cosmwasm-mock/Cargo.toml (1 hunks)
Additional comments not posted (1)
contracts/injective-cosmwasm-mock/Cargo.toml (1)

38-38: LGTM! But verify compatibility with the new version.

The dependency for injective-cosmwasm has been updated to version 0.2.18. This change should improve stability and compatibility by using a specific version instead of a local path.

However, ensure that the new version does not introduce any breaking changes or incompatibilities.

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

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between a4273c5 and aaa4c9e.

Files ignored due to path filters (2)
  • Cargo.lock is excluded by !**/*.lock
  • contracts/injective-cosmwasm-mock/Cargo.lock is excluded by !**/*.lock
Files selected for processing (8)
  • contracts/atomic-order-example/Cargo.toml (1 hunks)
  • contracts/dummy/Cargo.toml (1 hunks)
  • packages/injective-cosmwasm/CHANGELOG.md (1 hunks)
  • packages/injective-cosmwasm/Cargo.toml (1 hunks)
  • packages/injective-cosmwasm/src/exchange/subaccount.rs (1 hunks)
  • packages/injective-cosmwasm/src/exchange/types.rs (2 hunks)
  • packages/injective-cosmwasm/src/exchange_mock_querier.rs (8 hunks)
  • packages/injective-testing/Cargo.toml (1 hunks)
Files skipped from review due to trivial changes (4)
  • contracts/atomic-order-example/Cargo.toml
  • contracts/dummy/Cargo.toml
  • packages/injective-cosmwasm/src/exchange/subaccount.rs
  • packages/injective-testing/Cargo.toml
Additional comments not posted (19)
packages/injective-cosmwasm/CHANGELOG.md (4)

8-12: Changelog Update: Version 0.2.24

The changes for version 0.2.24 are well-documented, including the update to cosmwasm_std version 2.1.0.


17-18: Changelog Update: Added Tests

The addition of tests for injective-cosmwasm-mock covering the functionality of querier.rs is well-documented.


21-22: Changelog Update: Fixed Aggregate Volume Query

The fix for the exchange aggregate volume query to use the correct parsing method is well-documented.


25-27: Changelog Update: Removed Items

The removal of grants related queries and the exchange denom decimal query is well-documented.

packages/injective-cosmwasm/Cargo.toml (3)

9-9: Package Version Update

The package version has been updated to 0.2.24, indicating a new release.


13-13: Dependency Update: cosmwasm-std

The cosmwasm-std dependency has been updated to version 2.1.0, which includes new features and improvements.


14-14: Dependency Update: cw-storage-plus

The cw-storage-plus dependency has been updated to version 2.0.0, suggesting enhancements or changes in the storage functionalities.

packages/injective-cosmwasm/src/exchange/types.rs (4)

367-368: Addition of KEY_ELEMS Constant

The addition of the KEY_ELEMS constant with a value of 42 standardizes the number of key elements associated with SubaccountId.


370-373: Return Type Update: from_vec Method

The return type of the from_vec method has been updated to std::result::Result<SubaccountId, StdError>, aligning with standard Rust practices for result types.


374-376: New Method: from_slice

The from_slice method allows direct deserialization from byte slices, enhancing the usability of the SubaccountId type.


400-401: Addition of KEY_ELEMS Constant

The addition of the KEY_ELEMS constant with a value of 42 standardizes the number of key elements associated with &SubaccountId.

packages/injective-cosmwasm/src/exchange_mock_querier.rs (8)

257-259: Approved: Explicitly define the fee amount as u128 for type safety and clarity.

The change to Coin::new(10u128, "inj") enhances type safety and clarity in monetary calculations.


268-270: Approved: Explicitly define the balance amount as u128 for consistency and type safety.

The change to Coin::new(1000000000000000u128, denom) ensures consistency in how responses are created.


273-275: Approved: Explicitly define the balance amount as u128 for consistency and type safety.

The change to Coin::new(1000000000000000u128, "inj") ensures consistency in how responses are created.


Line range hint 282-299: Approved: Explicitly define monetary values as u128 for consistency and type safety.

The changes to Coin::new(100000000000000000000u128, denom), Coin::new(1000000000000000000000u128, denom), and Coin::new(10000000000000000000u128, denom) ensure consistency in how monetary values are defined.


1264-1266: Approved: Explicitly define the balance amount as u128 for type safety and clarity.

The change to Coin::new(0u128, denom.clone()) enhances type safety and clarity in balance handling.


1280-1282: Approved: Improve consistency in response creation.

The change to AllBalanceResponse::new(self.balances.to_owned()) ensures consistency in how responses are created.


1331-1345: Approved: Enhance type specificity and safety by using Addr for the creator parameter.

The change to pub fn create_contract_info_handler(code_id: u64, creator: Addr) enhances type specificity and safety.


1348-1361: Approved: Enhance type specificity and safety by using Addr for the creator parameter.

The change to pub fn create_code_id_handler(creator: Addr) enhances type specificity and safety.

@maxrobot maxrobot closed this Aug 1, 2024
@maxrobot maxrobot deleted the f/injective-cosmwasm-bump branch August 1, 2024 14:53
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.

1 participant