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: bumped package to include both permissions and peggy messages #229

Merged
merged 3 commits into from
Jul 23, 2024

Conversation

maxrobot
Copy link
Contributor

@maxrobot maxrobot commented Jul 22, 2024

As per: this issue

BUT.

I think it's healthier for us to transition to supporting injective-std more actively and secondly wasmbindings have no peggy message integrations so 🤷

Summary by CodeRabbit

  • New Features

    • Introduced a new peggy module to facilitate cross-chain transactions between Cosmos and Ethereum networks.
    • Added a permissions module to manage permissions within the blockchain application, enhancing security and access control.
  • Bug Fixes

    • Updated versioning in the injective-std package, indicating minor revisions and potential bug fixes.
  • Refactor

    • Simplified message structures by removing the min_notional field from market launch messages.
  • Enhancements

    • Updated type_url attributes for various Protobuf message structures, improving organization and compatibility.

@maxrobot maxrobot requested a review from gorgos July 22, 2024 14:58
Copy link

coderabbitai bot commented Jul 22, 2024

Walkthrough

The recent updates to the injective-std package feature a version increment and multiple structural modifications that enhance the module's overall functionality. Key changes include adjustments to Protobuf type_url attributes, the removal of specific fields in message structs, and the addition of new modules focused on permissions and cross-chain interactions. These enhancements aim to boost modularity, maintainability, and interoperability within the blockchain ecosystem.

Changes

Files & Paths Change Summary
packages/injective-std/Cargo.toml Version updated from 1.12.10-testnet-rc2.1 to 1.12.10-testnet-rc2.2.
packages/injective-std/src/types/cosmos/base/query/v1beta1.rs, packages/injective-std/src/types/cosmos/base/v1beta1.rs Repetitive naming changes in type_url attributes, potentially affecting serialization.
packages/injective-std/src/types/injective/exchange/v1beta1.rs Removed min_notional field from MsgInstantSpotMarketLaunch and MsgInstantPerpetualMarketLaunch.
packages/injective-std/src/types/injective/mod.rs Added new public modules peggy and permissions, enhancing overall functionality.
packages/injective-std/src/types/injective/peggy/mod.rs, packages/injective-std/src/types/injective/permissions/mod.rs New modules introduced: v1 in peggy and v1beta1 in permissions, promoting improved modular design.
packages/injective-std/src/types/injective/peggy/v1.rs Comprehensive definitions for data structures and messages to support cross-chain functionality, including Attestation, Erc20Token, etc.
packages/injective-std/src/types/injective/permissions/v1beta1.rs New module for permission management, featuring structures like Namespace, Role, and various query messages.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant ChainA
    participant ChainB
    participant PeggyModule

    User->>PeggyModule: Initiate asset transfer
    PeggyModule->>ChainA: Validate and process request
    ChainA->>PeggyModule: Confirm transaction
    PeggyModule->>ChainB: Forward transfer request
    ChainB->>PeggyModule: Confirm receipt
    PeggyModule->>User: Notify success
Loading

🐇✨
In a world of code where changes flow,
New modules sprout, watch them grow!
Permissions dance, and cross chains play,
A rabbit’s cheer for the bright new way!
Hops of joy for updates grand,
In the blockchain's heart, we take a stand!
🥕🌟


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

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 346f936 and d2427b8.

Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
Files selected for processing (9)
  • packages/injective-std/Cargo.toml (1 hunks)
  • packages/injective-std/src/types/cosmos/base/query/v1beta1.rs (2 hunks)
  • packages/injective-std/src/types/cosmos/base/v1beta1.rs (3 hunks)
  • packages/injective-std/src/types/injective/exchange/v1beta1.rs (2 hunks)
  • packages/injective-std/src/types/injective/mod.rs (1 hunks)
  • packages/injective-std/src/types/injective/peggy/mod.rs (1 hunks)
  • packages/injective-std/src/types/injective/peggy/v1.rs (1 hunks)
  • packages/injective-std/src/types/injective/permissions/mod.rs (1 hunks)
  • packages/injective-std/src/types/injective/permissions/v1beta1.rs (1 hunks)
Files skipped from review due to trivial changes (1)
  • packages/injective-std/Cargo.toml
Additional comments not posted (48)
packages/injective-std/src/types/injective/peggy/mod.rs (1)

1-1: Module Declaration: Ensure Consistency and Completeness

The new module v1 is declared correctly. Ensure that the corresponding v1 module file exists and is correctly implemented.

packages/injective-std/src/types/injective/permissions/mod.rs (1)

1-1: Module Declaration: Ensure Consistency and Completeness

The new module v1beta1 is declared correctly. Ensure that the corresponding v1beta1 module file exists and is correctly implemented.

packages/injective-std/src/types/injective/mod.rs (1)

5-6: Module Declarations: Ensure Consistency and Completeness

The new modules peggy and permissions are declared correctly. Ensure that the corresponding module files exist and are correctly implemented.

packages/injective-std/src/types/injective/permissions/v1beta1.rs (16)

3-6: Verify the necessity of the empty Params struct.

The Params struct is currently empty. Ensure that this is intentional and aligns with the module's requirements.


8-28: LGTM!

The Namespace struct is well-defined and appears to be correctly implemented.


32-42: LGTM!

The Role struct is well-defined and appears to be correctly implemented.


45-49: LGTM!

The Roles struct is well-defined and appears to be correctly implemented.


53-58: LGTM!

The RoleIDs struct is well-defined and appears to be correctly implemented.


61-65: LGTM!

The Voucher struct is well-defined and appears to be correctly implemented.


69-99: LGTM!

The Action enum is well-defined and appears to be correctly implemented.


103-110: LGTM!

The GenesisState struct is well-defined and appears to be correctly implemented.


114-120: LGTM!

The QueryParamsRequest struct is well-defined and appears to be correctly implemented.


123-128: LGTM!

The QueryParamsResponse struct is well-defined and appears to be correctly implemented.


133-139: LGTM!

The QueryAllNamespacesRequest struct is well-defined and appears to be correctly implemented.


143-147: LGTM!

The QueryAllNamespacesResponse struct is well-defined and appears to be correctly implemented.


152-160: LGTM!

The QueryNamespaceByDenomRequest struct is well-defined and appears to be correctly implemented.


167-171: LGTM!

The QueryNamespaceByDenomResponse struct is well-defined and appears to be correctly implemented.


176-186: LGTM!

The QueryAddressesByRoleRequest struct is well-defined and appears to be correctly implemented.


191-195: LGTM!

The QueryAddressesByRoleResponse struct is well-defined and appears to be correctly implemented.

packages/injective-std/src/types/injective/peggy/v1.rs (27)

1-33: LGTM! Struct Attestation is well-defined.

The struct is well-documented and includes appropriate attributes for serialization and deserialization.


34-48: LGTM! Struct Erc20Token is well-defined.

The struct is well-documented and includes appropriate attributes for serialization and deserialization.


49-86: LGTM! Enum ClaimType is well-defined.

The enum is well-documented and includes appropriate methods for string conversion.


87-114: LGTM! Struct OutgoingTxBatch is well-defined.

The struct is well-documented and includes appropriate attributes for serialization and deserialization.


115-135: LGTM! Struct OutgoingTransferTx is well-defined.

The struct is well-documented and includes appropriate attributes for serialization and deserialization.


136-166: LGTM! Enum SignType is well-defined.

The enum is well-documented and includes appropriate methods for string conversion.


167-179: LGTM! Struct BridgeValidator is well-defined.

The struct is well-documented and includes appropriate attributes for serialization and deserialization.


181-207: LGTM! Struct Valset is well-defined.

The struct is well-documented and includes appropriate attributes for serialization and deserialization.


208-228: LGTM! Struct LastObservedEthereumBlockHeight is well-defined.

The struct is well-documented and includes appropriate attributes for serialization and deserialization.


230-247: LGTM! Struct LastClaimEvent is well-defined.

The struct is well-documented and includes appropriate attributes for serialization and deserialization.


248-258: LGTM! Struct Erc20ToDenom is well-defined.

The struct is well-documented and includes appropriate attributes for serialization and deserialization.


259-287: LGTM! Struct EventAttestationObserved is well-defined.

The struct is well-documented and includes appropriate attributes for serialization and deserialization.


288-301: LGTM! Struct EventBridgeWithdrawCanceled is well-defined.

The struct is well-documented and includes appropriate attributes for serialization and deserialization.


303-325: LGTM! Struct EventOutgoingBatch is well-defined.

The struct is well-documented and includes appropriate attributes for serialization and deserialization.


326-351: LGTM! Struct EventOutgoingBatchCanceled is well-defined.

The struct is well-documented and includes appropriate attributes for serialization and deserialization.


352-375: LGTM! Struct EventValsetUpdateRequest is well-defined.

The struct is well-documented and includes appropriate attributes for serialization and deserialization.


377-386: LGTM! Struct EventSetOrchestratorAddresses is well-defined.

The struct is well-documented and includes appropriate attributes for serialization and deserialization.


388-399: LGTM! Struct EventValsetConfirm is well-defined.

The struct is well-documented and includes appropriate attributes for serialization and deserialization.


400-419: LGTM! Struct EventSendToEth is well-defined.

The struct is well-documented and includes appropriate attributes for serialization and deserialization.


420-432: LGTM! Struct EventConfirmBatch is well-defined.

The struct is well-documented and includes appropriate attributes for serialization and deserialization.


433-448: LGTM! Struct EventAttestationVote is well-defined.

The struct is well-documented and includes appropriate attributes for serialization and deserialization.


449-479: LGTM! Struct EventDepositClaim is well-defined.

The struct is well-documented and includes appropriate attributes for serialization and deserialization.


481-510: LGTM! Struct EventWithdrawClaim is well-defined.

The struct is well-documented and includes appropriate attributes for serialization and deserialization.


511-545: LGTM! Struct EventErc20DeployedClaim is well-defined.

The struct is well-documented and includes appropriate attributes for serialization and deserialization.


547-577: LGTM! Struct EventValsetUpdateClaim is well-defined.

The struct is well-documented and includes appropriate attributes for serialization and deserialization.


583-592: LGTM! Struct EventCancelSendToEth is well-defined.

The struct is well-documented and includes appropriate attributes for serialization and deserialization.


593-601: LGTM! Struct EventSubmitBadSignatureEvidence is well-defined.

The struct is well-documented and includes appropriate attributes for serialization and deserialization.
[

packages/injective-std/src/types/injective/exchange/v1beta1.rs (2)

Line range hint 1-5:
Verify the correctness and consistency of the min_quantity_tick_size field.

Ensure that the min_quantity_tick_size field is correctly added or modified in the MsgInstantSpotMarketLaunch struct. Verify that the tag value 6 is unique and consistent with the rest of the struct.

Verification successful

The min_quantity_tick_size field in the MsgInstantSpotMarketLaunch struct is correctly added and consistent with the rest of the struct. The tag value 6 is unique and properly used.

  • Location: packages/injective-std/src/types/injective/exchange/v1beta1.rs, MsgInstantSpotMarketLaunch struct.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the correctness and consistency of the `min_quantity_tick_size` field in `MsgInstantSpotMarketLaunch` struct.

# Test: Search for the `MsgInstantSpotMarketLaunch` struct definition. Expect: The tag value `6` is unique and consistent.
rg --type rust -A 10 $'struct MsgInstantSpotMarketLaunch'

Length of output: 4390


Script:

#!/bin/bash
# Description: Verify the completeness and consistency of the `MsgInstantSpotMarketLaunch` struct definition.

# Test: Search for the complete definition of the `MsgInstantSpotMarketLaunch` struct.
rg --type rust -A 20 $'struct MsgInstantSpotMarketLaunch'

Length of output: 8005


Line range hint 6-10:
Verify the correctness and consistency of the min_quantity_tick_size field.

Ensure that the min_quantity_tick_size field is correctly added or modified in the MsgInstantPerpetualMarketLaunch struct. Verify that the tag value 13 is unique and consistent with the rest of the struct.

Verification successful

The min_quantity_tick_size field is correctly added and consistent with the rest of the MsgInstantPerpetualMarketLaunch struct.

  • The field min_quantity_tick_size is present with the tag value 13.
  • All tag values in the struct are unique and consistent.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the correctness and consistency of the `min_quantity_tick_size` field in `MsgInstantPerpetualMarketLaunch` struct.

# Test: Search for the `MsgInstantPerpetualMarketLaunch` struct definition. Expect: The tag value `13` is unique and consistent.
rg --type rust -A 10 $'struct MsgInstantPerpetualMarketLaunch'

Length of output: 4427


Script:

#!/bin/bash
# Description: Verify the correctness and consistency of the `min_quantity_tick_size` field in `MsgInstantPerpetualMarketLaunch` struct.

# Test: Search for the complete definition of the `MsgInstantPerpetualMarketLaunch` struct to check the presence and correctness of the `min_quantity_tick_size` field and its tag value `13`.
rg --type rust -A 50 $'struct MsgInstantPerpetualMarketLaunch'

Length of output: 18799

packages/injective-std/src/types/cosmos/base/v1beta1.rs Outdated Show resolved Hide resolved
packages/injective-std/src/types/cosmos/base/v1beta1.rs Outdated Show resolved Hide resolved
packages/injective-std/src/types/cosmos/base/v1beta1.rs Outdated Show resolved Hide resolved
packages/injective-std/src/types/cosmos/base/v1beta1.rs Outdated Show resolved Hide resolved
@maxrobot maxrobot requested a review from jbernal87 July 22, 2024 15:16
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 d2427b8 and 80382c4.

Files selected for processing (1)
  • packages/injective-std/src/types/injective/exchange/v1beta1.rs (2 hunks)
Files skipped from review as they are similar to previous changes (1)
  • packages/injective-std/src/types/injective/exchange/v1beta1.rs

@gorgos gorgos merged commit 7f0ff48 into dev Jul 23, 2024
4 checks passed
@gorgos gorgos deleted the f/helix-847 branch July 23, 2024 15:04
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.

2 participants